From 82f7cfe5f4615b929710696cc815bb0e46fcb0e5 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 11 Nov 2025 04:15:09 +0530 Subject: Auto select Quick repair option for Office 16.0 C2R. Thanks to Yerong for the suggestion. --- MAS/Separate-Files-Version/Troubleshoot.cmd | 37 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index a6e17f5..3a6ca4e 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -945,8 +945,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 %_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 %_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 %_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 :getc2r16repair c2r16repair68 OfficeClickToRun.exe) set uwp16= if %winbuild% GEQ 10240 ( @@ -988,13 +988,11 @@ echo ________________________________________________________________ echo: ) -if %counter% EQU 0 ( echo: +if %counter% EQU 0 ( echo Office ^(2010 and later^) is not installed. goto :repairend -echo: -) else ( -echo: +) else if not defined c2r16_68 if not defined c2r16_86 ( call :dk_color %_Yellow% "A new window will appear, in that window you need to select [Quick Repair] option." if defined terminal ( call :dk_color %_Yellow% "Press [0] to continue..." @@ -1021,16 +1019,16 @@ echo Skipping repair for Office 14.0 C2R... echo: ) -if defined msi14_68 if exist "%msi14repair68%" echo Running - "%msi14repair68%" & "%msi14repair68%" -if defined msi14_86 if exist "%msi14repair86%" echo Running - "%msi14repair86%" & "%msi14repair86%" -if defined msi15_68 if exist "%msi15repair68%" echo Running - "%msi15repair68%" & "%msi15repair68%" -if defined msi15_86 if exist "%msi15repair86%" echo Running - "%msi15repair86%" & "%msi15repair86%" -if defined msi16_68 if exist "%msi16repair68%" echo Running - "%msi16repair68%" & "%msi16repair68%" -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_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_86 if exist "%c2r16repair86%" echo Running - "%c2r16repair86%" scenario=Repair & "%c2r16repair86%" scenario=Repair +if defined msi14_68 if exist "%msi14repair68%" echo Running - "%msi14repair68%" & "%msi14repair68%" +if defined msi14_86 if exist "%msi14repair86%" echo Running - "%msi14repair86%" & "%msi14repair86%" +if defined msi15_68 if exist "%msi15repair68%" echo Running - "%msi15repair68%" & "%msi15repair68%" +if defined msi15_86 if exist "%msi15repair86%" echo Running - "%msi15repair86%" & "%msi15repair86%" +if defined msi16_68 if exist "%msi16repair68%" echo Running - "%msi16repair68%" & "%msi16repair68%" +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_86 if exist "%c2r15repair86%" echo Running - "%c2r15repair86%" REPAIRUI RERUNMODE & "%c2r15repair86%" REPAIRUI RERUNMODE +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 RepairType=QuickRepair & "%c2r16repair86%" Scenario=Repair RepairType=QuickRepair :repairend @@ -1050,6 +1048,13 @@ set "%1=%systemdrive%\Program Files\Microsoft Office 15\Client%%#\%2" ) 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 set "_common86=%systemdrive%\Program Files (x86)\Common Files\Microsoft Shared\OFFICE%2\Office Setup Controller\setup.exe" -- cgit v1.2.3 From 55cc6d95d10446808a36c58547cd597f5c2bc98b Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 11 Nov 2025 16:58:07 +0530 Subject: Add more conditions before rebuilding ClipSVC licenses --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 36 ++++++++++++++++++++++++++++- MAS/Separate-Files-Version/Troubleshoot.cmd | 36 ++++++++++++++++++++++++++++- 2 files changed, 70 insertions(+), 2 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 3c95faf..5154bf2 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -16263,7 +16263,7 @@ call :dk_color %Blue% "Rebuilding ClipSVC Licenses..." echo: 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... goto :rebuildspptok ) @@ -16274,6 +16274,40 @@ echo Skipping... 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... %psc% Stop-Service ClipSVC -force %nul% timeout /t 2 %nul% diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 3a6ca4e..96563b5 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -619,7 +619,7 @@ call :dk_color %Blue% "Rebuilding ClipSVC Licenses..." echo: 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... goto :rebuildspptok ) @@ -630,6 +630,40 @@ echo Skipping... 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... %psc% Stop-Service ClipSVC -force %nul% timeout /t 2 %nul% -- cgit v1.2.3 From 4958ddf4744881b5b211a5b9ccd960018cca8710 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 12 Nov 2025 04:31:44 +0530 Subject: 3.8 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 3 ++- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 3 ++- MAS/Separate-Files-Version/Change_Office_Edition.cmd | 2 +- MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 2 +- MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 2 +- README.md | 6 +++--- 10 files changed, 14 insertions(+), 12 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 52d09e4..db84bb8 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1,5 +1,5 @@ @::r45f3r3-random -@set masver=3.7 +@set masver=3.8 @setlocal DisableDelayedExpansion @echo off @@ -5907,6 +5907,7 @@ call :dk_color %Gray% "ESU is not officially supported on Windows 8.1, but updat echo "%tsids%" | findstr /i "0b533b5e-08b6-44f9-b885-c2de291ba456 f69e2d51-3bbd-4ddf-8da7-a145e9dca597" %nul1% && ( 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%) ) ) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 1cdcb5e..6354862 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1,4 +1,4 @@ -@set masver=3.7 +@set masver=3.8 @echo off diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 0260838..255258d 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1,4 +1,4 @@ -@set masver=3.7 +@set masver=3.8 @echo off diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 0242d4c..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 diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 7fbd7c8..c46137d 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1,4 +1,4 @@ -@set masver=3.7 +@set masver=3.8 @echo off @@ -1967,6 +1967,7 @@ call :dk_color %Gray% "ESU is not officially supported on Windows 8.1, but updat echo "%tsids%" | findstr /i "0b533b5e-08b6-44f9-b885-c2de291ba456 f69e2d51-3bbd-4ddf-8da7-a145e9dca597" %nul1% && ( 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%) ) ) diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index bfb9435..49e0358 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -1,4 +1,4 @@ -@set masver=3.7 +@set masver=3.8 @echo off diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index f2f6833..e04a347 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -1,4 +1,4 @@ -@set masver=3.7 +@set masver=3.8 @echo off diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 1ad1085..0f87172 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -1,4 +1,4 @@ -@set masver=3.7 +@set masver=3.8 @echo off diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 96563b5..b67b0a2 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1,4 +1,4 @@ -@set masver=3.7 +@set masver=3.8 @echo off diff --git a/README.md b/README.md index 016f4ba..a9bbd23 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

Microsoft Activation Scripts (MAS)

-

Open-source Windows and Office activator featuring HWID, Ohook, TSforge, KMS38, and Online KMS activation methods, along with advanced troubleshooting.

+

Open-source Windows and Office activator featuring HWID, Ohook, TSforge, and Online KMS activation methods, along with advanced troubleshooting.


@@ -63,8 +63,8 @@ --- ``` -Latest Version: 3.7 -Release date: 11-Sep-2025 +Latest Version: 3.8 +Release date: 11-Nov-2025 ``` ### [Troubleshooting / Help](https://massgrave.dev/troubleshoot) -- cgit v1.2.3