Return value


I am using the code below to obtain the return value “ERRORLEVEL”. Howver, I would like to know the how do I pass ERRORLEVEL value to another program.



CALL “C:\ProgramFiles\Eggplant\myscript.bat” “C:\VMC.suite\Scripts\BtnRed.script” -host %1
exit /b %ERRORLEVEL%

So you have a Windows .BAT file that is calling eggPlant and echoing and then returning the result of the test.

What you have written works and I’ve verified that it does return the eggPlant status as the exit code for the BAT file. So really it’s a question of how does your “other program” interpret exit codes when it calls a BAT file, that really is the heart of the question, but it depends on the other program.

Thanks for the quick reply. I’ll look into how the other application interact with eggplant.