I'm trying to launch an executable which is stored in the Support Files section but it never runs and I can't figure out why. My Custom Action runs during the UI sequence, it basically does this:
MsiGetProperty(hMSI, "SUPPORTDIR", supportDirPath, nLength);
szPath=supportDirPath^"\\foo.exe";
LaunchAppAndWait( szPath, "", WAIT );
foo.exe does not actually run. If I print out the value of supportDirPath (with MessageBox) right before LaunchAppAndWait and open the directory (in Windows Explorer) I can confirm that foo.exe is there as it should be.
supportDirPath evaluates to something like:
C:\Users\john\AppData\Local\Temp\{F2305345-FA8D-474F-A2D9-FB31DB9663DF}
I tried calling LongPathToQuote( szPath, TRUE ) before LaunchAppAndWait which made no difference. Can someone show me what I'm doing wrong ? How do I launch my .exe from the support dir ?
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Launch Program from Support Files folder
Started by
integer
, Sep 01 2012 04:02
1 reply to this topic
Posted 02 September 2012 - 01:47
If I launch my installer directly from the InstallShield IDE (installation designer) by clicking the red exclamation mark then all my LaunchAppAndWait() calls work perfectly fine and everything is OK.
If I build my project and then launch the resulting .MSI file by double-clicking it from Windows Explorer then all my LaunchAppAndWait() fail and none of my SUPPORTDIR .exe files get launched.
The following if statement evaluates to true and displays the message box:
If I build my project and then launch the resulting .MSI file by double-clicking it from Windows Explorer then all my LaunchAppAndWait() fail and none of my SUPPORTDIR .exe files get launched.
The following if statement evaluates to true and displays the message box:
CODE |
if Is( FILE_EXISTS, szPath ) then MessageBox( "FILE_EXISTS="+szPath, INFORMATION ); endif; |
and yet the next line of code does NOT launch my .exe file:
CODE |
LaunchAppAndWait( szPath, "", WAIT ); |
This is extremely confusing, does anyone have any ideas why this happens?
Edited by integer, 03 September 2012 - 01:18.