PDA

View Full Version : LaunchAppAndWait Example



Raharrelson
02-26-2008, 02:55 PM
For those who are new to InstallShield and InstallScript, here is the code of how to use LaunchAppAndWait. This took me several hours to stumble upon, so hopefully it will save you the time. The catch is that a single '\' is the escape character in InstallScript, so you have to provide '\\' to get a single '\'. Happy Coding

nreturn = Is( FILE_EXISTS, "c:\\temp\\wait.bat" );
MessageBox( "File Exist returns: wait.bat" + FormatMessage( nreturn ), WARNING );


nreturn = LaunchAppAndWait ("c:\\temp\\wait.bat", "", WAIT);
if (nreturn < 0) then
MessageBox("unable to lanuch wait.bat " + FormatMessage(nreturn), SEVERE);
endif;