summaryrefslogtreecommitdiff
path: root/MAS/All-In-One-Version-KL
diff options
context:
space:
mode:
authorWindowsAddict2025-04-21 12:31:09 +0000
committerWindowsAddict2025-04-21 12:31:09 +0000
commit5090cde0a04698521979d48f28f670827a69d74e (patch)
tree50887ff7a8f48b3570c267e968ee6089d721bcf6 /MAS/All-In-One-Version-KL
parentaf18bd773c1b4bb4dd1c4e055ab154cccfa7782f (diff)
downloadMicrosoft-Activation-Scripts-5090cde0a04698521979d48f28f670827a69d74e.zip
Use wmic.exe on builds below 9200
Diffstat (limited to 'MAS/All-In-One-Version-KL')
-rw-r--r--MAS/All-In-One-Version-KL/MAS_AIO.cmd11
1 files changed, 4 insertions, 7 deletions
diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd
index bc8220d..e5bc555 100644
--- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd
+++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd
@@ -1374,6 +1374,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
@@ -1687,7 +1688,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%"
@@ -10978,12 +10980,6 @@ set "_xmlexist=if exist "%tdir%\GenuineTicket.xml""
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null"
-sc query sppsvc | find /i "STOPPED" %nul% && (
-echo Stopping sppsvc Service [Successful]
-) || (
-call :dk_color %Gray% "Stopping sppsvc Service [Failed]"
-)
-
%_xmlexist% (
%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 20 | Out-Null"
%_xmlexist% timeout /t 2 %nul%
@@ -12431,6 +12427,7 @@ set _wmic=0
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" 2>nul | find /i "computersystem" 1>nul && set _wmic=1
)
+if %winbuild% LSS 9200 set _wmic=1
setlocal EnableDelayedExpansion
if exist "%ProgramFiles%\Activation-Renewal\" call :_taskstart>>"%ProgramFiles%\Activation-Renewal\Logs.txt"