Querying exit code (aka ERRORLEVEL) of external programs

Just curios. How can I query the so called exit code of external programs, namely a 4NT script?

What do you want to do as the result of the query?

I think you'd have to do this using a batch type of button. If you wanted to run internal commands depending on the result code then you'd have to run them via dopusrt.exe so that the whole thing remains a single batch file (else the logic/flow stuff gets broken by the batch being split into parts).

Originally I wanted to show the exit code in a message box. Then, I've simply used 4NT's msgbox function. Then again, I've just become curious :slight_smile:

You're right, using dopusrt in a batch may be the best way. Simple and elegant.