mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-11-12 01:09:24 +00:00
Merge branch 'dev'
This commit is contained in:
commit
7f3372d778
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.7
|
@set masver=3.8
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -428,8 +428,8 @@ if not defined results (
|
|||||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||||
echo:
|
echo:
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
)
|
)
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
@ -1158,6 +1158,11 @@ set spperror=%errorlevel%
|
|||||||
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
||||||
%eline%
|
%eline%
|
||||||
echo sc start %_slser% [Error Code: %spperror%]
|
echo sc start %_slser% [Error Code: %spperror%]
|
||||||
|
if %spperror% EQU 1053 (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||||
|
call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
@ -1469,6 +1474,13 @@ if %_wmic% EQU 1 wmic path Win32_ComputerSystem get CreationClassName /value %nu
|
|||||||
if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Object -Property CreationClassName" %nul2% | find /i "computersystem" %nul1%
|
if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Object -Property CreationClassName" %nul2% | find /i "computersystem" %nul1%
|
||||||
|
|
||||||
if %errorlevel% NEQ 0 set wmifailed=1
|
if %errorlevel% NEQ 0 set wmifailed=1
|
||||||
|
|
||||||
|
if %_wmic% EQU 1 wmic path %sps% get Version %nul%
|
||||||
|
if %_wmic% EQU 0 %psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
||||||
|
set error_code=%errorlevel%
|
||||||
|
cmd /c exit /b %error_code%
|
||||||
|
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||||
|
|
||||||
echo "%error_code%" | findstr /i "0x800410 0x800440 0x80131501" %nul1% && set wmifailed=1& :: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-error-constants
|
echo "%error_code%" | findstr /i "0x800410 0x800440 0x80131501" %nul1% && set wmifailed=1& :: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-error-constants
|
||||||
|
|
||||||
if defined wmifailed (
|
if defined wmifailed (
|
||||||
@ -1662,12 +1674,6 @@ set showfix=1
|
|||||||
|
|
||||||
:: Check SoftwareLicensingService
|
:: Check SoftwareLicensingService
|
||||||
|
|
||||||
if %_wmic% EQU 1 wmic path %sps% get Version %nul%
|
|
||||||
if %_wmic% EQU 0 %psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
|
||||||
set error_code=%errorlevel%
|
|
||||||
cmd /c exit /b %error_code%
|
|
||||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
|
||||||
|
|
||||||
if %error_code% NEQ 0 (
|
if %error_code% NEQ 0 (
|
||||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
@ -1814,7 +1820,9 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||||||
|
|
||||||
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
||||||
|
|
||||||
if exist "%SysPath%\wlms\wlms.exe" (
|
sc query wlms %nul%
|
||||||
|
|
||||||
|
if %errorlevel% NEQ 1060 (
|
||||||
echo Checking Eval WLMS Service [Found]
|
echo Checking Eval WLMS Service [Found]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -2032,6 +2040,7 @@ d4bdc678-0a4b-4a32-a5b3-aaa24c3b0f24_K9VKN-3BGWV-Y624W-MCRMQ-BH%f%DCD_202_X22-53
|
|||||||
92fb8726-92a8-4ffc-94ce-f82e07444653_KY7PN-VR6RX-83W6Y-6DDYQ-T6%f%R4W_203_X22-53847_0_____Retail_CloudEdition
|
92fb8726-92a8-4ffc-94ce-f82e07444653_KY7PN-VR6RX-83W6Y-6DDYQ-T6%f%R4W_203_X22-53847_0_____Retail_CloudEdition
|
||||||
5a85300a-bfce-474f-ac07-a30983e3fb90_N979K-XWD77-YW3GB-HBGH6-D3%f%2MH_205_X23-15042_0_____OEM:DM_IoTEnterpriseSK
|
5a85300a-bfce-474f-ac07-a30983e3fb90_N979K-XWD77-YW3GB-HBGH6-D3%f%2MH_205_X23-15042_0_____OEM:DM_IoTEnterpriseSK
|
||||||
80083eae-7031-4394-9e88-4901973d56fe_P8Q7T-WNK7X-PMFXY-VXHBG-RR%f%K69_206_X23-62084_0_____OEM:DM_IoTEnterpriseK
|
80083eae-7031-4394-9e88-4901973d56fe_P8Q7T-WNK7X-PMFXY-VXHBG-RR%f%K69_206_X23-62084_0_____OEM:DM_IoTEnterpriseK
|
||||||
|
1bc2140b-285b-4351-b99c-26a126104b29_TMP2N-KGFHJ-PWM6F-68KCQ-3P%f%JBP_210_X23-60513_0_____Retail_WNC
|
||||||
) do (
|
) do (
|
||||||
for /f "tokens=1-9 delims=_" %%A in ("%%#") do (
|
for /f "tokens=1-9 delims=_" %%A in ("%%#") do (
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.7
|
@set masver=3.8
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -474,8 +474,8 @@ if not defined results (
|
|||||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||||
echo:
|
echo:
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
)
|
)
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
@ -1513,10 +1513,10 @@ reg unload HKU\!defname! %nul%
|
|||||||
|
|
||||||
if defined vnextexist (
|
if defined vnextexist (
|
||||||
echo:
|
echo:
|
||||||
call :dk_color %Gray% "Office vNext subscription detected:"
|
call :dk_color %Gray% "The logged-in Office account has a subscription license."
|
||||||
call :dk_color %Blue% "If active, this license overrides other activation methods."
|
call :dk_color %Blue% "If the subscription is active, it overrides other activation methods."
|
||||||
call :dk_color %Blue% "If expiring soon, rerun the script after expiration."
|
call :dk_color %Blue% "If it is expiring soon, rerun the activation script after it expires."
|
||||||
call :dk_color2 %Blue% "If expired and script activation fails, get help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "If it has already expired and activation fails, get help here - " %_Yellow% " %mas%troubleshoot"
|
||||||
echo:
|
echo:
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1859,6 +1859,11 @@ set spperror=%errorlevel%
|
|||||||
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
||||||
%eline%
|
%eline%
|
||||||
echo sc start %_slser% [Error Code: %spperror%]
|
echo sc start %_slser% [Error Code: %spperror%]
|
||||||
|
if %spperror% EQU 1053 (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||||
|
call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
@ -2155,6 +2160,13 @@ if %_wmic% EQU 1 wmic path Win32_ComputerSystem get CreationClassName /value %nu
|
|||||||
if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Object -Property CreationClassName" %nul2% | find /i "computersystem" %nul1%
|
if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Object -Property CreationClassName" %nul2% | find /i "computersystem" %nul1%
|
||||||
|
|
||||||
if %errorlevel% NEQ 0 set wmifailed=1
|
if %errorlevel% NEQ 0 set wmifailed=1
|
||||||
|
|
||||||
|
if %_wmic% EQU 1 wmic path %sps% get Version %nul%
|
||||||
|
if %_wmic% EQU 0 %psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
||||||
|
set error_code=%errorlevel%
|
||||||
|
cmd /c exit /b %error_code%
|
||||||
|
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||||
|
|
||||||
echo "%error_code%" | findstr /i "0x800410 0x800440 0x80131501" %nul1% && set wmifailed=1& :: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-error-constants
|
echo "%error_code%" | findstr /i "0x800410 0x800440 0x80131501" %nul1% && set wmifailed=1& :: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-error-constants
|
||||||
|
|
||||||
if defined wmifailed (
|
if defined wmifailed (
|
||||||
@ -2348,12 +2360,6 @@ set showfix=1
|
|||||||
|
|
||||||
:: Check SoftwareLicensingService
|
:: Check SoftwareLicensingService
|
||||||
|
|
||||||
if %_wmic% EQU 1 wmic path %sps% get Version %nul%
|
|
||||||
if %_wmic% EQU 0 %psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
|
||||||
set error_code=%errorlevel%
|
|
||||||
cmd /c exit /b %error_code%
|
|
||||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
|
||||||
|
|
||||||
if %error_code% NEQ 0 (
|
if %error_code% NEQ 0 (
|
||||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
@ -2500,7 +2506,9 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||||||
|
|
||||||
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
||||||
|
|
||||||
if exist "%SysPath%\wlms\wlms.exe" (
|
sc query wlms %nul%
|
||||||
|
|
||||||
|
if %errorlevel% NEQ 1060 (
|
||||||
echo Checking Eval WLMS Service [Found]
|
echo Checking Eval WLMS Service [Found]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.7
|
@set masver=3.8
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -536,8 +536,8 @@ if not defined results (
|
|||||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||||
echo:
|
echo:
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
)
|
)
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
@ -655,7 +655,7 @@ set altedition=
|
|||||||
call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
if defined allapps call :ksdata winkey
|
if defined allapps call :ksdata winkey
|
||||||
if not defined key call :k_gvlk %nul%
|
if not defined key call :k_gvlk %nul%
|
||||||
if defined allapps if not defined key call :kms38fallback
|
if defined allapps if not defined key call :kmsfallback
|
||||||
|
|
||||||
if defined altkey (set key=%altkey%&set changekey=1)
|
if defined altkey (set key=%altkey%&set changekey=1)
|
||||||
|
|
||||||
@ -1491,10 +1491,10 @@ reg unload HKU\!defname! %nul%
|
|||||||
|
|
||||||
if defined vnextexist (
|
if defined vnextexist (
|
||||||
echo:
|
echo:
|
||||||
call :dk_color %Gray% "Office vNext subscription detected:"
|
call :dk_color %Gray% "The logged-in Office account has a subscription license."
|
||||||
call :dk_color %Blue% "If active, this license overrides other activation methods."
|
call :dk_color %Blue% "If the subscription is active, it overrides other activation methods."
|
||||||
call :dk_color %Blue% "If expiring soon, rerun the script after expiration."
|
call :dk_color %Blue% "If it is expiring soon, rerun the activation script after it expires."
|
||||||
call :dk_color2 %Blue% "If expired and script activation fails, get help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "If it has already expired and activation fails, get help here - " %_Yellow% " %mas%troubleshoot"
|
||||||
echo:
|
echo:
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -2862,6 +2862,11 @@ set spperror=%errorlevel%
|
|||||||
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
||||||
%eline%
|
%eline%
|
||||||
echo sc start %_slser% [Error Code: %spperror%]
|
echo sc start %_slser% [Error Code: %spperror%]
|
||||||
|
if %spperror% EQU 1053 (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||||
|
call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
@ -3218,6 +3223,13 @@ if %_wmic% EQU 1 wmic path Win32_ComputerSystem get CreationClassName /value %nu
|
|||||||
if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Object -Property CreationClassName" %nul2% | find /i "computersystem" %nul1%
|
if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Object -Property CreationClassName" %nul2% | find /i "computersystem" %nul1%
|
||||||
|
|
||||||
if %errorlevel% NEQ 0 set wmifailed=1
|
if %errorlevel% NEQ 0 set wmifailed=1
|
||||||
|
|
||||||
|
if %_wmic% EQU 1 wmic path %sps% get Version %nul%
|
||||||
|
if %_wmic% EQU 0 %psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
||||||
|
set error_code=%errorlevel%
|
||||||
|
cmd /c exit /b %error_code%
|
||||||
|
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||||
|
|
||||||
echo "%error_code%" | findstr /i "0x800410 0x800440 0x80131501" %nul1% && set wmifailed=1& :: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-error-constants
|
echo "%error_code%" | findstr /i "0x800410 0x800440 0x80131501" %nul1% && set wmifailed=1& :: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-error-constants
|
||||||
|
|
||||||
if defined wmifailed (
|
if defined wmifailed (
|
||||||
@ -3411,12 +3423,6 @@ set showfix=1
|
|||||||
|
|
||||||
:: Check SoftwareLicensingService
|
:: Check SoftwareLicensingService
|
||||||
|
|
||||||
if %_wmic% EQU 1 wmic path %sps% get Version %nul%
|
|
||||||
if %_wmic% EQU 0 %psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
|
||||||
set error_code=%errorlevel%
|
|
||||||
cmd /c exit /b %error_code%
|
|
||||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
|
||||||
|
|
||||||
if %error_code% NEQ 0 (
|
if %error_code% NEQ 0 (
|
||||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
@ -3563,7 +3569,9 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||||||
|
|
||||||
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
||||||
|
|
||||||
if exist "%SysPath%\wlms\wlms.exe" (
|
sc query wlms %nul%
|
||||||
|
|
||||||
|
if %errorlevel% NEQ 1060 (
|
||||||
echo Checking Eval WLMS Service [Found]
|
echo Checking Eval WLMS Service [Found]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -4220,7 +4228,7 @@ exit /b
|
|||||||
:: Separator = _
|
:: Separator = _
|
||||||
|
|
||||||
|
|
||||||
:kms38fallback
|
:kmsfallback
|
||||||
|
|
||||||
set notfoundaltactID=
|
set notfoundaltactID=
|
||||||
if %_NoEditionChange%==1 exit /b
|
if %_NoEditionChange%==1 exit /b
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.7
|
@set masver=3.8
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -606,8 +606,8 @@ if not defined results (
|
|||||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||||
echo:
|
echo:
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
)
|
)
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
@ -1112,12 +1112,17 @@ if exist "%SystemRoot%\Servicing\Packages\WinEmb-Branding-Embedded-Standard-Pack
|
|||||||
)
|
)
|
||||||
if not defined allapps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f
|
if not defined allapps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
|
|
||||||
set w10EsuEditions=Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh
|
set w10EsuEditions=Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN
|
||||||
|
|
||||||
|
set minbuild=0
|
||||||
|
if /i %tsedition%==ServerRdsh set minbuild=5552
|
||||||
|
for %%# in (Core CoreN CoreCountrySpecific CoreSingleLanguage) do (if /i %tsedition%==%%# set minbuild=6156)
|
||||||
|
if /i %tsedition%==PPIPro set minbuild=6388
|
||||||
|
|
||||||
set /a UBR=0
|
set /a UBR=0
|
||||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v UBR %nul6%') do if not errorlevel 1 set /a UBR=%%b
|
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v UBR %nul6%') do if not errorlevel 1 set /a UBR=%%b
|
||||||
if %winbuild% EQU 19045 if %UBR% GEQ 6156 (
|
if %winbuild% EQU 19045 if %minbuild% GTR 0 if %UBR% GEQ %minbuild% (
|
||||||
set w10EsuEditionsLaterAdded=Core-CoreN-CoreCountrySpecific-CoreSingleLanguage-IoTEnterprise-
|
set w10EsuEditionsLaterAdded=%tsedition%-
|
||||||
)
|
)
|
||||||
|
|
||||||
if not defined isThinpc if not defined isltsc for %%# in (
|
if not defined isThinpc if not defined isltsc for %%# in (
|
||||||
@ -1867,14 +1872,14 @@ $filteredResults = $results | Where-Object {
|
|||||||
$true
|
$true
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_.Name -notlike "*CountrySpecific*"
|
$_.Name -like "*ESU*" -or $_.Name -notlike "*CountrySpecific*"
|
||||||
}
|
}
|
||||||
} | Where-Object {
|
} | Where-Object {
|
||||||
if ($env:tsedition -like "*CloudEdition*") {
|
if ($env:tsedition -like "*CloudEdition*") {
|
||||||
$true
|
$true
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_.Name -notlike "*CloudEdition*"
|
$_.Name -like "*ESU*" -or $_.Name -notlike "*CloudEdition*"
|
||||||
}
|
}
|
||||||
} | Where-Object {
|
} | Where-Object {
|
||||||
$_.Name -like "*CountrySpecific*" -or (IsMuiNotLocked $_.ID)
|
$_.Name -like "*CountrySpecific*" -or (IsMuiNotLocked $_.ID)
|
||||||
@ -1948,22 +1953,26 @@ if %_actman%==0 (if not defined showfix call :dk_color %Blue% "%_fixmsg%")
|
|||||||
set fixes=%fixes% %mas%troubleshoot
|
set fixes=%fixes% %mas%troubleshoot
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||||
) else (
|
) else (
|
||||||
if /i %tsmethod%==KMS4k if %winbuild% GEQ 26200 (
|
if /i %tsmethod%==KMS4k if %winbuild% GEQ 26100 (
|
||||||
echo:
|
echo:
|
||||||
call :dk_color %Gray% "In Windows settings, you may see a renewal notification for activation that can be ignored."
|
call :dk_color %Gray% "In Windows settings, you may see a renewal notification for activation that can be ignored."
|
||||||
if /i %_actmethod%==Auto call :dk_color %Gray% "To avoid this notification, run the script with an internet connection to use the StaticCID method."
|
if /i %_actmethod%==Auto call :dk_color %Gray% "To avoid this notification, run the script with an internet connection to use the StaticCID method."
|
||||||
)
|
)
|
||||||
echo "%tsids%" | find /i "7e94be23-b161-4956-a682-146ab291774c" %nul1% && (
|
echo "%tsids%" | find /i "7e94be23-b161-4956-a682-146ab291774c" %nul1% && (
|
||||||
call :dk_color %Gray% "Windows Update can receive 1-3 years of ESU. 4-6 years ESU is not officially supported, but you can manually install updates."
|
call :dk_color %Gray% "Windows Update gets 1-3 years of ESU; 4-6 are unofficial but let you install Server 2008 R2 updates manually."
|
||||||
)
|
)
|
||||||
echo "%tsids%" | findstr /i "4afc620f-12a4-48ad-8015-2aebfbd6e47c 11be7019-a309-4763-9a09-091d1722ffe3" %nul1% && (
|
echo "%tsids%" | findstr /i "4afc620f-12a4-48ad-8015-2aebfbd6e47c 11be7019-a309-4763-9a09-091d1722ffe3" %nul1% && (
|
||||||
call :dk_color %Gray% "ESU is not officially supported on Windows 8.1, but you can manually install updates until Jan-2024."
|
call :dk_color %Gray% "ESU is not officially supported on Windows 8.1, but updates can be installed manually until January 2024."
|
||||||
)
|
)
|
||||||
echo "%tsids%" | findstr /i "0b533b5e-08b6-44f9-b885-c2de291ba456 f69e2d51-3bbd-4ddf-8da7-a145e9dca597" %nul1% && (
|
echo "%tsids%" | findstr /i "0b533b5e-08b6-44f9-b885-c2de291ba456 f69e2d51-3bbd-4ddf-8da7-a145e9dca597" %nul1% && (
|
||||||
call :dk_color %Gray% "Windows Update can receive 1-3 years of ESU. 4-6 years ESU is not officially supported, but it might be useful."
|
call :dk_color %Gray% "Windows Update gets 1-3 years of ESU; 4-6 are unofficial but may let you install LTSC updates manually."
|
||||||
|
if exist %SysPath%\ClipESUConsumer.exe (%SysPath%\ClipESUConsumer.exe -evaluateEligibility)
|
||||||
|
if exist %SysPath%\ClipESU.exe (%SysPath%\ClipESU.exe %nul%)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if defined esuexistsup echo Help: %mas%tsforge#windows-esu
|
||||||
|
|
||||||
if %_actwin%==1 for %%# in (407) do if %osSKU%==%%# (
|
if %_actwin%==1 for %%# in (407) do if %osSKU%==%%# (
|
||||||
call :dk_color %Red% "%winos% does not support activation on non-azure platforms."
|
call :dk_color %Red% "%winos% does not support activation on non-azure platforms."
|
||||||
)
|
)
|
||||||
@ -2449,10 +2458,10 @@ reg unload HKU\!defname! %nul%
|
|||||||
|
|
||||||
if defined vnextexist (
|
if defined vnextexist (
|
||||||
echo:
|
echo:
|
||||||
call :dk_color %Gray% "Office vNext subscription detected:"
|
call :dk_color %Gray% "The logged-in Office account has a subscription license."
|
||||||
call :dk_color %Blue% "If active, this license overrides other activation methods."
|
call :dk_color %Blue% "If the subscription is active, it overrides other activation methods."
|
||||||
call :dk_color %Blue% "If expiring soon, rerun the script after expiration."
|
call :dk_color %Blue% "If it is expiring soon, rerun the activation script after it expires."
|
||||||
call :dk_color2 %Blue% "If expired and script activation fails, get help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "If it has already expired and activation fails, get help here - " %_Yellow% " %mas%troubleshoot"
|
||||||
echo:
|
echo:
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -2912,6 +2921,11 @@ set spperror=%errorlevel%
|
|||||||
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
||||||
%eline%
|
%eline%
|
||||||
echo sc start %_slser% [Error Code: %spperror%]
|
echo sc start %_slser% [Error Code: %spperror%]
|
||||||
|
if %spperror% EQU 1053 (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||||
|
call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
@ -3223,6 +3237,13 @@ if %_wmic% EQU 1 wmic path Win32_ComputerSystem get CreationClassName /value %nu
|
|||||||
if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Object -Property CreationClassName" %nul2% | find /i "computersystem" %nul1%
|
if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Object -Property CreationClassName" %nul2% | find /i "computersystem" %nul1%
|
||||||
|
|
||||||
if %errorlevel% NEQ 0 set wmifailed=1
|
if %errorlevel% NEQ 0 set wmifailed=1
|
||||||
|
|
||||||
|
if %_wmic% EQU 1 wmic path %sps% get Version %nul%
|
||||||
|
if %_wmic% EQU 0 %psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
||||||
|
set error_code=%errorlevel%
|
||||||
|
cmd /c exit /b %error_code%
|
||||||
|
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||||
|
|
||||||
echo "%error_code%" | findstr /i "0x800410 0x800440 0x80131501" %nul1% && set wmifailed=1& :: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-error-constants
|
echo "%error_code%" | findstr /i "0x800410 0x800440 0x80131501" %nul1% && set wmifailed=1& :: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-error-constants
|
||||||
|
|
||||||
if defined wmifailed (
|
if defined wmifailed (
|
||||||
@ -3416,12 +3437,6 @@ set showfix=1
|
|||||||
|
|
||||||
:: Check SoftwareLicensingService
|
:: Check SoftwareLicensingService
|
||||||
|
|
||||||
if %_wmic% EQU 1 wmic path %sps% get Version %nul%
|
|
||||||
if %_wmic% EQU 0 %psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
|
||||||
set error_code=%errorlevel%
|
|
||||||
cmd /c exit /b %error_code%
|
|
||||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
|
||||||
|
|
||||||
if %error_code% NEQ 0 (
|
if %error_code% NEQ 0 (
|
||||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
@ -3568,7 +3583,9 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||||||
|
|
||||||
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
||||||
|
|
||||||
if exist "%SysPath%\wlms\wlms.exe" (
|
sc query wlms %nul%
|
||||||
|
|
||||||
|
if %errorlevel% NEQ 1060 (
|
||||||
echo Checking Eval WLMS Service [Found]
|
echo Checking Eval WLMS Service [Found]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -8837,6 +8854,7 @@ namespace LibTSforge.PhysicalStore
|
|||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
$binPath = "$env:_work\BIN\LibTSforge.dll"
|
$binPath = "$env:_work\BIN\LibTSforge.dll"
|
||||||
$psMajorVer = (Get-Host).Version.Major
|
$psMajorVer = (Get-Host).Version.Major
|
||||||
|
$build = [System.Environment]::OSVersion.Version.Build
|
||||||
|
|
||||||
if (Test-Path -LiteralPath $binPath) {
|
if (Test-Path -LiteralPath $binPath) {
|
||||||
Write-Host "LibTSforge.dll found in BIN folder. Loading the DLL..."
|
Write-Host "LibTSforge.dll found in BIN folder. Loading the DLL..."
|
||||||
@ -8935,7 +8953,12 @@ if (-not $env:resetstuff) {
|
|||||||
}
|
}
|
||||||
if ($env:tsmethod -eq "KMS4k") {
|
if ($env:tsmethod -eq "KMS4k") {
|
||||||
$GracePeriodStatus = Get-WmiInfo -tsactid $tsactid -property "GracePeriodRemaining"
|
$GracePeriodStatus = Get-WmiInfo -tsactid $tsactid -property "GracePeriodRemaining"
|
||||||
if ($GracePeriodStatus -gt 259200) { $activated = 1 }
|
if ($GracePeriodStatus -eq 259200 -or ([datetime]::Now.AddMinutes($GracePeriodStatus)).Year -gt 2038) {
|
||||||
|
if ((($build -ge 26100 -and $GracePeriodStatus -ge 259200) -or
|
||||||
|
($build -lt 26100 -and $GracePeriodStatus -gt 259200))) {
|
||||||
|
$activated = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus"
|
$licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus"
|
||||||
@ -8949,8 +8972,14 @@ if (-not $env:resetstuff) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($env:tsmethod -eq "KMS4k") {
|
if ($env:tsmethod -eq "KMS4k") {
|
||||||
|
if ($build -ge 26100) {
|
||||||
|
Write-Host "[$prodName] is activated with KMS4k for over 4,000 years." -ForegroundColor White -BackgroundColor DarkGreen
|
||||||
|
Write-Host "From build 26100.7019, Windows will always display and stay at 180 days remaining if the actual period is longer." -ForegroundColor White -BackgroundColor Darkgray
|
||||||
|
}
|
||||||
|
else {
|
||||||
Write-Host "[$prodName] is activated till $([DateTime]::Now.AddMinutes($GracePeriodStatus).ToString('yyyy-MM-dd HH:mm:ss')) with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen
|
Write-Host "[$prodName] is activated till $([DateTime]::Now.AddMinutes($GracePeriodStatus).ToString('yyyy-MM-dd HH:mm:ss')) with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
Write-Host "[$prodName] is permanently activated with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen
|
Write-Host "[$prodName] is permanently activated with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Activation Type Supported Product Activation Period
|
|||||||
HWID - Windows 10-11 - Permanent
|
HWID - Windows 10-11 - Permanent
|
||||||
Ohook - Office - Permanent
|
Ohook - Office - Permanent
|
||||||
TSforge - Windows / ESU / Office - Permanent
|
TSforge - Windows / ESU / Office - Permanent
|
||||||
KMS38 - Windows 10-11-Server - Till the Year 2038
|
|
||||||
Online KMS - Windows / Office - 180 Days. Lifetime With Renewal Task
|
Online KMS - Windows / Office - 180 Days. Lifetime With Renewal Task
|
||||||
|
|
||||||
--------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.7
|
@set masver=3.8
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -1618,6 +1618,11 @@ set spperror=%errorlevel%
|
|||||||
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
||||||
%eline%
|
%eline%
|
||||||
echo sc start %_slser% [Error Code: %spperror%]
|
echo sc start %_slser% [Error Code: %spperror%]
|
||||||
|
if %spperror% EQU 1053 (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||||
|
call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.7
|
@set masver=3.8
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -400,8 +400,8 @@ echo:
|
|||||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||||
echo:
|
echo:
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -547,7 +547,11 @@ echo:
|
|||||||
|
|
||||||
for %%A in (%_ntarget%) do (
|
for %%A in (%_ntarget%) do (
|
||||||
set /a counter+=1
|
set /a counter+=1
|
||||||
|
if /i %%A==IoTEnterprise (
|
||||||
|
echo [!counter!] %%A [GAC, not LTSC]
|
||||||
|
) else (
|
||||||
echo [!counter!] %%A
|
echo [!counter!] %%A
|
||||||
|
)
|
||||||
set targetedition!counter!=%%A
|
set targetedition!counter!=%%A
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -600,7 +604,7 @@ set _dismapi=1
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
set "keyflow=Retail Volume:GVLK Volume:MAK OEM:NONSLP OEM:DM PGS:TB Retail:TB:Eval"
|
set "keyflow=Retail OEM:NONSLP OEM:DM Volume:MAK Volume:GVLK PGS:TB Retail:TB:Eval"
|
||||||
|
|
||||||
call :ced_targetSKU %targetedition%
|
call :ced_targetSKU %targetedition%
|
||||||
if defined targetSKU call :ced_windowskey
|
if defined targetSKU call :ced_windowskey
|
||||||
@ -968,6 +972,11 @@ set spperror=%errorlevel%
|
|||||||
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
||||||
%eline%
|
%eline%
|
||||||
echo sc start %_slser% [Error Code: %spperror%]
|
echo sc start %_slser% [Error Code: %spperror%]
|
||||||
|
if %spperror% EQU 1053 (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||||
|
call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
|
|||||||
@ -518,6 +518,7 @@ function DetectSubscription {
|
|||||||
function DetectAdbaClient
|
function DetectAdbaClient
|
||||||
{
|
{
|
||||||
$propADBA | foreach { set $_ (SlGetInfoSku $licID $_) }
|
$propADBA | foreach { set $_ (SlGetInfoSku $licID $_) }
|
||||||
|
DetectActType
|
||||||
CONOUT "`nAD Activation client information:"
|
CONOUT "`nAD Activation client information:"
|
||||||
CONOUT " Object Name: $ADActivationObjectName"
|
CONOUT " Object Name: $ADActivationObjectName"
|
||||||
CONOUT " Domain Name: $ADActivationObjectDN"
|
CONOUT " Domain Name: $ADActivationObjectDN"
|
||||||
@ -608,17 +609,18 @@ function DetectKmsHost
|
|||||||
if ($null -NE $KeyManagementServiceNotificationRequests) {CONOUT " Notification: $KeyManagementServiceNotificationRequests"}
|
if ($null -NE $KeyManagementServiceNotificationRequests) {CONOUT " Notification: $KeyManagementServiceNotificationRequests"}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DetectKmsClient
|
function DetectActType
|
||||||
{
|
|
||||||
if ($win8)
|
|
||||||
{
|
{
|
||||||
$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp + '\' + $licID) "VLActivationType"
|
$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp + '\' + $licID) "VLActivationType"
|
||||||
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp) "VLActivationType"}
|
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp) "VLActivationType"}
|
||||||
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath) "VLActivationType"}
|
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath) "VLActivationType"}
|
||||||
if ($null -EQ $VLType -Or $VLType -GT 3) {$VLType = 0}
|
if ($null -EQ $VLType -Or $VLType -GT 3) {$VLType = 0}
|
||||||
}
|
|
||||||
if ($null -NE $VLType) {CONOUT "Configured Activation Type: $($VLActTypes[$VLType])"}
|
if ($null -NE $VLType) {CONOUT "Configured Activation Type: $($VLActTypes[$VLType])"}
|
||||||
|
}
|
||||||
|
|
||||||
|
function DetectKmsClient
|
||||||
|
{
|
||||||
|
if ($win8) {DetectActType}
|
||||||
CONOUT "`r"
|
CONOUT "`r"
|
||||||
if ($LicenseStatus -NE 1) {
|
if ($LicenseStatus -NE 1) {
|
||||||
CONOUT "Please activate the product in order to update KMS client information values."
|
CONOUT "Please activate the product in order to update KMS client information values."
|
||||||
@ -866,6 +868,7 @@ function GetResult($strSLP, $strApp, $entry)
|
|||||||
|
|
||||||
if ($win8 -And $VLActivationType -EQ 1) {
|
if ($win8 -And $VLActivationType -EQ 1) {
|
||||||
DetectAdbaClient
|
DetectAdbaClient
|
||||||
|
$cKmsClient = $null
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($winID -And $null -NE $cAvmClient) {
|
if ($winID -And $null -NE $cAvmClient) {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.7
|
@set masver=3.8
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -406,7 +406,6 @@ goto done2
|
|||||||
)
|
)
|
||||||
|
|
||||||
set HWID_Activation.cmd=Activators\HWID_Activation.cmd
|
set HWID_Activation.cmd=Activators\HWID_Activation.cmd
|
||||||
set KMS38_Activation.cmd=Activators\KMS38_Activation.cmd
|
|
||||||
set Online_KMS_Activation.cmd=Activators\Online_KMS_Activation.cmd
|
set Online_KMS_Activation.cmd=Activators\Online_KMS_Activation.cmd
|
||||||
set Ohook_Activation_AIO.cmd=Activators\Ohook_Activation_AIO.cmd
|
set Ohook_Activation_AIO.cmd=Activators\Ohook_Activation_AIO.cmd
|
||||||
set TSforge_Activation.cmd=Activators\TSforge_Activation.cmd
|
set TSforge_Activation.cmd=Activators\TSforge_Activation.cmd
|
||||||
@ -415,7 +414,6 @@ pushd "!_work!"
|
|||||||
set _nofile=
|
set _nofile=
|
||||||
for %%# in (
|
for %%# in (
|
||||||
%HWID_Activation.cmd%
|
%HWID_Activation.cmd%
|
||||||
%KMS38_Activation.cmd%
|
|
||||||
%Online_KMS_Activation.cmd%
|
%Online_KMS_Activation.cmd%
|
||||||
%Ohook_Activation_AIO.cmd%
|
%Ohook_Activation_AIO.cmd%
|
||||||
%TSforge_Activation.cmd%
|
%TSforge_Activation.cmd%
|
||||||
@ -449,28 +447,26 @@ echo:
|
|||||||
echo: [1] HWID [Windows]
|
echo: [1] HWID [Windows]
|
||||||
echo: [2] Ohook [Office]
|
echo: [2] Ohook [Office]
|
||||||
echo: [3] TSforge [Windows / ESU / Office]
|
echo: [3] TSforge [Windows / ESU / Office]
|
||||||
echo: [4] KMS38 [Windows]
|
echo: [4] Online KMS [Windows / Office]
|
||||||
echo: [5] Online KMS [Windows / Office]
|
|
||||||
echo:
|
echo:
|
||||||
echo: [6] HWID [Windows] ^+ Ohook [Office]
|
echo: [5] HWID [Windows] ^+ Ohook [Office]
|
||||||
echo: [7] HWID [Windows] ^+ Ohook [Office] ^+ TSforge [ESU]
|
echo: [6] HWID [Windows] ^+ Ohook [Office] ^+ TSforge [ESU]
|
||||||
echo: [8] TSforge [Windows] ^+ Online KMS [Office]
|
echo: [7] TSforge [Windows / ESU] ^+ Ohook [Office]
|
||||||
echo:
|
echo:
|
||||||
call :dk_color2 %_White% " [R] " %_Green% "ReadMe"
|
call :dk_color2 %_White% " [R] " %_Green% "ReadMe"
|
||||||
echo: [0] Exit
|
echo: [0] Exit
|
||||||
echo: ____________________________________________________________
|
echo: ____________________________________________________________
|
||||||
echo:
|
echo:
|
||||||
call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard :"
|
call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard :"
|
||||||
choice /C:12345678R0 /N
|
choice /C:1234567R0 /N
|
||||||
set _erl=%errorlevel%
|
set _erl=%errorlevel%
|
||||||
|
|
||||||
if %_erl%==10 exit /b
|
if %_erl%==9 exit /b
|
||||||
if %_erl%==9 start %mas%oem-folder &goto :Menu
|
if %_erl%==8 start %mas%oem-folder &goto :Menu
|
||||||
if %_erl%==8 goto:tsforge_kms
|
if %_erl%==7 goto:tsforge_ohook
|
||||||
if %_erl%==7 goto:hwid_ohook_tsforge
|
if %_erl%==6 goto:hwid_ohook_tsforge
|
||||||
if %_erl%==6 goto:hwid_ohook
|
if %_erl%==5 goto:hwid_ohook
|
||||||
if %_erl%==5 goto:kms
|
if %_erl%==4 goto:kms
|
||||||
if %_erl%==4 goto:kms38
|
|
||||||
if %_erl%==3 goto:tsforge
|
if %_erl%==3 goto:tsforge
|
||||||
if %_erl%==2 goto:ohook
|
if %_erl%==2 goto:ohook
|
||||||
if %_erl%==1 goto:hwid
|
if %_erl%==1 goto:hwid
|
||||||
@ -568,36 +564,6 @@ cd \
|
|||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
:kms38
|
|
||||||
|
|
||||||
cls
|
|
||||||
md "!desktop!\$OEM$\$$\Setup\Scripts"
|
|
||||||
pushd "!_work!"
|
|
||||||
copy /y /b "%KMS38_Activation.cmd%" "!_dir!\KMS38_Activation.cmd" %nul%
|
|
||||||
popd
|
|
||||||
call :export kms38_setup
|
|
||||||
|
|
||||||
set _error=
|
|
||||||
if not exist "!_dir!\KMS38_Activation.cmd" set _error=1
|
|
||||||
if not exist "!_dir!\SetupComplete.cmd" set _error=1
|
|
||||||
if defined _error goto errorfound
|
|
||||||
|
|
||||||
set oem=KMS38
|
|
||||||
goto done
|
|
||||||
|
|
||||||
:kms38_setup:
|
|
||||||
@echo off
|
|
||||||
|
|
||||||
fltmc >nul || exit /b
|
|
||||||
|
|
||||||
call "%~dp0KMS38_Activation.cmd" /KMS38
|
|
||||||
|
|
||||||
cd \
|
|
||||||
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
|
|
||||||
:kms38_setup:
|
|
||||||
|
|
||||||
::========================================================================================================================================
|
|
||||||
|
|
||||||
:kms
|
:kms
|
||||||
|
|
||||||
cls
|
cls
|
||||||
@ -710,41 +676,41 @@ cd \
|
|||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
:tsforge_kms
|
:tsforge_ohook
|
||||||
|
|
||||||
cls
|
cls
|
||||||
md "!desktop!\$OEM$\$$\Setup\Scripts"
|
md "!desktop!\$OEM$\$$\Setup\Scripts"
|
||||||
pushd "!_work!"
|
pushd "!_work!"
|
||||||
copy /y /b "%TSforge_Activation.cmd%" "!_dir!\TSforge_Activation.cmd" %nul%
|
copy /y /b "%TSforge_Activation.cmd%" "!_dir!\TSforge_Activation.cmd" %nul%
|
||||||
copy /y /b "%Online_KMS_Activation.cmd%" "!_dir!\Online_KMS_Activation.cmd" %nul%
|
copy /y /b "%Ohook_Activation_AIO.cmd%" "!_dir!\Ohook_Activation_AIO.cmd" %nul%
|
||||||
popd
|
popd
|
||||||
call :export tsforge_kms_setup
|
call :export tsforge_ohook_setup
|
||||||
|
|
||||||
set _error=
|
set _error=
|
||||||
if not exist "!_dir!\TSforge_Activation.cmd" set _error=1
|
if not exist "!_dir!\TSforge_Activation.cmd" set _error=1
|
||||||
if not exist "!_dir!\Online_KMS_Activation.cmd" set _error=1
|
if not exist "!_dir!\Ohook_Activation_AIO.cmd" set _error=1
|
||||||
if not exist "!_dir!\SetupComplete.cmd" set _error=1
|
if not exist "!_dir!\SetupComplete.cmd" set _error=1
|
||||||
if defined _error goto errorfound
|
if defined _error goto errorfound
|
||||||
|
|
||||||
set oem=TSforge [Windows] + Online KMS [Office]
|
set oem=TSforge [Windows / ESU] + Ohook [Office]
|
||||||
goto done
|
goto done
|
||||||
|
|
||||||
:tsforge_kms_setup:
|
:tsforge_ohook_setup:
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
fltmc >nul || exit /b
|
fltmc >nul || exit /b
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
call "%~dp0TSforge_Activation.cmd" /Z-Windows
|
call "%~dp0TSforge_Activation.cmd" /Z-Windows /Z-ESU
|
||||||
endlocal
|
endlocal
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
call "%~dp0Online_KMS_Activation.cmd" /K-Office
|
call "%~dp0Ohook_Activation_AIO.cmd" /Ohook
|
||||||
endlocal
|
endlocal
|
||||||
|
|
||||||
cd \
|
cd \
|
||||||
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
|
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
|
||||||
:tsforge_kms_setup:
|
:tsforge_ohook_setup:
|
||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
@ -760,11 +726,6 @@ echo ______________________________________________________________
|
|||||||
echo:
|
echo:
|
||||||
call :dk_color %Blue% "%oem%"
|
call :dk_color %Blue% "%oem%"
|
||||||
call :dk_color %Green% "$OEM$ folder was successfully created on your Desktop."
|
call :dk_color %Green% "$OEM$ folder was successfully created on your Desktop."
|
||||||
echo "%oem%" | find /i "38" %nul% && (
|
|
||||||
echo:
|
|
||||||
echo To KMS38 activate Server Cor/Acor editions [No GUI Versions],
|
|
||||||
echo Check this page %mas%oem-folder
|
|
||||||
)
|
|
||||||
echo ______________________________________________________________
|
echo ______________________________________________________________
|
||||||
|
|
||||||
:done2
|
:done2
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.7
|
@set masver=3.8
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -619,7 +619,7 @@ call :dk_color %Blue% "Rebuilding ClipSVC Licenses..."
|
|||||||
echo:
|
echo:
|
||||||
|
|
||||||
if %winbuild% LSS 10240 (
|
if %winbuild% LSS 10240 (
|
||||||
echo ClipSVC license rebuilding is supported only on Windows 10/11 and their Server equivalents.
|
echo ClipSVC license rebuilding is supported only on Windows 10/11.
|
||||||
echo Skipping...
|
echo Skipping...
|
||||||
goto :rebuildspptok
|
goto :rebuildspptok
|
||||||
)
|
)
|
||||||
@ -630,6 +630,40 @@ echo Skipping...
|
|||||||
goto :rebuildspptok
|
goto :rebuildspptok
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set _partial=
|
||||||
|
set _keymatch=
|
||||||
|
for /f "tokens=2 delims==" %%# in ('%psc% "(([WMISEARCHER]'SELECT PartialProductKey FROM SoftwareLicensingProduct WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).PartialProductKey | %% {echo ('PartialProductKey='+$_)}" %nul6%') do set "_partial=%%#"
|
||||||
|
for %%# in (8HV2C QPFCT 3V66T PKCKT WXCHW 8TYMD 6F4BT 8HVX7 KD72Y 7CFBY DRR8H P39PB DYJWX MDWWW 9HKR4 M7V2X 2YV77 WT2RQ MHBPB QPF8P 2YV66 VMJ2C DJ4F6 CKFFD YY74H J8JXD BHDCD T6R4W D32MH RRK69 3PJBP) do if /i "%_partial%"=="%%#" set _keymatch=1
|
||||||
|
|
||||||
|
if not defined _keymatch (
|
||||||
|
echo HWID activation key is not installed.
|
||||||
|
echo Skipping...
|
||||||
|
goto :rebuildspptok
|
||||||
|
)
|
||||||
|
|
||||||
|
%psc% "If([Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]'{DCB00C01-570F-4A9B-8D69-199FDBA5723B}')).IsConnectedToInternet){Exit 0}Else{Exit 1}"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo Internet is not connected.
|
||||||
|
echo Skipping...
|
||||||
|
goto :rebuildspptok
|
||||||
|
)
|
||||||
|
|
||||||
|
set resfail=
|
||||||
|
for %%# in (
|
||||||
|
licensing.mp.microsoft.com/v7.0/licenses/content
|
||||||
|
login.live.com/ppsecure/deviceaddcredential.srf
|
||||||
|
purchase.mp.microsoft.com/v7.0/users/me/orders
|
||||||
|
) do if not defined resfail (
|
||||||
|
%psc% "try { [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; irm https://%%# -Method POST } catch { if ($_.Exception.Response -eq $null) { Write-Host """"[%%#] $($_.Exception.Message)"""" -ForegroundColor Red -BackgroundColor Black; exit 3 } }"
|
||||||
|
if !errorlevel!==3 set resfail=1
|
||||||
|
)
|
||||||
|
|
||||||
|
if defined resfail (
|
||||||
|
echo Failed to connect to licensing servers.
|
||||||
|
echo Skipping...
|
||||||
|
goto :rebuildspptok
|
||||||
|
)
|
||||||
|
|
||||||
echo Stopping ClipSVC service...
|
echo Stopping ClipSVC service...
|
||||||
%psc% Stop-Service ClipSVC -force %nul%
|
%psc% Stop-Service ClipSVC -force %nul%
|
||||||
timeout /t 2 %nul%
|
timeout /t 2 %nul%
|
||||||
@ -945,8 +979,8 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\16.0\Common\InstallRoot /v P
|
|||||||
|
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\15.0\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" (set "c2r15_86=Office 15.0 C2R x86" & call :getc2rrepair c2r15repair86 integratedoffice.exe)
|
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\15.0\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" (set "c2r15_86=Office 15.0 C2R x86" & call :getc2rrepair c2r15repair86 integratedoffice.exe)
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\15.0\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" (set "c2r15_68=Office 15.0 C2R x86/x64" & call :getc2rrepair c2r15repair68 integratedoffice.exe)
|
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\15.0\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" (set "c2r15_68=Office 15.0 C2R x86/x64" & call :getc2rrepair c2r15repair68 integratedoffice.exe)
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" (set "c2r16_86=Office 16.0 C2R x86" & call :getc2rrepair c2r16repair86 OfficeClickToRun.exe)
|
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" (set "c2r16_86=Office 16.0 C2R x86" & call :getc2r16repair c2r16repair86 OfficeClickToRun.exe)
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" (set "c2r16_68=Office 16.0 C2R x86/x64" & call :getc2rrepair c2r16repair68 OfficeClickToRun.exe)
|
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" (set "c2r16_68=Office 16.0 C2R x86/x64" & call :getc2r16repair c2r16repair68 OfficeClickToRun.exe)
|
||||||
|
|
||||||
set uwp16=
|
set uwp16=
|
||||||
if %winbuild% GEQ 10240 (
|
if %winbuild% GEQ 10240 (
|
||||||
@ -988,13 +1022,11 @@ echo ________________________________________________________________
|
|||||||
echo:
|
echo:
|
||||||
)
|
)
|
||||||
|
|
||||||
if %counter% EQU 0 (
|
|
||||||
echo:
|
echo:
|
||||||
|
if %counter% EQU 0 (
|
||||||
echo Office ^(2010 and later^) is not installed.
|
echo Office ^(2010 and later^) is not installed.
|
||||||
goto :repairend
|
goto :repairend
|
||||||
echo:
|
) else if not defined c2r16_68 if not defined c2r16_86 (
|
||||||
) else (
|
|
||||||
echo:
|
|
||||||
call :dk_color %_Yellow% "A new window will appear, in that window you need to select [Quick Repair] option."
|
call :dk_color %_Yellow% "A new window will appear, in that window you need to select [Quick Repair] option."
|
||||||
if defined terminal (
|
if defined terminal (
|
||||||
call :dk_color %_Yellow% "Press [0] to continue..."
|
call :dk_color %_Yellow% "Press [0] to continue..."
|
||||||
@ -1029,8 +1061,8 @@ if defined msi16_68 if exist "%msi16repair68%" echo Running - "%msi16repair68%"
|
|||||||
if defined msi16_86 if exist "%msi16repair86%" echo Running - "%msi16repair86%" & "%msi16repair86%"
|
if defined msi16_86 if exist "%msi16repair86%" echo Running - "%msi16repair86%" & "%msi16repair86%"
|
||||||
if defined c2r15_68 if exist "%c2r15repair68%" echo Running - "%c2r15repair68%" REPAIRUI RERUNMODE & "%c2r15repair68%" REPAIRUI RERUNMODE
|
if defined c2r15_68 if exist "%c2r15repair68%" echo Running - "%c2r15repair68%" REPAIRUI RERUNMODE & "%c2r15repair68%" REPAIRUI RERUNMODE
|
||||||
if defined c2r15_86 if exist "%c2r15repair86%" echo Running - "%c2r15repair86%" REPAIRUI RERUNMODE & "%c2r15repair86%" REPAIRUI RERUNMODE
|
if defined c2r15_86 if exist "%c2r15repair86%" echo Running - "%c2r15repair86%" REPAIRUI RERUNMODE & "%c2r15repair86%" REPAIRUI RERUNMODE
|
||||||
if defined c2r16_68 if exist "%c2r16repair68%" echo Running - "%c2r16repair68%" scenario=Repair & "%c2r16repair68%" scenario=Repair
|
if defined c2r16_68 if exist "%c2r16repair68%" echo Running - "%c2r16repair68%" Scenario=Repair RepairType=QuickRepair & "%c2r16repair68%" Scenario=Repair RepairType=QuickRepair
|
||||||
if defined c2r16_86 if exist "%c2r16repair86%" echo Running - "%c2r16repair86%" scenario=Repair & "%c2r16repair86%" scenario=Repair
|
if defined c2r16_86 if exist "%c2r16repair86%" echo Running - "%c2r16repair86%" Scenario=Repair RepairType=QuickRepair & "%c2r16repair86%" Scenario=Repair RepairType=QuickRepair
|
||||||
|
|
||||||
:repairend
|
:repairend
|
||||||
|
|
||||||
@ -1050,6 +1082,13 @@ set "%1=%systemdrive%\Program Files\Microsoft Office 15\Client%%#\%2"
|
|||||||
)
|
)
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
|
:getc2r16repair
|
||||||
|
|
||||||
|
for %%# in (%_68% %_86%) do (
|
||||||
|
for /f "skip=2 tokens=2*" %%a in ('"reg query %%#\ClickToRun\Configuration /v ClientFolder" %nul6%') do if exist "%%b\%2" (set "%1=%%b\%2")
|
||||||
|
)
|
||||||
|
exit /b
|
||||||
|
|
||||||
:getrepairsetup
|
:getrepairsetup
|
||||||
|
|
||||||
set "_common86=%systemdrive%\Program Files (x86)\Common Files\Microsoft Shared\OFFICE%2\Office Setup Controller\setup.exe"
|
set "_common86=%systemdrive%\Program Files (x86)\Common Files\Microsoft Shared\OFFICE%2\Office Setup Controller\setup.exe"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<h1 align="center">Microsoft Activation Scripts (MAS)</h1>
|
<h1 align="center">Microsoft Activation Scripts (MAS)</h1>
|
||||||
|
|
||||||
<p align="center">Open-source Windows and Office activator featuring HWID, Ohook, TSforge, KMS38, and Online KMS activation methods, along with advanced troubleshooting.</p>
|
<p align="center">Open-source Windows and Office activator featuring HWID, Ohook, TSforge, and Online KMS activation methods, along with advanced troubleshooting.</p>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
@ -63,8 +63,8 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
```
|
```
|
||||||
Latest Version: 3.7
|
Latest Version: 3.8
|
||||||
Release date: 11-Sep-2025
|
Release date: 11-Nov-2025
|
||||||
```
|
```
|
||||||
|
|
||||||
### [Troubleshooting / Help](https://massgrave.dev/troubleshoot)
|
### [Troubleshooting / Help](https://massgrave.dev/troubleshoot)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user