diff options
| author | WindowsAddict <[email protected]> | 2025-04-21 18:01:09 +0530 |
|---|---|---|
| committer | WindowsAddict <[email protected]> | 2025-04-21 18:01:09 +0530 |
| commit | 5090cde0a04698521979d48f28f670827a69d74e (patch) | |
| tree | 50887ff7a8f48b3570c267e968ee6089d721bcf6 /MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | |
| parent | af18bd773c1b4bb4dd1c4e055ab154cccfa7782f (diff) | |
| download | Microsoft-Activation-Scripts-5090cde0a04698521979d48f28f670827a69d74e.zip | |
Use wmic.exe on builds below 9200
Diffstat (limited to 'MAS/Separate-Files-Version/Activators/HWID_Activation.cmd')
| -rw-r--r-- | MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 6aa033b..6409cec 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1072,6 +1072,7 @@ function ReinstallLicenses() { :dk_ckeckwmic
+if %winbuild% LSS 9200 (set _wmic=1&exit /b)
set _wmic=0
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" %nul2% | find /i "computersystem" %nul1% && set _wmic=1
@@ -1385,7 +1386,8 @@ call :dk_color %Red% "Checking Package Files [Not Found] [%osed )
-%psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
+if %_wmic% EQU 1 wmic path %sps% get Version %nul%
+if %_wmic% EQU 0 %psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
set error_code=%errorlevel%
cmd /c exit /b %error_code%
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
