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
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 Not Working
Started by
scsmith1
, Jun 24 2005 18:06
5 replies to this topic
Posted 24 June 2005 - 18:21
Use full path?:
EXEPath = "\"" + INSTALLDIR ^ "TheExe.exe" + "\"";
LaunchAppAndWait( EXEPath, "/option", WAIT);
EXEPath = "\"" + INSTALLDIR ^ "TheExe.exe" + "\"";
LaunchAppAndWait( EXEPath, "/option", WAIT);
Regards
-Stein Åsmul
-Stein Åsmul
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.
Posted 24 June 2005 - 20:24
Did you add quotes at each end of the path using "\"" ?:
EXEPath = "\"" + INSTALLDIR ^ "TheExe.exe" + "\"";
EXEPath = "\"" + INSTALLDIR ^ "TheExe.exe" + "\"";
Regards
-Stein Åsmul
-Stein Åsmul
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?
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);
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);