Menu

#27 Does not transfers errorlevel to calling batch

open
nobody
General (24)
5
2007-11-23
2007-11-23
Anonymous
No

When using command line version of sudo from batch file, sudo:
- does not wait until called process terminates
- does not returns called process exit code ("errorlevel") to batch

Example:
...
sudo "C:\Program Files\WinRAR\rar.exe" a ...(other params)
set RE=%ERRORLEVEL%
if %RE% GTR 0 ....but there is not rar.exe exit code

Discussion


Log in to post a comment.

MongoDB Logo MongoDB