General discussion

  • Creator
  • #2074762

    Setting the errorlevel in batch file?


    by rejohnson ·

    I need to reset the errorlevel in a DOS batch file to return a different exit code than set by a command error within the batch file. No user interaction is possible, so I can’t use utilities like DCH or Enquire to set the errorlevel.

    Anybody know a utility to do this? I can run another dos program with a predictable exit code like wait.exe, which will reset the errorlevel to 0, but that’s only a partial solution.



All Comments

Viewing 2 reply threads