Check all act ids for errors instead of installed key's act id

This commit is contained in:
WindowsAddict 2024-12-20 17:59:19 +05:30
parent 5638898eaf
commit 8fff2ccb9c
2 changed files with 14 additions and 14 deletions

View File

@ -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 call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f
if not defined apps ( if not defined allapps (
%eline% %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: echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"

View File

@ -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 call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f
if not defined apps ( if not defined allapps (
%eline% %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: echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %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% if %_wmic% EQU 0 %psc% "$null=(([WMICLASS]'%sps%').GetInstances()).RefreshLicenseStatus()" %nul%
exit /b exit /b
:: Get installed products Activation IDs :: Get all products Activation IDs
:dk_actid :dk_actids
set apps= set allapps=
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 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'' AND PartialProductKey IS NOT NULL').Get()).ID ^| %% {echo ('ID='+$_)}" %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 apps (call set "apps=!apps! %%a") else (call set "apps=%%a")) %chkapp% do (if defined allapps (call set "allapps=!allapps! %%a") else (call set "allapps=%%a"))
exit /b exit /b
:: Get Edition list :: Get Edition list