summaryrefslogtreecommitdiff
path: root/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd
diff options
context:
space:
mode:
authorWindowsAddict <[email protected]>2025-11-12 04:32:26 +0530
committerWindowsAddict <[email protected]>2025-11-12 04:32:26 +0530
commit7f3372d778254884dadbb9041847cd5f9b3e0e28 (patch)
treea54e7c6a78616566dcff4d396a61bce86b30d373 /MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd
parentb064fc628a1e40738ac520f5e790895977817434 (diff)
parent4958ddf4744881b5b211a5b9ccd960018cca8710 (diff)
downloadMicrosoft-Activation-Scripts-7f3372d778254884dadbb9041847cd5f9b3e0e28.zip
Merge branch 'dev'
Diffstat (limited to 'MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd')
-rw-r--r--MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd40
1 files changed, 24 insertions, 16 deletions
diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd
index 0408baa..4ee3cbf 100644
--- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd
+++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd
@@ -1,4 +1,4 @@
-@set masver=3.7
+@set masver=3.8
@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% "After that, restart system and try activation again."
echo:
-set fixes=%fixes% %mas%troubleshoot
-call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
+set fixes=%fixes% %mas%in-place_repair_upgrade
+call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
)
goto dk_done
)
@@ -655,7 +655,7 @@ set altedition=
call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f
if defined allapps call :ksdata winkey
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)
@@ -1491,10 +1491,10 @@ reg unload HKU\!defname! %nul%
if defined vnextexist (
echo:
-call :dk_color %Gray% "Office vNext subscription detected:"
-call :dk_color %Blue% "If active, this license overrides other activation methods."
-call :dk_color %Blue% "If expiring soon, rerun the script after expiration."
-call :dk_color2 %Blue% "If expired and script activation fails, get help - " %_Yellow% " %mas%troubleshoot"
+call :dk_color %Gray% "The logged-in Office account has a subscription license."
+call :dk_color %Blue% "If the subscription is active, it overrides other activation methods."
+call :dk_color %Blue% "If it is expiring soon, rerun the activation script after it expires."
+call :dk_color2 %Blue% "If it has already expired and activation fails, get help here - " %_Yellow% " %mas%troubleshoot"
echo:
)
@@ -2862,6 +2862,11 @@ set spperror=%errorlevel%
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
%eline%
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:
@@ -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 %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
if defined wmifailed (
@@ -3411,12 +3423,6 @@ set showfix=1
:: 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 (
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
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.
-if exist "%SysPath%\wlms\wlms.exe" (
+sc query wlms %nul%
+
+if %errorlevel% NEQ 1060 (
echo Checking Eval WLMS Service [Found]
)
@@ -4220,7 +4228,7 @@ exit /b
:: Separator = _
-:kms38fallback
+:kmsfallback
set notfoundaltactID=
if %_NoEditionChange%==1 exit /b