Compare commits

...

4 Commits

Author SHA1 Message Date
WindowsAddict
eeae1dd931 Add command to refresh ESU status 2025-11-11 22:08:51 +05:30
WindowsAddict
d16661cc87 Suggest inplace repair upgrade when system files are missing 2025-11-11 21:25:04 +05:30
WindowsAddict
1ee7cd1e60 Improve wording 2025-11-11 21:11:51 +05:30
WindowsAddict
55cc6d95d1 Add more conditions before rebuilding ClipSVC licenses 2025-11-11 16:58:07 +05:30
7 changed files with 118 additions and 44 deletions

View File

@ -719,8 +719,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
) )
@ -2577,8 +2577,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
) )
@ -3618,10 +3618,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:
) )
@ -4546,8 +4546,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
) )
@ -5899,16 +5899,19 @@ call :dk_color %Gray% "In Windows settings, you may see a renewal notification f
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 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."
) )
@ -12217,8 +12220,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
) )
@ -16263,7 +16266,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
) )
@ -16274,6 +16277,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%
@ -17202,8 +17239,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
) )
) )

View File

@ -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
) )

View File

@ -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:
) )

View File

@ -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
) )
@ -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:
) )

View File

@ -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
) )
@ -1959,16 +1959,19 @@ call :dk_color %Gray% "In Windows settings, you may see a renewal notification f
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 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."
) )
@ -2454,10 +2457,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:
) )

View File

@ -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
) )
) )

View File

@ -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%