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.

LaunchAppAndWait does not wait
Started by
kimi
, Feb 15 2006 08:14
5 replies to this topic
Posted 15 February 2006 - 08:14
I have an installscript function that is called from OnFirstUIAfter:
function UpdateSC()
begin
if(LaunchAppAndWait(INSTALLDIR^ "EXE\\PROGRAM.EXE ", INSTALLDIR ^ "SHORTCUT", LAAW_OPTION_WAIT)) < 0 then
MessageBox("Unable to launch "+ "program.exe" + ".", SEVERE);
other lines...
end
The application program.exe should start a window where the user can update shortcut text files, but nothing happens. Apparently the program is started because the message box is never shown, but the program window does not show up. The installation process just continues with the following step. I've tried to run both the function and the application as custom actions (Synchronous, Deferred execution) but the result is the same. The application itself starts with no problem when run e.g. in File manager during the installation process.
I've got this function from an older installscript project where it worked fine, but now I'm using Installscipt MSI. Could that be the problem?
I'm using InstallShield X.
I would appreciate any help.
Thanks.
function UpdateSC()
begin
if(LaunchAppAndWait(INSTALLDIR^ "EXE\\PROGRAM.EXE ", INSTALLDIR ^ "SHORTCUT", LAAW_OPTION_WAIT)) < 0 then
MessageBox("Unable to launch "+ "program.exe" + ".", SEVERE);
other lines...
end
The application program.exe should start a window where the user can update shortcut text files, but nothing happens. Apparently the program is started because the message box is never shown, but the program window does not show up. The installation process just continues with the following step. I've tried to run both the function and the application as custom actions (Synchronous, Deferred execution) but the result is the same. The application itself starts with no problem when run e.g. in File manager during the installation process.
I've got this function from an older installscript project where it worked fine, but now I'm using Installscipt MSI. Could that be the problem?
I'm using InstallShield X.
I would appreciate any help.
Thanks.
Posted 15 February 2006 - 14:13
Does this exe rely on any external files? Do you need to enclose the path in quotes?
Stefan Krüger
InstallSite.org twitter facebook
Posted 16 February 2006 - 07:32
Thanks for the fast reply!
The exe needs some dll files, but those are already installed on the target computer at that phase of the installation. Additionally, the exe can be started from the installed location without any problems already before the installation reaches InstallFinalize.
I tried to remove the quotes, but that leads to compilation errors.
The exe needs some dll files, but those are already installed on the target computer at that phase of the installation. Additionally, the exe can be started from the installed location without any problems already before the installation reaches InstallFinalize.
I tried to remove the quotes, but that leads to compilation errors.
Posted 18 February 2006 - 09:53
How does it load those DLLs? Note that you cannot rely on the "current working directory" but should instead use a full path to load DLLs.
Regarding the quotes - you may need to add additional quotes, using LongPathToQuote() function. Check the LaunchAppAndWait documentation of your InstallShield version.
Regarding the quotes - you may need to add additional quotes, using LongPathToQuote() function. Check the LaunchAppAndWait documentation of your InstallShield version.
Stefan Krüger
InstallSite.org twitter facebook
Posted 20 February 2006 - 09:16
The location of the DLLs is updated to 'Path' in Environment Variables, so it should be up-to-date during the application launch. The purpose of the command line parameter in LaunchAppAndWait is only for opening the correct folder in PROGRAM.EXE to browse for shortcut text files. If passing an empty string, the browsing window is not opened automatically in the program.
I tried LongPathToQuote() but the result was the same, the program didn't launch.
I tried LongPathToQuote() but the result was the same, the program didn't launch.
Posted 20 February 2006 - 20:21
A running MSI setup doesn't see updates to the path environment.
Stefan Krüger
InstallSite.org twitter facebook