summaryrefslogtreecommitdiff
path: root/MAS/Separate-Files-Version
diff options
context:
space:
mode:
authorWindowsAddict <[email protected]>2024-12-20 17:59:19 +0530
committerWindowsAddict <[email protected]>2024-12-20 17:59:19 +0530
commit8fff2ccb9c243e3fa15233fe50026ba34a6fc6b3 (patch)
treea320821c4d52facef5a1bf4d7a2e7124f9a3827a /MAS/Separate-Files-Version
parent5638898eaf3bd87df534cc67c94eeb5141cd82c2 (diff)
downloadMicrosoft-Activation-Scripts-8fff2ccb9c243e3fa15233fe50026ba34a6fc6b3.zip
Check all act ids for errors instead of installed key's act id
Diffstat (limited to 'MAS/Separate-Files-Version')
-rw-r--r--MAS/Separate-Files-Version/Change_Windows_Edition.cmd20
1 files changed, 10 insertions, 10 deletions
diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd
index cc9a043..b98c592 100644
--- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd
+++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd
@@ -336,12 +336,12 @@ if defined UBR (set "fullbuild=%%G.!UBR!") else (set "fullbuild=%%G.%%H")
::========================================================================================================================================
-:: Check Activation ID
+:: Check Activation IDs
-call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
-if not defined apps (
+call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f
+if not defined allapps (
%eline%
-echo Either key is not insalled or script failed to get installed key's activation ID. Aborting...
+echo Failed to find activation IDs. Aborting...
echo:
set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
@@ -834,14 +834,14 @@ if %_wmic% EQU 1 wmic path %sps% where __CLASS='%sps%' call RefreshLicenseStatus
if %_wmic% EQU 0 %psc% "$null=(([WMICLASS]'%sps%').GetInstances()).RefreshLicenseStatus()" %nul%
exit /b
-:: Get installed products Activation IDs
+:: Get all products Activation IDs
-:dk_actid
+:dk_actids
-set apps=
-if %_wmic% EQU 1 set "chkapp=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='%1' and PartialProductKey is not null) get ID /VALUE" %nul6%')"
-if %_wmic% EQU 0 set "chkapp=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT ID FROM %spp% WHERE ApplicationID=''%1'' AND PartialProductKey IS NOT NULL').Get()).ID ^| %% {echo ('ID='+$_)}" %nul6%')"
-%chkapp% do (if defined apps (call set "apps=!apps! %%a") else (call set "apps=%%a"))
+set allapps=
+if %_wmic% EQU 1 set "chkapp=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='%1') get ID /VALUE" %nul6%')"
+if %_wmic% EQU 0 set "chkapp=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT ID FROM %spp% WHERE ApplicationID=''%1''').Get()).ID ^| %% {echo ('ID='+$_)}" %nul6%')"
+%chkapp% do (if defined allapps (call set "allapps=!allapps! %%a") else (call set "allapps=%%a"))
exit /b
:: Get Edition list