I have .bat file that I call from LaunchAppAndWait() withWAIT option seelcted and .bat gets called and works fine when I debug the install script. The same code does not work when I run the setup.exe. but I dont get te failure message.
//dbinit.sql
svpcmd = svMpsHome ^ "\\MySQL\\mysqlInstall.bat";
svpline= "";
nOptions = LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN;
if (LaunchAppAndWait ( svpcmd, svpline, nOptions ) < 0) then
SprintfBox(WARNING,"Failed to run dbinit.sql %s", svpcmd);
endif;
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
Started by
ramalaks
, Jan 30 2006 23:30
3 replies to this topic
Posted 01 February 2006 - 10:39
Maybe your batch runs (insert a Pause message, or remove the hidden flag for testing) but maybe it doesn't work right. Are you relying on the current working directory in your .bat? You should use full paths instead.
Stefan Krüger
InstallSite.org twitter facebook
Posted 01 February 2006 - 19:49
One thing that I've done to debug situations like this is to pipe the output from the batch script to a txt file... assuming there is output in the batch file.
CODE |
szProgram = "cmd" szOptions = "/C " + svMpsHome ^ "\\MySQL\\mysqlInstall.bat >> C:\outputfile.txt 2>&1"; nReturn = LaunchAppAndWait(szProgram, LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN, szOptions); |
Riddle your batch script with "echo"s.
Oh, and see what nReturn really is after.
Hope that helps.
-- spdygnlz --
Posted 02 February 2006 - 21:38
when I add echo and pause in the batch file and take out the hidden mode, it works which is not acceptable as we dont want to see a cmd window during install.
but when i remove the echos and pause and do it in hidden mode it is not working. very strange.
but when i remove the echos and pause and do it in hidden mode it is not working. very strange.