mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2026-10-13 14:06:13 -08:00
Add an error code to detect WMI error
This commit is contained in:
1 parent
0cbaa141c3
commit
fcb710a48a
6 files changed
+7
-7
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user