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 function ??


2 replies to this topic

mila

mila
  • Full Members
  • 6 posts

Posted 22 October 2007 - 08:08

hello guys,

ok, i am trying to launch two programs from my postinstall script but i cant seem to get it to work properly .. if i try and start only one of the programs, it works fine but if i include the second one, the second one starts before the first one ( this is not good as the second one is dependant on the first one and as such the program installation fails ) .. how can i do this ?? any ideas ??

here's a look at my code so if anyone could help me out, i would appreciate it .. ill keep looking into finding the solution myself so ill keep this posted if i find an answer ..

thanks guys

CODE


szFile = INSTALLDIR ^ "mila.exe";
if ( LaunchAppAndWait ( szFile , "", NOWAIT ) < 0) then
MessageBox ("Unable to launch "+ szFile +".",SEVERE);
endif;
       
szFile1 = INSTALLDIR ^ "mila_2.exe";
if ( LaunchAppAndWait ( szFile1 , "", NOWAIT ) < 0) then
MessageBox ("Unable to launch "+ szFile1 +".",SEVERE);
endif;



mila

mila
  • Full Members
  • 6 posts

Posted 22 October 2007 - 09:39

hey guys,

i found a work around for this .. added a couple of several dialog windows so that after the first application is installed, you have to press OK in order for the second application to be executed ..
not a great solution but does the job ..

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 October 2007 - 14:21

NOWAIT doesn't wait for the first program to finish. So it start the first and then immediately the second program, so the two programs run essentially at the same time.