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 Not Working


5 replies to this topic

scsmith1

scsmith1
  • Members
  • 9 posts

Posted 24 June 2005 - 18:06

Is anyone having as much trouble with LaunchAppAndWait as I am - I cannot get the function to work. The program does not launch. The code I am using is:

GetCurrentDir( szCurDir );
ChangeDirectory (szPathDB);

LaunchAppAndWait("InstallDB.exe",szCmd2,LAAW_OPTION_WAIT);

// Restore the old working directory:-
ChangeDirectory ( szCurDir );

Where:
szPathDB = szBuildDBRoot + "\\InstallDB\\Bin";
szCmd1 = "1/" + @CATALOG + "/" + szServer;
szCmd2 = "2/" + @CATALOG + "/" + szServer;

szBuildDBRoot is the Drive letter of the source media.

Any thoughts? I am at wits end on this one.

scs

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 24 June 2005 - 18:21

Use full path?:

EXEPath = "\"" + INSTALLDIR ^ "TheExe.exe" + "\"";
LaunchAppAndWait( EXEPath, "/option", WAIT);
Regards
-Stein Åsmul

scsmith1

scsmith1
  • Members
  • 9 posts

Posted 24 June 2005 - 18:29

I have also used the full path without success. I modified the code to change the directory at the suggestion of another user. I have also tested the program that is launched to make sure it was not the source of the problem.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 24 June 2005 - 20:24

Did you add quotes at each end of the path using "\"" ?:

EXEPath = "\"" + INSTALLDIR ^ "TheExe.exe" + "\"";
Regards
-Stein Åsmul

scsmith1

scsmith1
  • Members
  • 9 posts

Posted 25 June 2005 - 00:14

I am running the executable file from the CD Drive. Is it possible that running the program from the CD Drive is causing the problem?

talzur

talzur
  • Members
  • 26 posts

Posted 14 July 2005 - 16:34

Hi,
maybe that by adding LAAW_OPTION_NO_CHANGEDIRECTORY
to the LaunchAppAndWait function.
instead of LaunchAppAndWait("InstallDB.exe",szCmd2,LAAW_OPTION_WAIT); try:
LaunchAppAndWait("InstallDB.exe",szCmd2,LAAW_OPTION_WAIT | LAAW_OPTION_NO_CHANGEDIRECTORY);