Jump to content


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.
Photo

LaunchAppAndWait does not wait


5 replies to this topic

kimi

kimi
  • Members
  • 3 posts

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.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 15 February 2006 - 14:13

Does this exe rely on any external files? Do you need to enclose the path in quotes?

kimi

kimi
  • Members
  • 3 posts

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.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

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.

kimi

kimi
  • Members
  • 3 posts

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.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 February 2006 - 20:21

A running MSI setup doesn't see updates to the path environment.