Page 1 of 1

Wusa not returning Errorlevel

PostPosted: 03.12.2015, 00:31
by porridge
Hallo

I note the :InstMsu routine in InstallOSUpdate.cmd

It calls wusa /quiet /norestart, and then checks error level. But when I tried this at the command line, I do not get an errorlevel unless I use start /wait.

Code: Select all
C:\Temp\wsusoffline>cd
C:\Temp\wsusoffline
C:\Temp\wsusoffline>echo %ERRORLEVEL%
0
C:\Temp\wsusoffline>wusa.exe c:\temp\wsusoffline\Windows8.1-KB3092601-x64.msu /quiet /norestart
C:\Temp\wsusoffline>echo %ERRORLEVEL%
0
C:\Temp\wsusoffline>start /wait wusa.exe c:\temp\wsusoffline\Windows8.1-KB3092601-x64.msu /quiet /norestart
C:\Temp\wsusoffline>echo %ERRORLEVEL%
2359302


For some reason this is no issue if the commands are in a batch file.

Just thought id let you know.

Tschüs!