1
0
mirror of https://github.com/massgravel/Microsoft-Activation-Scripts.git synced 2024-11-21 22:36:50 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
WindowsAddict
ab90514b0a 2.8 2024-11-09 21:13:50 +05:30
WindowsAddict
25abc1f457 Don't show other fixes when HKU\S-1-5-20 is missing 2024-11-09 20:42:20 +05:30
WindowsAddict
873c4bc4d8 Detect a potential script crash when user installs too many licenses for Office 2024-11-09 20:35:41 +05:30
10 changed files with 66 additions and 13 deletions

@ -1,5 +1,5 @@
@::03938c58-ded9-4e95-b879-cb81e3e77c93
@set masver=2.7
@::b879-random
@set masver=2.8
@setlocal DisableDelayedExpansion
@echo off
@ -1162,6 +1162,22 @@ 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"))
:: Check potential script crash issue when user manually installs way too many licenses for Office (length limit in variable)
if defined allapps if %1==0ff1ce15-a989-479d-af46-f275c6370663 (
set len=0
echo:!allapps!> %SystemRoot%\Temp\chklen
for %%A in (%SystemRoot%\Temp\chklen) do (set len=%%~zA)
del %SystemRoot%\Temp\chklen %nul%
if !len! GTR 6000 (
%eline%
echo Too many licenses are installed, the script may crash.
call :dk_color %Blue% "%_fixmsg%"
timeout /t 30
)
)
exit /b
:: Get installed products Activation IDs
@ -1610,6 +1626,7 @@ call :dk_color %Red% "Checking Eval WLMS Service [Found]"
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
set error=1
set showfix=1
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
set fixes=%fixes% %mas%in-place_repair_upgrade
call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %mas%in-place_repair_upgrade"

@ -1,4 +1,4 @@
@set masver=2.7
@set masver=2.8
@echo off
@ -1373,6 +1373,7 @@ call :dk_color %Red% "Checking Eval WLMS Service [Found]"
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
set error=1
set showfix=1
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
set fixes=%fixes% %mas%in-place_repair_upgrade
call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %mas%in-place_repair_upgrade"

@ -1,4 +1,4 @@
@set masver=2.7
@set masver=2.8
@echo off
@ -1538,6 +1538,7 @@ call :dk_color %Red% "Checking Eval WLMS Service [Found]"
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
set error=1
set showfix=1
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
set fixes=%fixes% %mas%in-place_repair_upgrade
call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %mas%in-place_repair_upgrade"

@ -1,4 +1,4 @@
@set masver=2.7
@set masver=2.8
@echo off
@ -1455,6 +1455,22 @@ 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"))
:: Check potential script crash issue when user manually installs way too many licenses for Office (length limit in variable)
if defined allapps if %1==0ff1ce15-a989-479d-af46-f275c6370663 (
set len=0
echo:!allapps!> %SystemRoot%\Temp\chklen
for %%A in (%SystemRoot%\Temp\chklen) do (set len=%%~zA)
del %SystemRoot%\Temp\chklen %nul%
if !len! GTR 6000 (
%eline%
echo Too many licenses are installed, the script may crash.
call :dk_color %Blue% "%_fixmsg%"
timeout /t 30
)
)
exit /b
:: Get installed products Activation IDs
@ -1853,6 +1869,7 @@ call :dk_color %Red% "Checking Eval WLMS Service [Found]"
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
set error=1
set showfix=1
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
set fixes=%fixes% %mas%in-place_repair_upgrade
call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %mas%in-place_repair_upgrade"

@ -1,4 +1,4 @@
@set masver=2.7
@set masver=2.8
@echo off
@ -2479,6 +2479,22 @@ 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"))
:: Check potential script crash issue when user manually installs way too many licenses for Office (length limit in variable)
if defined allapps if %1==0ff1ce15-a989-479d-af46-f275c6370663 (
set len=0
echo:!allapps!> %SystemRoot%\Temp\chklen
for %%A in (%SystemRoot%\Temp\chklen) do (set len=%%~zA)
del %SystemRoot%\Temp\chklen %nul%
if !len! GTR 6000 (
%eline%
echo Too many licenses are installed, the script may crash.
call :dk_color %Blue% "%_fixmsg%"
timeout /t 30
)
)
exit /b
:: Get installed products Activation IDs
@ -2954,6 +2970,7 @@ call :dk_color %Red% "Checking Eval WLMS Service [Found]"
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
set error=1
set showfix=1
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
set fixes=%fixes% %mas%in-place_repair_upgrade
call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %mas%in-place_repair_upgrade"

@ -1,4 +1,4 @@
@set masver=2.7
@set masver=2.8
@echo off

@ -1,4 +1,4 @@
@set masver=2.7
@set masver=2.8
@echo off

@ -1,4 +1,4 @@
@set masver=2.7
@set masver=2.8
@echo off

@ -1,4 +1,4 @@
@set masver=2.7
@set masver=2.8
@echo off

@ -34,7 +34,7 @@ irm https://massgrave.dev/get | iex
### Method 2 - Traditional (Windows 7 and later)
<details>
<summary>Info</summary>
<summary>Click here for info</summary>
1. Download the file under the code button from [GitHub](https://github.com/massgravel/Microsoft-Activation-Scripts) or [Azure DevOps](https://dev.azure.com/massgrave/_git/Microsoft-Activation-Scripts) or [Self-hosted Git](https://git.activated.win/massgrave/Microsoft-Activation-Scripts)
2. Right-click on the downloaded zip file and extract
@ -58,8 +58,8 @@ irm https://massgrave.dev/get | iex
To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches).
```
Latest Version: 2.7
Release date: 6-Sep-2024
Latest Version: 2.8
Release date: 9-Nov-2024
```
### [Troubleshooting / Help](https://massgrave.dev/troubleshoot)