mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-05-12 22:26:14 -04:00
Add an error code to detect WMI error
This commit is contained in:
parent
0cbaa141c3
commit
fcb710a48a
6 changed files with 7 additions and 7 deletions
|
@ -1078,7 +1078,7 @@ if %errorlevel% NEQ 0 (set error=1& exit /b)
|
|||
|
||||
%psc% "try { $null=([WMISEARCHER]'SELECT * FROM SoftwareLicensingService').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
||||
cmd /c exit /b %errorlevel%
|
||||
echo "0x%=ExitCode%" | findstr /i "0x800410 0x800440" %nul1%
|
||||
echo "0x%=ExitCode%" | findstr /i "0x800410 0x800440 0x80131501" %nul1%
|
||||
if %errorlevel% EQU 0 set error=1
|
||||
exit /b
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue