Skip to content

Commit

Permalink
Check all act ids for errors instead of installed key's act id
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsAddict committed Dec 20, 2024
1 parent 5638898 commit 8fff2cc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions MAS/All-In-One-Version-KL/MAS_AIO.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8646,12 +8646,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"
Expand Down
20 changes: 10 additions & 10 deletions MAS/Separate-Files-Version/Change_Windows_Edition.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8fff2cc

Please sign in to comment.