mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2024-12-27 16:00:58 +01:00
Check all act ids for errors instead of installed key's act id
This commit is contained in:
parent
5638898eaf
commit
8fff2ccb9c
2 changed files with 14 additions and 14 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue