Question about nsExec::ExecToStack and Return Codes
I'm using nsExec::ExecToStack to execute a batch script. The batch script returns an ERRORLEVEL of 1. However, ExecToStack puts a "0" on the stack.
Here's how to reproduce this:
1. Unzip ExecToStack-question.zip.
2. In a Command Prompt window, change into the ExecToStack-question directory created when you unzipped the file.
3. Within the Command Prompt window, run foo.bat and then examine the ERRORLEVEL using echo %ERRORLEVEL%. This demonstrates that foo.bat does, indeed, set ERRORLEVEL to "1".
4. Build and execute the example installer.
From the installation details, you can see that ExecToStack placed a "0" on the stack for the Return Code.
Note that I'm assuming that "Return Code" and "ERRORLEVEL" are synonymous terms. If this is not the case, please correct me.
Any ideas why ExecToStack is not reporting the "1" that gets reported when executing foo.bat from the command-line?
Thanks!