
rg918603 asked a question.
I am using LaunchAppAndWait to kick off a batch file using cmd.exe. It works great, but how should my code handle the call if the batch file does not exist? Is there an installshield command which can first check for the existence of "MyBatchFile.bat"? If not, how can I get InstallShield to handle a non existent file in this situation? I would like to handle the error from InstallShield rather than just getting a dos error message.
define PROGRAM "C:Windows\\System32\\cmd.exe"
if (LaunchAppAndWait (PROGRAM, "MyBatchFile.bat", nWait) < 0) then
MessageBox ("Unable to launch "+ PROGRAM +".",SEVERE);
endif;
You can as well try Is command
https://community.revenera.com/s/InstallShield-Knowledge-Base/Detecting-When-a-Reboot-Is-Necessary3933
if (Is(FILE_EXISTS, WINDIR ^ "Wininit.ini") = TRUE) then
....