windosu
windosu copied to clipboard
Propagate exit code
Given a failing command:
C:\>type fail.bat
@exit /b 1
C:\>fail.bat
C:\>echo %errorlevel%
1
But...
C:\>sudo fail.bat
C:\>echo %errorlevel%
0