If execute.cmd
returns an integer than you can use a IF command
to check it's return value and if it matches the desired one than you can call launch.cmd
Suppose that execute.cmd
returns 0 if it is successful or an integer >= 1 otherwise. The batch would look like this:
rem call the execute command
call execute.cmd
rem check the return value (referred here as errorlevel)
if %ERRORLEVEL% ==1 GOTO noexecute
rem call the launch command
call launch.cmd
:noexecute
rem since we got here, launch is no longer going to be executed
note that the rem
command is used for comments.
HTH,
JP