From 2d00dfa704c709b78303191c4b66fe9ae533dced Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 6 May 2025 23:10:58 +0530 Subject: [PATCH 001/117] Revert export-ignore --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index de5bd3d..8749e12 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -MAS export-ignore -LICENSE export-ignore -README.md export-ignore +# MAS export-ignore +# LICENSE export-ignore +# README.md export-ignore .gitattributes export-ignore From 4c53e6231baeeb9985a7721a54c32e6fed854ce8 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 8 May 2025 05:31:04 +0530 Subject: [PATCH 002/117] Fix Microsoft links --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 26 +++++++++---------- .../Activators/HWID_Activation.cmd | 4 +-- .../Activators/KMS38_Activation.cmd | 4 +-- .../Activators/Ohook_Activation_AIO.cmd | 10 +++---- .../Activators/Online_KMS_Activation.cmd | 14 +++++----- .../Activators/TSforge_Activation.cmd | 14 +++++----- .../Change_Office_Edition.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 6 ++--- 8 files changed, 40 insertions(+), 40 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index be4714c..c824895 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1607,7 +1607,7 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option ) -:: https://learn.microsoft.com/windows-hardware/manufacture/desktop/windows-setup-states +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) @@ -1878,7 +1878,7 @@ set "permerror=Error Found In SPP Registries" ) ) -REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application +REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application if not defined permerror ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && ( @@ -3156,7 +3156,7 @@ exit /b :oh_clearblock :: Find remnants of Office vNext/shared/device license block and remove it because it stops other licenses from appearing -:: https://learn.microsoft.com/office/troubleshoot/activation/reset-office-365-proplus-activation-state +:: https://learn.microsoft.com/en-us/office/troubleshoot/activation/reset-office-365-proplus-activation-state set _sidlist= for /f "tokens=* delims=" %%a in ('%psc% "$p = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList'; Get-ChildItem $p | ForEach-Object { $pi = (Get-ItemProperty """"$p\$($_.PSChildName)"""").ProfileImagePath; if ($pi -like '*\Users\*' -and (Test-Path """"$pi\NTUSER.DAT"""") -and -not ($_.PSChildName -match '\.bak$')) { Split-Path $_.PSPath -Leaf } }" %nul6%') do (if defined _sidlist (set _sidlist=!_sidlist! %%a) else (set _sidlist=%%a)) @@ -3252,12 +3252,12 @@ reg delete HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v Share ) :: Clear device-based-licensing -:: https://learn.microsoft.com/deployoffice/device-based-licensing +:: https://learn.microsoft.com/en-us/deployoffice/device-based-licensing for /f %%# in ('reg query "%o16c2r_reg%\Configuration" /f *.DeviceBasedLicensing %nul6% ^| findstr REG_') do reg delete "%o16c2r_reg%\Configuration" /v %%# /f %nul% :: Remove OEM registry key -:: https://support.microsoft.com/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1 +:: https://support.microsoft.com/en-us/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1 for %%# in (15 16) do ( reg delete "HKLM\SOFTWARE\Microsoft\Office\%%#.0\Common\OEM" /f %nul% @@ -4002,8 +4002,8 @@ reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" /v Install %nul echo .NET 3.5 Framework is not installed in your system. echo Install it using the following URL. echo: -echo https://www.microsoft.com/download/details.aspx?id=25150 -if %_unattended%==0 start https://www.microsoft.com/download/details.aspx?id=25150 +echo https://www.microsoft.com/en-us/download/details.aspx?id=25150 +if %_unattended%==0 start https://www.microsoft.com/en-us/download/details.aspx?id=25150 goto dk_done ) ) @@ -12219,7 +12219,7 @@ call :oh_licrefresh :ks_activate :: Opt out of sending KMSclient activation data to Microsoft -:: https://learn.microsoft.com/windows/privacy/manage-connections-from-windows-operating-system-components-to-microsoft-services#19-software-protection-platform +:: https://learn.microsoft.com/en-us/windows/privacy/manage-connections-from-windows-operating-system-components-to-microsoft-services#19-software-protection-platform if %winbuild% GEQ 9600 ( reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v NoGenTicket /t REG_DWORD /d 1 /f %nul% @@ -12287,7 +12287,7 @@ echo Cleared %KS% Server from the registry. ) ) -:: https://learn.microsoft.com/azure/virtual-desktop/windows-10-multisession-faq +:: https://learn.microsoft.com/en-us/azure/virtual-desktop/windows-10-multisession-faq if %_actwin%==1 for %%# in (407) do if %osSKU%==%%# ( call :dk_color %Red% "%winos% does not support activation on non-azure platforms." @@ -15870,7 +15870,7 @@ for %%# in (SppE%w%xtComObj.exe %_slexe%) do (reg delete "HKLM\SOFTWARE\Microsof if %winbuild% LSS 9200 if not defined _vis ( REM Fix issues caused by Update KB971033 in Windows 7 -REM https://support.microsoft.com/help/4487266 +REM https://support.microsoft.com/en-us/help/4487266 echo: echo Checking Update KB971033... %psc% "if (Get-Hotfix -Id KB971033 -ErrorAction SilentlyContinue) {Exit 3}" %nul% @@ -16367,7 +16367,7 @@ set "permerror=Error Found In SPP Registries" ) ) -REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application +REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application if not defined permerror ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && ( @@ -16413,7 +16413,7 @@ if ($env:permerror -eq 'Error Found In SPP Registries') { } # Fix perms for SPP in HKU\S-1-5-20 -# https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application +# https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application if ($env:permerror -ne 'Error Found In S-1-5-20 SPP') { exit @@ -18175,7 +18175,7 @@ call :dk_color %_Green% "Enter an option number using your keyboard and press En set /p inpt= if "%inpt%"=="" goto :oe_changeupdchnl if "%inpt%"=="0" goto :oemenu -if /i "%inpt%"=="R" start https://learn.microsoft.com/microsoft-365-apps/updates/overview-update-channels & goto :oe_changeupdchnl +if /i "%inpt%"=="R" start https://learn.microsoft.com/en-us/microsoft-365-apps/updates/overview-update-channels & goto :oe_changeupdchnl for /l %%i in (1,1,%counter%) do (if "%inpt%"=="%%i" set verified=1) set targetFFN=!targetFFN%inpt%! set targetchannel=!targetchannel%inpt%! diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 7e5bce3..25c7190 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1310,7 +1310,7 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option ) -:: https://learn.microsoft.com/windows-hardware/manufacture/desktop/windows-setup-states +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) @@ -1581,7 +1581,7 @@ set "permerror=Error Found In SPP Registries" ) ) -REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application +REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application if not defined permerror ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && ( diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 4dbf2ca..bf8850f 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1453,7 +1453,7 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option ) -:: https://learn.microsoft.com/windows-hardware/manufacture/desktop/windows-setup-states +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) @@ -1724,7 +1724,7 @@ set "permerror=Error Found In SPP Registries" ) ) -REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application +REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application if not defined permerror ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && ( diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index d9dbe1f..4c582c2 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1356,7 +1356,7 @@ exit /b :oh_clearblock :: Find remnants of Office vNext/shared/device license block and remove it because it stops other licenses from appearing -:: https://learn.microsoft.com/office/troubleshoot/activation/reset-office-365-proplus-activation-state +:: https://learn.microsoft.com/en-us/office/troubleshoot/activation/reset-office-365-proplus-activation-state set _sidlist= for /f "tokens=* delims=" %%a in ('%psc% "$p = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList'; Get-ChildItem $p | ForEach-Object { $pi = (Get-ItemProperty """"$p\$($_.PSChildName)"""").ProfileImagePath; if ($pi -like '*\Users\*' -and (Test-Path """"$pi\NTUSER.DAT"""") -and -not ($_.PSChildName -match '\.bak$')) { Split-Path $_.PSPath -Leaf } }" %nul6%') do (if defined _sidlist (set _sidlist=!_sidlist! %%a) else (set _sidlist=%%a)) @@ -1452,12 +1452,12 @@ reg delete HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v Share ) :: Clear device-based-licensing -:: https://learn.microsoft.com/deployoffice/device-based-licensing +:: https://learn.microsoft.com/en-us/deployoffice/device-based-licensing for /f %%# in ('reg query "%o16c2r_reg%\Configuration" /f *.DeviceBasedLicensing %nul6% ^| findstr REG_') do reg delete "%o16c2r_reg%\Configuration" /v %%# /f %nul% :: Remove OEM registry key -:: https://support.microsoft.com/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1 +:: https://support.microsoft.com/en-us/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1 for %%# in (15 16) do ( reg delete "HKLM\SOFTWARE\Microsoft\Office\%%#.0\Common\OEM" /f %nul% @@ -1971,7 +1971,7 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option ) -:: https://learn.microsoft.com/windows-hardware/manufacture/desktop/windows-setup-states +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) @@ -2242,7 +2242,7 @@ set "permerror=Error Found In SPP Registries" ) ) -REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application +REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application if not defined permerror ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && ( diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 0d0bdf8..3546ad8 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -931,7 +931,7 @@ call :oh_licrefresh :ks_activate :: Opt out of sending KMSclient activation data to Microsoft -:: https://learn.microsoft.com/windows/privacy/manage-connections-from-windows-operating-system-components-to-microsoft-services#19-software-protection-platform +:: https://learn.microsoft.com/en-us/windows/privacy/manage-connections-from-windows-operating-system-components-to-microsoft-services#19-software-protection-platform if %winbuild% GEQ 9600 ( reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v NoGenTicket /t REG_DWORD /d 1 /f %nul% @@ -999,7 +999,7 @@ echo Cleared %KS% Server from the registry. ) ) -:: https://learn.microsoft.com/azure/virtual-desktop/windows-10-multisession-faq +:: https://learn.microsoft.com/en-us/azure/virtual-desktop/windows-10-multisession-faq if %_actwin%==1 for %%# in (407) do if %osSKU%==%%# ( call :dk_color %Red% "%winos% does not support activation on non-azure platforms." @@ -1330,7 +1330,7 @@ exit /b :oh_clearblock :: Find remnants of Office vNext/shared/device license block and remove it because it stops other licenses from appearing -:: https://learn.microsoft.com/office/troubleshoot/activation/reset-office-365-proplus-activation-state +:: https://learn.microsoft.com/en-us/office/troubleshoot/activation/reset-office-365-proplus-activation-state set _sidlist= for /f "tokens=* delims=" %%a in ('%psc% "$p = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList'; Get-ChildItem $p | ForEach-Object { $pi = (Get-ItemProperty """"$p\$($_.PSChildName)"""").ProfileImagePath; if ($pi -like '*\Users\*' -and (Test-Path """"$pi\NTUSER.DAT"""") -and -not ($_.PSChildName -match '\.bak$')) { Split-Path $_.PSPath -Leaf } }" %nul6%') do (if defined _sidlist (set _sidlist=!_sidlist! %%a) else (set _sidlist=%%a)) @@ -1426,12 +1426,12 @@ reg delete HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v Share ) :: Clear device-based-licensing -:: https://learn.microsoft.com/deployoffice/device-based-licensing +:: https://learn.microsoft.com/en-us/deployoffice/device-based-licensing for /f %%# in ('reg query "%o16c2r_reg%\Configuration" /f *.DeviceBasedLicensing %nul6% ^| findstr REG_') do reg delete "%o16c2r_reg%\Configuration" /v %%# /f %nul% :: Remove OEM registry key -:: https://support.microsoft.com/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1 +:: https://support.microsoft.com/en-us/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1 for %%# in (15 16) do ( reg delete "HKLM\SOFTWARE\Microsoft\Office\%%#.0\Common\OEM" /f %nul% @@ -3023,7 +3023,7 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option ) -:: https://learn.microsoft.com/windows-hardware/manufacture/desktop/windows-setup-states +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) @@ -3294,7 +3294,7 @@ set "permerror=Error Found In SPP Registries" ) ) -REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application +REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application if not defined permerror ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && ( diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index b5bf9f5..01671ab 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -238,8 +238,8 @@ reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" /v Install %nul echo .NET 3.5 Framework is not installed in your system. echo Install it using the following URL. echo: -echo https://www.microsoft.com/download/details.aspx?id=25150 -if %_unattended%==0 start https://www.microsoft.com/download/details.aspx?id=25150 +echo https://www.microsoft.com/en-us/download/details.aspx?id=25150 +if %_unattended%==0 start https://www.microsoft.com/en-us/download/details.aspx?id=25150 goto dk_done ) ) @@ -1944,7 +1944,7 @@ exit /b :oh_clearblock :: Find remnants of Office vNext/shared/device license block and remove it because it stops other licenses from appearing -:: https://learn.microsoft.com/office/troubleshoot/activation/reset-office-365-proplus-activation-state +:: https://learn.microsoft.com/en-us/office/troubleshoot/activation/reset-office-365-proplus-activation-state set _sidlist= for /f "tokens=* delims=" %%a in ('%psc% "$p = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList'; Get-ChildItem $p | ForEach-Object { $pi = (Get-ItemProperty """"$p\$($_.PSChildName)"""").ProfileImagePath; if ($pi -like '*\Users\*' -and (Test-Path """"$pi\NTUSER.DAT"""") -and -not ($_.PSChildName -match '\.bak$')) { Split-Path $_.PSPath -Leaf } }" %nul6%') do (if defined _sidlist (set _sidlist=!_sidlist! %%a) else (set _sidlist=%%a)) @@ -2040,12 +2040,12 @@ reg delete HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v Share ) :: Clear device-based-licensing -:: https://learn.microsoft.com/deployoffice/device-based-licensing +:: https://learn.microsoft.com/en-us/deployoffice/device-based-licensing for /f %%# in ('reg query "%o16c2r_reg%\Configuration" /f *.DeviceBasedLicensing %nul6% ^| findstr REG_') do reg delete "%o16c2r_reg%\Configuration" /v %%# /f %nul% :: Remove OEM registry key -:: https://support.microsoft.com/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1 +:: https://support.microsoft.com/en-us/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1 for %%# in (15 16) do ( reg delete "HKLM\SOFTWARE\Microsoft\Office\%%#.0\Common\OEM" /f %nul% @@ -2638,7 +2638,7 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option ) -:: https://learn.microsoft.com/windows-hardware/manufacture/desktop/windows-setup-states +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) @@ -2909,7 +2909,7 @@ set "permerror=Error Found In SPP Registries" ) ) -REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application +REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application if not defined permerror ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && ( diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 6fd6571..835a80b 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -1044,7 +1044,7 @@ call :dk_color %_Green% "Enter an option number using your keyboard and press En set /p inpt= if "%inpt%"=="" goto :oe_changeupdchnl if "%inpt%"=="0" goto :oemenu -if /i "%inpt%"=="R" start https://learn.microsoft.com/microsoft-365-apps/updates/overview-update-channels & goto :oe_changeupdchnl +if /i "%inpt%"=="R" start https://learn.microsoft.com/en-us/microsoft-365-apps/updates/overview-update-channels & goto :oe_changeupdchnl for /l %%i in (1,1,%counter%) do (if "%inpt%"=="%%i" set verified=1) set targetFFN=!targetFFN%inpt%! set targetchannel=!targetchannel%inpt%! diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 415ee1a..fb3a879 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -733,7 +733,7 @@ for %%# in (SppE%w%xtComObj.exe %_slexe%) do (reg delete "HKLM\SOFTWARE\Microsof if %winbuild% LSS 9200 if not defined _vis ( REM Fix issues caused by Update KB971033 in Windows 7 -REM https://support.microsoft.com/help/4487266 +REM https://support.microsoft.com/en-us/help/4487266 echo: echo Checking Update KB971033... %psc% "if (Get-Hotfix -Id KB971033 -ErrorAction SilentlyContinue) {Exit 3}" %nul% @@ -1230,7 +1230,7 @@ set "permerror=Error Found In SPP Registries" ) ) -REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application +REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application if not defined permerror ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && ( @@ -1276,7 +1276,7 @@ if ($env:permerror -eq 'Error Found In SPP Registries') { } # Fix perms for SPP in HKU\S-1-5-20 -# https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application +# https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application if ($env:permerror -ne 'Error Found In S-1-5-20 SPP') { exit From 74b7c74218f8f0f4fd87b2a71b985ed604fb380e Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 May 2025 01:40:41 +0530 Subject: [PATCH 003/117] Continue to activate in case of errors --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 ++-- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index c824895..c683783 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -4293,7 +4293,7 @@ echo Checking Activation ID [%tempid%] [%tsedition%] set generickey=1 call :dk_inskey "[%key%]" -if not defined error set tsids=%tsids% %tempid% +set tsids=%tsids% %tempid% goto :ts_esu ::======================================================================================================================================== @@ -4901,7 +4901,7 @@ goto :ts_act ) call :dk_inskey "[%key%]" -if not defined error set tsids=%tsids% %tempid% +set tsids=%tsids% %tempid% goto :ts_act ::======================================================================================================================================== diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 01671ab..3657ce6 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -702,7 +702,7 @@ echo Checking Activation ID [%tempid%] [%tsedition%] set generickey=1 call :dk_inskey "[%key%]" -if not defined error set tsids=%tsids% %tempid% +set tsids=%tsids% %tempid% goto :ts_esu ::======================================================================================================================================== @@ -1310,7 +1310,7 @@ goto :ts_act ) call :dk_inskey "[%key%]" -if not defined error set tsids=%tsids% %tempid% +set tsids=%tsids% %tempid% goto :ts_act ::======================================================================================================================================== From 691e6088d516f25b61cd3de0362668de3be5199b Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 May 2025 02:41:47 +0530 Subject: [PATCH 004/117] Use user temp folder or random name in Windows/Temp --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 8 ++++---- .../Activators/Ohook_Activation_AIO.cmd | 6 +++--- .../Activators/Online_KMS_Activation.cmd | 6 +++--- .../Activators/TSforge_Activation.cmd | 6 +++--- MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index c683783..ca13cef 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1286,9 +1286,9 @@ if %_wmic% EQU 0 set "chkapp=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISE if defined allapps if %1==0ff1ce15-a989-479d-af46-f275c6370663 ( set len=0 -echo:!allapps!> %SystemRoot%\Temp\chklen -for %%A in (%SystemRoot%\Temp\chklen) do (set len=%%~zA) -del %SystemRoot%\Temp\chklen %nul% +echo:!allapps!> "!_ttemp!\chklen" +for %%A in ("!_ttemp!\chklen") do (set len=%%~zA) +del "!_ttemp!\chklen" %nul% if !len! GTR 6000 ( %eline% @@ -16315,7 +16315,7 @@ goto :at_menu :: https://stackoverflow.com/a/46268232 -set "ddf="%SystemRoot%\Temp\ddf"" +set "ddf="%SystemRoot%\Temp\%Random%%Random%%Random%%Random%"" %nul% del /q /f %ddf% echo/.New Cabinet>%ddf% echo/.set Cabinet=ON>>%ddf% diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 4c582c2..bef9d50 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1701,9 +1701,9 @@ if %_wmic% EQU 0 set "chkapp=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISE if defined allapps if %1==0ff1ce15-a989-479d-af46-f275c6370663 ( set len=0 -echo:!allapps!> %SystemRoot%\Temp\chklen -for %%A in (%SystemRoot%\Temp\chklen) do (set len=%%~zA) -del %SystemRoot%\Temp\chklen %nul% +echo:!allapps!> "!_ttemp!\chklen" +for %%A in ("!_ttemp!\chklen") do (set len=%%~zA) +del "!_ttemp!\chklen" %nul% if !len! GTR 6000 ( %eline% diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 3546ad8..53ebe2c 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -2675,9 +2675,9 @@ if %_wmic% EQU 0 set "chkapp=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISE if defined allapps if %1==0ff1ce15-a989-479d-af46-f275c6370663 ( set len=0 -echo:!allapps!> %SystemRoot%\Temp\chklen -for %%A in (%SystemRoot%\Temp\chklen) do (set len=%%~zA) -del %SystemRoot%\Temp\chklen %nul% +echo:!allapps!> "!_ttemp!\chklen" +for %%A in ("!_ttemp!\chklen") do (set len=%%~zA) +del "!_ttemp!\chklen" %nul% if !len! GTR 6000 ( %eline% diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 3657ce6..5942597 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -2335,9 +2335,9 @@ if %_wmic% EQU 0 set "chkapp=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISE if defined allapps if %1==0ff1ce15-a989-479d-af46-f275c6370663 ( set len=0 -echo:!allapps!> %SystemRoot%\Temp\chklen -for %%A in (%SystemRoot%\Temp\chklen) do (set len=%%~zA) -del %SystemRoot%\Temp\chklen %nul% +echo:!allapps!> "!_ttemp!\chklen" +for %%A in ("!_ttemp!\chklen") do (set len=%%~zA) +del "!_ttemp!\chklen" %nul% if !len! GTR 6000 ( %eline% diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index e0fa600..f875018 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -795,7 +795,7 @@ exit /b :: https://stackoverflow.com/a/46268232 -set "ddf="%SystemRoot%\Temp\ddf"" +set "ddf="%SystemRoot%\Temp\%Random%%Random%%Random%%Random%"" %nul% del /q /f %ddf% echo/.New Cabinet>%ddf% echo/.set Cabinet=ON>>%ddf% diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index fb3a879..b3af1c4 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1178,7 +1178,7 @@ goto :at_menu :: https://stackoverflow.com/a/46268232 -set "ddf="%SystemRoot%\Temp\ddf"" +set "ddf="%SystemRoot%\Temp\%Random%%Random%%Random%%Random%"" %nul% del /q /f %ddf% echo/.New Cabinet>%ddf% echo/.set Cabinet=ON>>%ddf% From 966fbd14f6b4f17ee07c9ccc1d97dc499d16fc0f Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 May 2025 02:47:41 +0530 Subject: [PATCH 005/117] Don't ask to run other fixes if file infector malware is detected --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/KMS38_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 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index ca13cef..0dc3954 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1468,7 +1468,7 @@ if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%re if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." -if defined results call :dk_color %Red% "%results%" +if defined results (call :dk_color %Red% "%results%"&set showfix=1) set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 25c7190..a24dc4b 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1171,7 +1171,7 @@ if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%re if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." -if defined results call :dk_color %Red% "%results%" +if defined results (call :dk_color %Red% "%results%"&set showfix=1) set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index bf8850f..30480d3 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1314,7 +1314,7 @@ if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%re if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." -if defined results call :dk_color %Red% "%results%" +if defined results (call :dk_color %Red% "%results%"&set showfix=1) set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index bef9d50..f59f85d 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1832,7 +1832,7 @@ if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%re if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." -if defined results call :dk_color %Red% "%results%" +if defined results (call :dk_color %Red% "%results%"&set showfix=1) set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 53ebe2c..568e0f7 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -2884,7 +2884,7 @@ if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%re if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." -if defined results call :dk_color %Red% "%results%" +if defined results (call :dk_color %Red% "%results%"&set showfix=1) set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 5942597..ca7eb3e 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -2499,7 +2499,7 @@ if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%re if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." -if defined results call :dk_color %Red% "%results%" +if defined results (call :dk_color %Red% "%results%"&set showfix=1) set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: From fc2348bf53a13665bae3f869283798f6dca5373a Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 May 2025 03:39:29 +0530 Subject: [PATCH 006/117] Add some info related to O365 to Mondo conversion in TSforge --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 5 +++++ MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 0dc3954..f3e269a 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -5327,6 +5327,11 @@ set _License=MondoRetail set _altoffid=MondoRetail call :ks_osppready echo Converting Unsupported O365 Office [%%# To MondoRetail] +if "%oVer%"=="15" (call :dk_color %Gray% "Mondo 2013 is equivalent to O365 [15.0 version] in terms of the latest features.") +if "%oVer%"=="16" ( +call :dk_color %Gray% "Mondo 2016 is equivalent to O365 in terms of the latest features." +call :dk_color %Gray% "To enhance stability, select the Change Office Edition option in the Main Menu to fully switch to Mondo." +) ) if not defined _oMSI ( diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index ca7eb3e..ded99ca 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1796,6 +1796,11 @@ set _License=MondoRetail set _altoffid=MondoRetail call :ks_osppready echo Converting Unsupported O365 Office [%%# To MondoRetail] +if "%oVer%"=="15" (call :dk_color %Gray% "Mondo 2013 is equivalent to O365 [15.0 version] in terms of the latest features.") +if "%oVer%"=="16" ( +call :dk_color %Gray% "Mondo 2016 is equivalent to O365 in terms of the latest features." +call :dk_color %Gray% "To enhance stability, select the Change Office Edition option in the Main Menu to fully switch to Mondo." +) ) if not defined _oMSI ( From 133d3b9720c29d0d566f8e6bb117a802fda0c454 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 May 2025 10:46:12 +0530 Subject: [PATCH 007/117] Edit the info related to Mondo conversion --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 9 +++++---- .../Activators/Online_KMS_Activation.cmd | 4 ++++ .../Activators/TSforge_Activation.cmd | 5 +---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index f3e269a..198d13e 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -5328,10 +5328,7 @@ set _altoffid=MondoRetail call :ks_osppready echo Converting Unsupported O365 Office [%%# To MondoRetail] if "%oVer%"=="15" (call :dk_color %Gray% "Mondo 2013 is equivalent to O365 [15.0 version] in terms of the latest features.") -if "%oVer%"=="16" ( -call :dk_color %Gray% "Mondo 2016 is equivalent to O365 in terms of the latest features." -call :dk_color %Gray% "To enhance stability, select the Change Office Edition option in the Main Menu to fully switch to Mondo." -) +if "%oVer%"=="16" (call :dk_color %Gray% "Mondo 2016 is equivalent to O365 in terms of the latest features.") ) if not defined _oMSI ( @@ -12446,6 +12443,10 @@ call :ksdata getinfo !_prod! if defined _altoffid ( set _License=!_altoffid! echo Converting Retail To Volume [!_prod! To !_altoffid!] +echo %%# | find /i "O365" %nul% && ( +if "%oVer%"=="15" (call :dk_color %Gray% "Mondo 2013 is equivalent to O365 [15.0 version] in terms of the latest features.") +if "%oVer%"=="16" (call :dk_color %Gray% "Mondo 2016 is equivalent to O365 in terms of the latest features.") +) set _prod=!_altoffid! call :ks_osppready ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 568e0f7..28879e5 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -1212,6 +1212,10 @@ call :ksdata getinfo !_prod! if defined _altoffid ( set _License=!_altoffid! echo Converting Retail To Volume [!_prod! To !_altoffid!] +echo %%# | find /i "O365" %nul% && ( +if "%oVer%"=="15" (call :dk_color %Gray% "Mondo 2013 is equivalent to O365 [15.0 version] in terms of the latest features.") +if "%oVer%"=="16" (call :dk_color %Gray% "Mondo 2016 is equivalent to O365 in terms of the latest features.") +) set _prod=!_altoffid! call :ks_osppready ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index ded99ca..a8a1911 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1797,10 +1797,7 @@ set _altoffid=MondoRetail call :ks_osppready echo Converting Unsupported O365 Office [%%# To MondoRetail] if "%oVer%"=="15" (call :dk_color %Gray% "Mondo 2013 is equivalent to O365 [15.0 version] in terms of the latest features.") -if "%oVer%"=="16" ( -call :dk_color %Gray% "Mondo 2016 is equivalent to O365 in terms of the latest features." -call :dk_color %Gray% "To enhance stability, select the Change Office Edition option in the Main Menu to fully switch to Mondo." -) +if "%oVer%"=="16" (call :dk_color %Gray% "Mondo 2016 is equivalent to O365 in terms of the latest features.") ) if not defined _oMSI ( From 206c31ece505276f62f0e1cb9f49f0811d264864 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 May 2025 12:09:25 +0530 Subject: [PATCH 008/117] Open mirror pages along with massgrave.dev --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 6 +++--- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 4 ++-- MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 4 ++-- .../Activators/Ohook_Activation_AIO.cmd | 4 ++-- .../Activators/Online_KMS_Activation.cmd | 4 ++-- .../Activators/TSforge_Activation.cmd | 4 ++-- MAS/Separate-Files-Version/Change_Office_Edition.cmd | 6 +++--- MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 4 ++-- MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 4 ++-- MAS/Separate-Files-Version/Troubleshoot.cmd | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 198d13e..8b6ddbf 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -334,7 +334,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start %mas% & exit /b) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) ) ) @@ -2004,7 +2004,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( @@ -18249,7 +18249,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 goto :oemenu -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index a24dc4b..02be6af 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -356,7 +356,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start %mas% & exit /b) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) ) ) @@ -1707,7 +1707,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 30480d3..e909532 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -359,7 +359,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start %mas% & exit /b) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) ) ) cls @@ -1850,7 +1850,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index f59f85d..6e06bf1 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -364,7 +364,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start %mas% & exit /b) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) ) ) cls @@ -2368,7 +2368,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 28879e5..321095a 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -395,7 +395,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start %mas% & exit /b) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) ) ) @@ -3424,7 +3424,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index a8a1911..e9b75e6 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -413,7 +413,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start %mas% & exit /b) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) ) ) @@ -3037,7 +3037,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 835a80b..b5bd456 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -309,7 +309,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start %mas% & exit /b) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) ) ) @@ -1112,7 +1112,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 goto :oemenu -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( @@ -1477,7 +1477,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index f875018..eaa0956 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -314,7 +314,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start %mas% & exit /b) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) ) ) @@ -1058,7 +1058,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index a896e2b..f1049bd 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -325,7 +325,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start %mas% & exit /b) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) ) ) @@ -732,7 +732,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index b3af1c4..ce82567 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -326,7 +326,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start %mas% & exit /b) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) ) ) @@ -1489,7 +1489,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( From b75ba72bc5ff9ccd80a225a1f7410ab051949a6a Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 May 2025 12:52:40 +0530 Subject: [PATCH 009/117] Change hash --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 8b6ddbf..f72acb4 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1,4 +1,4 @@ -@::7f8jhe-random +@::fh36d7f-random @set masver=3.2 @setlocal DisableDelayedExpansion @echo off From a149fc5f2048b135c649a04da89e1b2f3178b449 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 May 2025 12:52:40 +0530 Subject: [PATCH 010/117] Change hash --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index be4714c..8148441 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1,4 +1,4 @@ -@::7f8jhe-random +@::fh36d7f-random @set masver=3.2 @setlocal DisableDelayedExpansion @echo off From 830755f6b606446225ca4535a6a0d45ba9f8c052 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 May 2025 18:11:04 +0530 Subject: [PATCH 011/117] Fix an issue in detecting Office preview licenses in TSforge --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index f72acb4..9bff890 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -10570,7 +10570,7 @@ function Office-ActID { } } - $filterPreview = $filteredConfigs | Where-Object { $_.ProductDescription -notmatch 'preview' } + $filterPreview = $filteredConfigs | Where-Object { $_.ProductDescription -notmatch 'preview|c2r' } if ($filterPreview.Count -ne 0) { $filteredConfigs = $filterPreview diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index e9b75e6..444a20b 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -8189,7 +8189,7 @@ function Office-ActID { } } - $filterPreview = $filteredConfigs | Where-Object { $_.ProductDescription -notmatch 'preview' } + $filterPreview = $filteredConfigs | Where-Object { $_.ProductDescription -notmatch 'preview|c2r' } if ($filterPreview.Count -ne 0) { $filteredConfigs = $filterPreview From ae93f547f58417191cbdc59f4d2be282cdd8ffe0 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 23 May 2025 17:54:17 +0530 Subject: [PATCH 012/117] Add the option to change Office update channel to VL and from VL to retail --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 229 ++++++++++++++---- .../Change_Office_Edition.cmd | 229 ++++++++++++++---- 2 files changed, 354 insertions(+), 104 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 9bff890..e43bb90 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -17552,6 +17552,7 @@ _updch _lang _clversion _version +_AudienceData _oIds _c2rXml _c2rExe @@ -17939,8 +17940,39 @@ set errorcode=%errorlevel% timeout /t 10 %nul% echo: +set suggestchannel= + if %errorcode% EQU 0 ( -call :dk_color %Gray% "Now run the Office activation option from the main menu." +echo %targetedition% | find /i "2019Volume" %nul% && ( +if not defined ltsc19 set suggestchannel=Production::LTSC +if /i not %_AudienceData%==Production::LTSC set suggestchannel=Production::LTSC +if /i not %_updch%==F2E724C1-748F-4B47-8FB8-8E0D210E9208 set suggestchannel=Production::LTSC +) + +echo %targetedition% | find /i "2021Volume" %nul% && ( +if not defined ltsc21 set suggestchannel=Production::LTSC2021 +if /i not %_AudienceData%==Production::LTSC2021 set suggestchannel=Production::LTSC2021 +if /i not %_updch%==5030841D-C919-4594-8D2D-84AE4F96E58E set suggestchannel=Production::LTSC2021 +) + +echo %targetedition% | find /i "2024Volume" %nul% && ( +if not defined ltsc24 set suggestchannel=Production::LTSC2024 +if /i not %_AudienceData%==Production::LTSC2024 set suggestchannel=Production::LTSC2024 +if /i not %_updch%==7983BAC0-E531-40CF-BE00-FD24FE66619C set suggestchannel=Production::LTSC2024 +) + +echo %targetedition% | findstr /R "20.*Volume" %nul% || ( +if defined ltscfound set suggestchannel=Production::CC +echo %_AudienceData% | find /i "LTSC" %nul% && set suggestchannel=Production::CC +) + +if defined suggestchannel ( +call :dk_color %Gray% "Mismatch found in update channel and installed product." +call :dk_color %Blue% "It is recommended to change the update channel to [!suggestchannel!] from the previous menu." +) + +echo: +call :dk_color %Gray% "To activate Office, run the activation option from the main menu." ) else ( set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" @@ -18117,6 +18149,12 @@ echo Installed Office editions: %_oIds% echo Unsupported Office edition is installed on your Windows build version %winbuild%. goto :oe_goback ) +if defined ltscfound ( +%eline% +echo Installed Office update channel: %ltsc19%%ltsc21%%ltsc24% +echo Unsupported Office update channel is installed on your Windows build version %winbuild%. +goto :oe_goback +) ) ::=============== @@ -18125,49 +18163,52 @@ set inpt= set counter=0 set verified=0 set targetFFN= +set bypassFFN= set targetchannel= %line% echo: call :dk_color %Gray% "Installed update channel: %_AudienceData%, %_version%, Client: %_clversion%" -call :dk_color %Gray% "Unsupported update channels are excluded from this list." +call :dk_color %Gray% "Installed Office editions: %_oIds%" %line% echo: for %%# in ( -"5440FD1F-7ECB-4221-8110-145EFAA6372F_Insider Fast [Beta] - Insiders::DevMain" -"64256AFE-F5D9-4F86-8936-8840A6A4F5BE_Monthly Preview - Insiders::CC" -"492350F6-3A01-4F97-B9C0-C7C6DDF67D60_Monthly [Current] - Production::CC" -"55336B82-A18D-4DD6-B5F6-9E5095C314A6_Monthly Enterprise - Production::MEC" -"B8F9B850-328D-4355-9145-C59439A0C4CF_Semi Annual Preview - Insiders::FRDC" -"7FFBC6BF-BC32-4F92-8982-F9DD17FD3114_Semi Annual - Production::DC" -"EA4A4090-DE26-49D7-93C1-91BFF9E53FC3_DevMain Channel - Dogfood::DevMain" -"B61285DD-D9F7-41F2-9757-8F61CBA4E9C8_Microsoft Elite - Microsoft::DevMain" -"F2E724C1-748F-4B47-8FB8-8E0D210E9208_Perpetual2019 VL - Production::LTSC" -"1D2D2EA6-1680-4C56-AC58-A441C8C24FF9_Microsoft2019 VL - Microsoft::LTSC" -"5030841D-C919-4594-8D2D-84AE4F96E58E_Perpetual2021 VL - Production::LTSC2021" -"86752282-5841-4120-AC80-DB03AE6B5FDB_Microsoft2021 VL - Microsoft::LTSC2021" -"7983BAC0-E531-40CF-BE00-FD24FE66619C_Perpetual2024 VL - Production::LTSC2024" -"C02D8FE6-5242-4DA8-972F-82EE55E00671_Microsoft2024 VL - Microsoft::LTSC2024" +"5440fd1f-7ecb-4221-8110-145efaa6372f_Insider Fast [Beta] - Insiders::DevMain -" +"64256afe-f5d9-4f86-8936-8840a6a4f5be_Monthly Preview - Insiders::CC -" +"492350f6-3a01-4f97-b9c0-c7c6ddf67d60_Monthly [Current] - Production::CC -" +"55336b82-a18d-4dd6-b5f6-9e5095c314a6_Monthly Enterprise - Production::MEC -" +"b8f9b850-328d-4355-9145-c59439a0c4cf_Semi Annual Preview - Insiders::FRDC -" +"7ffbc6bf-bc32-4f92-8982-f9dd17fd3114_Semi Annual - Production::DC -" +"ea4a4090-de26-49d7-93c1-91bff9e53fc3_DevMain Channel - Dogfood::DevMain -" +"b61285dd-d9f7-41f2-9757-8f61cba4e9c8_Microsoft Elite - Microsoft::DevMain -" +"f2e724c1-748f-4b47-8fb8-8e0d210e9208_Perpetual2019 VL - Production::LTSC -" +"1d2d2ea6-1680-4c56-ac58-a441c8c24ff9_Microsoft2019 VL - Microsoft::LTSC -" +"5030841d-c919-4594-8d2d-84ae4f96e58e_Perpetual2021 VL - Production::LTSC2021 -" +"86752282-5841-4120-ac80-db03ae6b5fdb_Microsoft2021 VL - Microsoft::LTSC2021 -" +"7983bac0-e531-40cf-be00-fd24fe66619c_Perpetual2024 VL - Production::LTSC2024 -" +"c02d8fe6-5242-4da8-972f-82ee55e00671_Microsoft2024 VL - Microsoft::LTSC2024 -" ) do ( for /f "tokens=1-2 delims=_" %%A in ("%%~#") do ( +set bypass= set supported= if %winbuild% LSS 10240 (echo %%B | findstr /i "LTSC DevMain" %nul% || set supported=1) else (set supported=1) if %winbuild% GEQ 10240 ( -if defined ltsc19 echo %%B | find /i "2019 VL" %nul% || set supported= -if defined ltsc21 echo %%B | find /i "2021 VL" %nul% || set supported= -if defined ltsc24 echo %%B | find /i "2024 VL" %nul% || set supported= -if not defined ltscfound echo %%B | find /i "LTSC" %nul% && set supported= +if defined ltsc19 echo %%B | find /i "2019 VL" %nul% || set bypass=1 +if defined ltsc21 echo %%B | find /i "2021 VL" %nul% || set bypass=1 +if defined ltsc24 echo %%B | find /i "2024 VL" %nul% || set bypass=1 +if not defined ltscfound echo %%B | find /i "LTSC" %nul% && set bypass=1 ) if defined supported ( set /a counter+=1 if !counter! LSS 10 ( -echo [!counter!] %%B +if defined bypass (echo [!counter!] %%B Unofficial change method will be used) else (echo [!counter!] %%B) ) else ( -echo [!counter!] %%B +if defined bypass (echo [!counter!] %%B Unofficial change method will be used) else (echo [!counter!] %%B) ) set targetFFN!counter!=%%A set targetchannel!counter!=%%B +if defined bypass set bypassFFN=!bypassFFN!%%A ) ) ) @@ -18198,30 +18239,12 @@ set build= for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getbuild\:.*';iex ($f[1])" %nul6%') do (set build=%%a) echo "%build%" | find /i "16." %nul% || set build= -:: Cleanup Office update related registries, thanks to @abbodi1406 -:: https://techcommunity.microsoft.com/t5/office-365-blog/how-to-manage-office-365-proplus-channels-for-it-pros/ba-p/795813 -:: https://learn.microsoft.com/en-us/microsoft-365-apps/updates/change-update-channels#considerations-when-changing-channels - echo: for /f "tokens=1 delims=-" %%A in ("%targetchannel%") do (echo Target update channel: %%A) -echo: -echo Cleaning Office update registry keys... -echo Adding new update channel to registry keys... +echo Target build number: %build% +echo: %bypassFFN% | find /i "%targetFFN%" %nul% && goto :oe_changeunoff -%nul% reg add %o16c2r_reg%\Configuration /v CDNBaseUrl /t REG_SZ /d "https://officecdn.microsoft.com/pr/%targetFFN%" /f -%nul% reg add %o16c2r_reg%\Configuration /v UpdateChannel /t REG_SZ /d "https://officecdn.microsoft.com/pr/%targetFFN%" /f -%nul% reg add %o16c2r_reg%\Configuration /v UpdateChannelChanged /t REG_SZ /d "True" /f -%nul% reg delete %o16c2r_reg%\Configuration /v UnmanagedUpdateURL /f -%nul% reg delete %o16c2r_reg%\Configuration /v UpdateUrl /f -%nul% reg delete %o16c2r_reg%\Configuration /v UpdatePath /f -%nul% reg delete %o16c2r_reg%\Configuration /v UpdateToVersion /f -%nul% reg delete %o16c2r_reg%\Updates /v UpdateToVersion /f -%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f -%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f /reg:32 -%nul% reg delete HKCU\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f -%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f -%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f /reg:32 -%nul% reg delete HKCU\Software\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f +call :oe_cleanupreg if not defined build ( if %winbuild% GEQ 9200 call :dk_color %Gray% "Failed to detect build number for the target FFN." @@ -18237,6 +18260,76 @@ echo: echo Check this webpage for help - %mas%troubleshoot goto :oe_goback +::======================= + +:: Unofficial method to change channel + +:oe_changeunoff + +set abortchange= +echo %targetchannel% | find /i "2019 VL" %nul% && (for %%A in (%_oIds%) do (echo %%A | find /i "2019Volume" %nul% || set abortchange=1)) +echo %targetchannel% | find /i "2021 VL" %nul% && (for %%A in (%_oIds%) do (echo %%A | find /i "2021Volume" %nul% || set abortchange=1)) +echo %targetchannel% | find /i "2024 VL" %nul% && (for %%A in (%_oIds%) do (echo %%A | find /i "2024Volume" %nul% || set abortchange=1)) + +if defined abortchange ( +%eline% +echo Mismatch found in installed Office products and target update channel. Aborting... +echo Non-perpetual Office products are not suppported with Perpetual VL update channels. +goto :oe_goback +) + +if not defined build ( +%eline% +call :dk_color %Red% "Failed to detect build number for the target FFN." +echo: +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +goto :oe_goback +) + +set buildchk=0 +for /f "tokens=3 delims=." %%a in ("%build%") do set "buildchk=%%a" + +set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%_firstoId%.16_%_lang%_x-none cdnbaseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% baseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% version.16=%build% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%targetFFN% %_firstoId%.excludedapps.16=%_firstoIdExcludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" +set "c2rclientupdate=!c2rcommand! scenario=CLIENTUPDATE" + +if %clverchk% LSS %buildchk% ( +echo: +call :dk_color %Blue% "Do not break the operation in the middle..." +echo: +echo Updating Office C2R client with the command below, please wait... +echo: +echo %c2rclientupdate% +%c2rclientupdate% +for /l %%i in (1,1,30) do (if !clverchk! LSS %buildchk% (call :ch_getinfo&timeout /t 10 %nul%)) +) + +if %clverchk% LSS %buildchk% ( +echo: +call :dk_color %Red% "Failed to update Office C2R client. Aborting..." +echo: +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +goto :oe_goback +) + +call :oe_cleanupreg + +echo Running the below command to change update channel, please wait... +echo: +echo %c2rcommand% +%c2rcommand% +set errorcode=%errorlevel% +timeout /t 10 %nul% + +echo: +if %errorcode% EQU 0 ( +call :dk_color %Gray% "Now run the Office activation option from the main menu." +) else ( +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +) + ::======================================================================================================================================== :oe_goback @@ -18263,6 +18356,36 @@ goto :oemenu ::======================================================================================================================================== +:oe_cleanupreg + +:: Cleanup Office update related registries, thanks to @abbodi1406 +:: https://techcommunity.microsoft.com/t5/office-365-blog/how-to-manage-office-365-proplus-channels-for-it-pros/ba-p/795813 +:: https://learn.microsoft.com/en-us/microsoft-365-apps/updates/change-update-channels#considerations-when-changing-channels + +echo: +echo Cleaning Office update registry keys... +echo Adding new update channel to registry keys... +echo: + +%nul% reg add %o16c2r_reg%\Configuration /v CDNBaseUrl /t REG_SZ /d "https://officecdn.microsoft.com/pr/%targetFFN%" /f +%nul% reg add %o16c2r_reg%\Configuration /v UpdateChannel /t REG_SZ /d "https://officecdn.microsoft.com/pr/%targetFFN%" /f +%nul% reg add %o16c2r_reg%\Configuration /v UpdateChannelChanged /t REG_SZ /d "True" /f +%nul% reg delete %o16c2r_reg%\Configuration /v UnmanagedUpdateURL /f +%nul% reg delete %o16c2r_reg%\Configuration /v UpdateUrl /f +%nul% reg delete %o16c2r_reg%\Configuration /v UpdatePath /f +%nul% reg delete %o16c2r_reg%\Configuration /v UpdateToVersion /f +%nul% reg delete %o16c2r_reg%\Updates /v UpdateToVersion /f +%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f +%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f /reg:32 +%nul% reg delete HKCU\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f +%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f +%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f /reg:32 +%nul% reg delete HKCU\Software\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f + +exit /b + +::======================================================================================================================================== + :oe_tempcleanup del /f /q %SystemRoot%\Temp\SingleApps_Volume.txt %nul% @@ -18282,6 +18405,7 @@ set _oRoot= set _oArch= set _updch= set _oIds= +set _firstoId= set _lang= set _cfolder= set _version= @@ -18312,9 +18436,13 @@ for /f "tokens=%_tok% delims=\" %%a in ('reg query "%o16c2r_reg%\ProductReleaseI if defined _oIds (set "_oIds=!_oIds! %%a") else (set "_oIds=%%a") ) set _oIds=%_oIds:.16=% +for /f "tokens=1" %%A in ("%_oIds%") do set _firstoId=%%A +for /f "skip=2 tokens=2*" %%a in ('"reg query %o16c2r_reg%\Configuration /v %_firstoId%.ExcludedApps" %nul6%') do (set "_firstoIdExcludelist=%%b") set verchk=0 +set clverchk=0 for /f "tokens=3 delims=." %%a in ("%_version%") do set "verchk=%%a" +for /f "tokens=3 delims=." %%a in ("%_clversion%") do set "clverchk=%%a" if exist "%_oRoot%\Licenses16\c2rpridslicensefiles_auto.xml" set "_c2rXml=%_oRoot%\Licenses16\c2rpridslicensefiles_auto.xml" @@ -18330,16 +18458,13 @@ if exist "%_cfolder%\OfficeC2RClient.exe" ( set "_c2rCexe=%_cfolder%\OfficeC2RClient.exe" ) -set "audidata4=%_AudienceData:~-4%" +:: Check LTSC version files -if /i "%audidata4%"=="LTSC" set ltsc19=LTSC -echo %_clversion% %_version% | findstr "16.0.103 16.0.104 16.0.105" %nul% && set ltsc19=LTSC - -if /i "%audidata4%"=="2021" set ltsc21=LTSC2021 -echo %_clversion% %_version% | findstr "16.0.14332" %nul% && set ltsc21=LTSC2021 - -if /i "%audidata4%"=="2024" set ltsc24=LTSC2024 -:: LTSC 2024 build is not fixed yet +for /f "skip=2 tokens=2*" %%a in ('"reg query %o16c2r_reg%\ProductReleaseIDs\%_actconfig%" /s %nul6%') do ( +echo "%%b" %nul2% | findstr "16.0.103 16.0.104 16.0.105" %nul% && set ltsc19=LTSC +echo "%%b" %nul2% | findstr "16.0.14332" %nul% && set ltsc21=LTSC2021 +echo "%%b" %nul2% | findstr "16.0.17932" %nul% && set ltsc24=LTSC2024 +) if not "%ltsc19%%ltsc21%%ltsc24%"=="" set ltscfound=1 diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index b5bd456..a14988b 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -415,6 +415,7 @@ _updch _lang _clversion _version +_AudienceData _oIds _c2rXml _c2rExe @@ -802,8 +803,39 @@ set errorcode=%errorlevel% timeout /t 10 %nul% echo: +set suggestchannel= + if %errorcode% EQU 0 ( -call :dk_color %Gray% "Now run the Office activation option from the main menu." +echo %targetedition% | find /i "2019Volume" %nul% && ( +if not defined ltsc19 set suggestchannel=Production::LTSC +if /i not %_AudienceData%==Production::LTSC set suggestchannel=Production::LTSC +if /i not %_updch%==F2E724C1-748F-4B47-8FB8-8E0D210E9208 set suggestchannel=Production::LTSC +) + +echo %targetedition% | find /i "2021Volume" %nul% && ( +if not defined ltsc21 set suggestchannel=Production::LTSC2021 +if /i not %_AudienceData%==Production::LTSC2021 set suggestchannel=Production::LTSC2021 +if /i not %_updch%==5030841D-C919-4594-8D2D-84AE4F96E58E set suggestchannel=Production::LTSC2021 +) + +echo %targetedition% | find /i "2024Volume" %nul% && ( +if not defined ltsc24 set suggestchannel=Production::LTSC2024 +if /i not %_AudienceData%==Production::LTSC2024 set suggestchannel=Production::LTSC2024 +if /i not %_updch%==7983BAC0-E531-40CF-BE00-FD24FE66619C set suggestchannel=Production::LTSC2024 +) + +echo %targetedition% | findstr /R "20.*Volume" %nul% || ( +if defined ltscfound set suggestchannel=Production::CC +echo %_AudienceData% | find /i "LTSC" %nul% && set suggestchannel=Production::CC +) + +if defined suggestchannel ( +call :dk_color %Gray% "Mismatch found in update channel and installed product." +call :dk_color %Blue% "It is recommended to change the update channel to [!suggestchannel!] from the previous menu." +) + +echo: +call :dk_color %Gray% "To activate Office, run the activation option from the main menu." ) else ( set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" @@ -980,6 +1012,12 @@ echo Installed Office editions: %_oIds% echo Unsupported Office edition is installed on your Windows build version %winbuild%. goto :oe_goback ) +if defined ltscfound ( +%eline% +echo Installed Office update channel: %ltsc19%%ltsc21%%ltsc24% +echo Unsupported Office update channel is installed on your Windows build version %winbuild%. +goto :oe_goback +) ) ::=============== @@ -988,49 +1026,52 @@ set inpt= set counter=0 set verified=0 set targetFFN= +set bypassFFN= set targetchannel= %line% echo: call :dk_color %Gray% "Installed update channel: %_AudienceData%, %_version%, Client: %_clversion%" -call :dk_color %Gray% "Unsupported update channels are excluded from this list." +call :dk_color %Gray% "Installed Office editions: %_oIds%" %line% echo: for %%# in ( -"5440FD1F-7ECB-4221-8110-145EFAA6372F_Insider Fast [Beta] - Insiders::DevMain" -"64256AFE-F5D9-4F86-8936-8840A6A4F5BE_Monthly Preview - Insiders::CC" -"492350F6-3A01-4F97-B9C0-C7C6DDF67D60_Monthly [Current] - Production::CC" -"55336B82-A18D-4DD6-B5F6-9E5095C314A6_Monthly Enterprise - Production::MEC" -"B8F9B850-328D-4355-9145-C59439A0C4CF_Semi Annual Preview - Insiders::FRDC" -"7FFBC6BF-BC32-4F92-8982-F9DD17FD3114_Semi Annual - Production::DC" -"EA4A4090-DE26-49D7-93C1-91BFF9E53FC3_DevMain Channel - Dogfood::DevMain" -"B61285DD-D9F7-41F2-9757-8F61CBA4E9C8_Microsoft Elite - Microsoft::DevMain" -"F2E724C1-748F-4B47-8FB8-8E0D210E9208_Perpetual2019 VL - Production::LTSC" -"1D2D2EA6-1680-4C56-AC58-A441C8C24FF9_Microsoft2019 VL - Microsoft::LTSC" -"5030841D-C919-4594-8D2D-84AE4F96E58E_Perpetual2021 VL - Production::LTSC2021" -"86752282-5841-4120-AC80-DB03AE6B5FDB_Microsoft2021 VL - Microsoft::LTSC2021" -"7983BAC0-E531-40CF-BE00-FD24FE66619C_Perpetual2024 VL - Production::LTSC2024" -"C02D8FE6-5242-4DA8-972F-82EE55E00671_Microsoft2024 VL - Microsoft::LTSC2024" +"5440fd1f-7ecb-4221-8110-145efaa6372f_Insider Fast [Beta] - Insiders::DevMain -" +"64256afe-f5d9-4f86-8936-8840a6a4f5be_Monthly Preview - Insiders::CC -" +"492350f6-3a01-4f97-b9c0-c7c6ddf67d60_Monthly [Current] - Production::CC -" +"55336b82-a18d-4dd6-b5f6-9e5095c314a6_Monthly Enterprise - Production::MEC -" +"b8f9b850-328d-4355-9145-c59439a0c4cf_Semi Annual Preview - Insiders::FRDC -" +"7ffbc6bf-bc32-4f92-8982-f9dd17fd3114_Semi Annual - Production::DC -" +"ea4a4090-de26-49d7-93c1-91bff9e53fc3_DevMain Channel - Dogfood::DevMain -" +"b61285dd-d9f7-41f2-9757-8f61cba4e9c8_Microsoft Elite - Microsoft::DevMain -" +"f2e724c1-748f-4b47-8fb8-8e0d210e9208_Perpetual2019 VL - Production::LTSC -" +"1d2d2ea6-1680-4c56-ac58-a441c8c24ff9_Microsoft2019 VL - Microsoft::LTSC -" +"5030841d-c919-4594-8d2d-84ae4f96e58e_Perpetual2021 VL - Production::LTSC2021 -" +"86752282-5841-4120-ac80-db03ae6b5fdb_Microsoft2021 VL - Microsoft::LTSC2021 -" +"7983bac0-e531-40cf-be00-fd24fe66619c_Perpetual2024 VL - Production::LTSC2024 -" +"c02d8fe6-5242-4da8-972f-82ee55e00671_Microsoft2024 VL - Microsoft::LTSC2024 -" ) do ( for /f "tokens=1-2 delims=_" %%A in ("%%~#") do ( +set bypass= set supported= if %winbuild% LSS 10240 (echo %%B | findstr /i "LTSC DevMain" %nul% || set supported=1) else (set supported=1) if %winbuild% GEQ 10240 ( -if defined ltsc19 echo %%B | find /i "2019 VL" %nul% || set supported= -if defined ltsc21 echo %%B | find /i "2021 VL" %nul% || set supported= -if defined ltsc24 echo %%B | find /i "2024 VL" %nul% || set supported= -if not defined ltscfound echo %%B | find /i "LTSC" %nul% && set supported= +if defined ltsc19 echo %%B | find /i "2019 VL" %nul% || set bypass=1 +if defined ltsc21 echo %%B | find /i "2021 VL" %nul% || set bypass=1 +if defined ltsc24 echo %%B | find /i "2024 VL" %nul% || set bypass=1 +if not defined ltscfound echo %%B | find /i "LTSC" %nul% && set bypass=1 ) if defined supported ( set /a counter+=1 if !counter! LSS 10 ( -echo [!counter!] %%B +if defined bypass (echo [!counter!] %%B Unofficial change method will be used) else (echo [!counter!] %%B) ) else ( -echo [!counter!] %%B +if defined bypass (echo [!counter!] %%B Unofficial change method will be used) else (echo [!counter!] %%B) ) set targetFFN!counter!=%%A set targetchannel!counter!=%%B +if defined bypass set bypassFFN=!bypassFFN!%%A ) ) ) @@ -1061,30 +1102,12 @@ set build= for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getbuild\:.*';iex ($f[1])" %nul6%') do (set build=%%a) echo "%build%" | find /i "16." %nul% || set build= -:: Cleanup Office update related registries, thanks to @abbodi1406 -:: https://techcommunity.microsoft.com/t5/office-365-blog/how-to-manage-office-365-proplus-channels-for-it-pros/ba-p/795813 -:: https://learn.microsoft.com/en-us/microsoft-365-apps/updates/change-update-channels#considerations-when-changing-channels - echo: for /f "tokens=1 delims=-" %%A in ("%targetchannel%") do (echo Target update channel: %%A) -echo: -echo Cleaning Office update registry keys... -echo Adding new update channel to registry keys... +echo Target build number: %build% +echo: %bypassFFN% | find /i "%targetFFN%" %nul% && goto :oe_changeunoff -%nul% reg add %o16c2r_reg%\Configuration /v CDNBaseUrl /t REG_SZ /d "https://officecdn.microsoft.com/pr/%targetFFN%" /f -%nul% reg add %o16c2r_reg%\Configuration /v UpdateChannel /t REG_SZ /d "https://officecdn.microsoft.com/pr/%targetFFN%" /f -%nul% reg add %o16c2r_reg%\Configuration /v UpdateChannelChanged /t REG_SZ /d "True" /f -%nul% reg delete %o16c2r_reg%\Configuration /v UnmanagedUpdateURL /f -%nul% reg delete %o16c2r_reg%\Configuration /v UpdateUrl /f -%nul% reg delete %o16c2r_reg%\Configuration /v UpdatePath /f -%nul% reg delete %o16c2r_reg%\Configuration /v UpdateToVersion /f -%nul% reg delete %o16c2r_reg%\Updates /v UpdateToVersion /f -%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f -%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f /reg:32 -%nul% reg delete HKCU\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f -%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f -%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f /reg:32 -%nul% reg delete HKCU\Software\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f +call :oe_cleanupreg if not defined build ( if %winbuild% GEQ 9200 call :dk_color %Gray% "Failed to detect build number for the target FFN." @@ -1100,6 +1123,76 @@ echo: echo Check this webpage for help - %mas%troubleshoot goto :oe_goback +::======================= + +:: Unofficial method to change channel + +:oe_changeunoff + +set abortchange= +echo %targetchannel% | find /i "2019 VL" %nul% && (for %%A in (%_oIds%) do (echo %%A | find /i "2019Volume" %nul% || set abortchange=1)) +echo %targetchannel% | find /i "2021 VL" %nul% && (for %%A in (%_oIds%) do (echo %%A | find /i "2021Volume" %nul% || set abortchange=1)) +echo %targetchannel% | find /i "2024 VL" %nul% && (for %%A in (%_oIds%) do (echo %%A | find /i "2024Volume" %nul% || set abortchange=1)) + +if defined abortchange ( +%eline% +echo Mismatch found in installed Office products and target update channel. Aborting... +echo Non-perpetual Office products are not suppported with Perpetual VL update channels. +goto :oe_goback +) + +if not defined build ( +%eline% +call :dk_color %Red% "Failed to detect build number for the target FFN." +echo: +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +goto :oe_goback +) + +set buildchk=0 +for /f "tokens=3 delims=." %%a in ("%build%") do set "buildchk=%%a" + +set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%_firstoId%.16_%_lang%_x-none cdnbaseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% baseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% version.16=%build% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%targetFFN% %_firstoId%.excludedapps.16=%_firstoIdExcludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" +set "c2rclientupdate=!c2rcommand! scenario=CLIENTUPDATE" + +if %clverchk% LSS %buildchk% ( +echo: +call :dk_color %Blue% "Do not break the operation in the middle..." +echo: +echo Updating Office C2R client with the command below, please wait... +echo: +echo %c2rclientupdate% +%c2rclientupdate% +for /l %%i in (1,1,30) do (if !clverchk! LSS %buildchk% (call :ch_getinfo&timeout /t 10 %nul%)) +) + +if %clverchk% LSS %buildchk% ( +echo: +call :dk_color %Red% "Failed to update Office C2R client. Aborting..." +echo: +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +goto :oe_goback +) + +call :oe_cleanupreg + +echo Running the below command to change update channel, please wait... +echo: +echo %c2rcommand% +%c2rcommand% +set errorcode=%errorlevel% +timeout /t 10 %nul% + +echo: +if %errorcode% EQU 0 ( +call :dk_color %Gray% "Now run the Office activation option from the main menu." +) else ( +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +) + ::======================================================================================================================================== :oe_goback @@ -1126,6 +1219,36 @@ goto :oemenu ::======================================================================================================================================== +:oe_cleanupreg + +:: Cleanup Office update related registries, thanks to @abbodi1406 +:: https://techcommunity.microsoft.com/t5/office-365-blog/how-to-manage-office-365-proplus-channels-for-it-pros/ba-p/795813 +:: https://learn.microsoft.com/en-us/microsoft-365-apps/updates/change-update-channels#considerations-when-changing-channels + +echo: +echo Cleaning Office update registry keys... +echo Adding new update channel to registry keys... +echo: + +%nul% reg add %o16c2r_reg%\Configuration /v CDNBaseUrl /t REG_SZ /d "https://officecdn.microsoft.com/pr/%targetFFN%" /f +%nul% reg add %o16c2r_reg%\Configuration /v UpdateChannel /t REG_SZ /d "https://officecdn.microsoft.com/pr/%targetFFN%" /f +%nul% reg add %o16c2r_reg%\Configuration /v UpdateChannelChanged /t REG_SZ /d "True" /f +%nul% reg delete %o16c2r_reg%\Configuration /v UnmanagedUpdateURL /f +%nul% reg delete %o16c2r_reg%\Configuration /v UpdateUrl /f +%nul% reg delete %o16c2r_reg%\Configuration /v UpdatePath /f +%nul% reg delete %o16c2r_reg%\Configuration /v UpdateToVersion /f +%nul% reg delete %o16c2r_reg%\Updates /v UpdateToVersion /f +%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f +%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f /reg:32 +%nul% reg delete HKCU\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /f +%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f +%nul% reg delete HKLM\SOFTWARE\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f /reg:32 +%nul% reg delete HKCU\Software\Policies\Microsoft\cloud\office\16.0\Common\officeupdate /f + +exit /b + +::======================================================================================================================================== + :oe_tempcleanup del /f /q %SystemRoot%\Temp\SingleApps_Volume.txt %nul% @@ -1145,6 +1268,7 @@ set _oRoot= set _oArch= set _updch= set _oIds= +set _firstoId= set _lang= set _cfolder= set _version= @@ -1175,9 +1299,13 @@ for /f "tokens=%_tok% delims=\" %%a in ('reg query "%o16c2r_reg%\ProductReleaseI if defined _oIds (set "_oIds=!_oIds! %%a") else (set "_oIds=%%a") ) set _oIds=%_oIds:.16=% +for /f "tokens=1" %%A in ("%_oIds%") do set _firstoId=%%A +for /f "skip=2 tokens=2*" %%a in ('"reg query %o16c2r_reg%\Configuration /v %_firstoId%.ExcludedApps" %nul6%') do (set "_firstoIdExcludelist=%%b") set verchk=0 +set clverchk=0 for /f "tokens=3 delims=." %%a in ("%_version%") do set "verchk=%%a" +for /f "tokens=3 delims=." %%a in ("%_clversion%") do set "clverchk=%%a" if exist "%_oRoot%\Licenses16\c2rpridslicensefiles_auto.xml" set "_c2rXml=%_oRoot%\Licenses16\c2rpridslicensefiles_auto.xml" @@ -1193,16 +1321,13 @@ if exist "%_cfolder%\OfficeC2RClient.exe" ( set "_c2rCexe=%_cfolder%\OfficeC2RClient.exe" ) -set "audidata4=%_AudienceData:~-4%" +:: Check LTSC version files -if /i "%audidata4%"=="LTSC" set ltsc19=LTSC -echo %_clversion% %_version% | findstr "16.0.103 16.0.104 16.0.105" %nul% && set ltsc19=LTSC - -if /i "%audidata4%"=="2021" set ltsc21=LTSC2021 -echo %_clversion% %_version% | findstr "16.0.14332" %nul% && set ltsc21=LTSC2021 - -if /i "%audidata4%"=="2024" set ltsc24=LTSC2024 -:: LTSC 2024 build is not fixed yet +for /f "skip=2 tokens=2*" %%a in ('"reg query %o16c2r_reg%\ProductReleaseIDs\%_actconfig%" /s %nul6%') do ( +echo "%%b" %nul2% | findstr "16.0.103 16.0.104 16.0.105" %nul% && set ltsc19=LTSC +echo "%%b" %nul2% | findstr "16.0.14332" %nul% && set ltsc21=LTSC2021 +echo "%%b" %nul2% | findstr "16.0.17932" %nul% && set ltsc24=LTSC2024 +) if not "%ltsc19%%ltsc21%%ltsc24%"=="" set ltscfound=1 From 6e74d497218be8f47ab7e547c5eb60e677612360 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 23 May 2025 18:20:53 +0530 Subject: [PATCH 013/117] Minor fix --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 3 ++- MAS/Separate-Files-Version/Change_Office_Edition.cmd | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index e43bb90..a95d9e4 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -17943,6 +17943,7 @@ echo: set suggestchannel= if %errorcode% EQU 0 ( +if %change%==1 ( echo %targetedition% | find /i "2019Volume" %nul% && ( if not defined ltsc19 set suggestchannel=Production::LTSC if /i not %_AudienceData%==Production::LTSC set suggestchannel=Production::LTSC @@ -17970,8 +17971,8 @@ if defined suggestchannel ( call :dk_color %Gray% "Mismatch found in update channel and installed product." call :dk_color %Blue% "It is recommended to change the update channel to [!suggestchannel!] from the previous menu." ) - echo: +) call :dk_color %Gray% "To activate Office, run the activation option from the main menu." ) else ( set fixes=%fixes% %mas%troubleshoot diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index a14988b..61c908a 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -806,6 +806,7 @@ echo: set suggestchannel= if %errorcode% EQU 0 ( +if %change%==1 ( echo %targetedition% | find /i "2019Volume" %nul% && ( if not defined ltsc19 set suggestchannel=Production::LTSC if /i not %_AudienceData%==Production::LTSC set suggestchannel=Production::LTSC @@ -833,8 +834,8 @@ if defined suggestchannel ( call :dk_color %Gray% "Mismatch found in update channel and installed product." call :dk_color %Blue% "It is recommended to change the update channel to [!suggestchannel!] from the previous menu." ) - echo: +) call :dk_color %Gray% "To activate Office, run the activation option from the main menu." ) else ( set fixes=%fixes% %mas%troubleshoot From 69c469a9971379b5c3eb955866896cf230e8a6bc Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 23 May 2025 18:56:14 +0530 Subject: [PATCH 014/117] Update old Office version detection with subscription license --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 ++-- .../Activators/Ohook_Activation_AIO.cmd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index a95d9e4..204f400 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -2471,12 +2471,12 @@ call :oh_hookinstall ::======================================================================================================================================== -:: Old version (16.0.9xxxx and below) of Office with subscription license key may show a banner to sign in to fix license issue. +:: Old version of Office with subscription license key may show a banner to sign in to fix license issue. :: Although script applies a Resiliency registry entry to fix that but it doesn't work on old office versions. :: Below code checks that condition and informs the user to update the Office. if defined _sublic ( -if not exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" ( +if not exist "%_oLPath%\Word2021VL_KMS_Client_AE*.xrm-ms" ( call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Office, otherwise, it may show a licensing issue-related banner.]" ) ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 6e06bf1..cee100b 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -671,12 +671,12 @@ call :oh_hookinstall ::======================================================================================================================================== -:: Old version (16.0.9xxxx and below) of Office with subscription license key may show a banner to sign in to fix license issue. +:: Old version of Office with subscription license key may show a banner to sign in to fix license issue. :: Although script applies a Resiliency registry entry to fix that but it doesn't work on old office versions. :: Below code checks that condition and informs the user to update the Office. if defined _sublic ( -if not exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" ( +if not exist "%_oLPath%\Word2021VL_KMS_Client_AE*.xrm-ms" ( call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Office, otherwise, it may show a licensing issue-related banner.]" ) ) From fc80735dacd135daf6f0f1821ff80773022b76a0 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 25 May 2025 00:38:43 +0530 Subject: [PATCH 015/117] Improve fix info in the script --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 20 ++++--------------- .../Change_Office_Edition.cmd | 14 ++----------- .../Change_Windows_Edition.cmd | 6 ++---- 3 files changed, 8 insertions(+), 32 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 204f400..9b215ee 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -16637,8 +16637,7 @@ if not defined allapps ( %eline% echo Failed to find activation IDs. Aborting... echo: -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." goto dk_done ) @@ -16660,8 +16659,7 @@ if not defined osedition ( %eline% echo Failed to detect OS edition, aborting... echo: -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." goto dk_done ) @@ -17460,15 +17458,6 @@ echo: echo Initializing... echo: -if not exist %SysPath%\sppsvc.exe ( -%eline% -echo [%SysPath%\sppsvc.exe] file is missing. Aborting... -echo: -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -goto dk_done -) - ::======================================================================================================================================== set spp=SoftwareLicensingProduct @@ -17502,8 +17491,7 @@ if %osedition%==0 ( %eline% echo Failed to detect OS Edition. Aborting... echo: -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." goto dk_done ) @@ -18296,7 +18284,7 @@ set "c2rclientupdate=!c2rcommand! scenario=CLIENTUPDATE" if %clverchk% LSS %buildchk% ( echo: -call :dk_color %Blue% "Do not break the operation in the middle..." +call :dk_color %Blue% "Do not terminate the operation before it completes..." echo: echo Updating Office C2R client with the command below, please wait... echo: diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 61c908a..6926cd0 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -323,15 +323,6 @@ echo: echo Initializing... echo: -if not exist %SysPath%\sppsvc.exe ( -%eline% -echo [%SysPath%\sppsvc.exe] file is missing. Aborting... -echo: -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -goto dk_done -) - ::======================================================================================================================================== set spp=SoftwareLicensingProduct @@ -365,8 +356,7 @@ if %osedition%==0 ( %eline% echo Failed to detect OS Edition. Aborting... echo: -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." goto dk_done ) @@ -1159,7 +1149,7 @@ set "c2rclientupdate=!c2rcommand! scenario=CLIENTUPDATE" if %clverchk% LSS %buildchk% ( echo: -call :dk_color %Blue% "Do not break the operation in the middle..." +call :dk_color %Blue% "Do not terminate the operation before it completes..." echo: echo Updating Office C2R client with the command below, please wait... echo: diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index eaa0956..5bfc43e 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -390,8 +390,7 @@ if not defined allapps ( %eline% echo Failed to find activation IDs. Aborting... echo: -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." goto dk_done ) @@ -413,8 +412,7 @@ if not defined osedition ( %eline% echo Failed to detect OS edition, aborting... echo: -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." goto dk_done ) From be867f6616e7408342c00346bcee49268b966778 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 27 May 2025 19:32:44 +0530 Subject: [PATCH 016/117] Update links --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 12 +++++++----- .../Activators/HWID_Activation.cmd | 6 ++++-- .../Activators/KMS38_Activation.cmd | 6 ++++-- .../Activators/Ohook_Activation_AIO.cmd | 6 ++++-- .../Activators/Online_KMS_Activation.cmd | 6 ++++-- .../Activators/TSforge_Activation.cmd | 6 ++++-- MAS/Separate-Files-Version/Change_Office_Edition.cmd | 8 +++++--- .../Change_Windows_Edition.cmd | 6 ++++-- MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 6 ++++-- MAS/Separate-Files-Version/Troubleshoot.cmd | 8 +++++--- 10 files changed, 45 insertions(+), 25 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 9b215ee..ced0953 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -67,6 +67,8 @@ exit /b set "blank=" set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/" +set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts" +set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts" :: Check if Null service is working, it's important for the batch script @@ -334,7 +336,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) +if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b) ) ) @@ -431,7 +433,7 @@ choice /C:123456789EH0 /N set _erl=%errorlevel% if %_erl%==12 exit /b -if %_erl%==11 start %mas%troubleshoot & goto :MainMenu +if %_erl%==11 (start %selfgit% & start %github% & start %mas%troubleshoot & goto :MainMenu) if %_erl%==10 goto :Extras if %_erl%==9 setlocal & call :troubleshoot & cls & endlocal & goto :MainMenu if %_erl%==8 setlocal & call :change_offedition & cls & endlocal & goto :MainMenu @@ -2004,7 +2006,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( @@ -15530,7 +15532,7 @@ if %_erl%==5 goto:retokens if %_erl%==4 goto:fixwmi if %_erl%==3 goto:sfcscan if %_erl%==2 goto:dism_rest -if %_erl%==1 start %mas%troubleshoot.html &goto at_menu +if %_erl%==1 (start %selfgit% & start %github% & start %mas%troubleshoot & goto at_menu) goto :at_menu ::======================================================================================================================================== @@ -18331,7 +18333,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 goto :oemenu -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 02be6af..2b1fe2e 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -100,6 +100,8 @@ set "nul=" set "blank=" set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/" +set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts" +set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts" :: Check if Null service is working, it's important for the batch script @@ -356,7 +358,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) +if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b) ) ) @@ -1707,7 +1709,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index e909532..eed6d3b 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -103,6 +103,8 @@ set "nul=" set "blank=" set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/" +set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts" +set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts" :: Check if Null service is working, it's important for the batch script @@ -359,7 +361,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) +if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b) ) ) cls @@ -1850,7 +1852,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index cee100b..9904958 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -100,6 +100,8 @@ set "nul=" set "blank=" set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/" +set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts" +set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts" :: Check if Null service is working, it's important for the batch script @@ -364,7 +366,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) +if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b) ) ) cls @@ -2368,7 +2370,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 321095a..a5ff772 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -125,6 +125,8 @@ set "nul=" set "blank=" set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/" +set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts" +set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts" :: Check if Null service is working, it's important for the batch script @@ -395,7 +397,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) +if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b) ) ) @@ -3424,7 +3426,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 444a20b..d1ecff3 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -129,6 +129,8 @@ set "nul=" set "blank=" set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/" +set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts" +set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts" :: Check if Null service is working, it's important for the batch script @@ -413,7 +415,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) +if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b) ) ) @@ -3037,7 +3039,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 6926cd0..652109d 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -60,6 +60,8 @@ exit /b set "blank=" set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/" +set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts" +set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts" :: Check if Null service is working, it's important for the batch script @@ -309,7 +311,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) +if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b) ) ) @@ -1196,7 +1198,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 goto :oemenu -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( @@ -1593,7 +1595,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 5bfc43e..9ff5535 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -65,6 +65,8 @@ exit /b set "blank=" set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/" +set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts" +set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts" :: Check if Null service is working, it's important for the batch script @@ -314,7 +316,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) +if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b) ) ) @@ -1056,7 +1058,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index f1049bd..29c50cb 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -60,6 +60,8 @@ exit /b set "blank=" set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/" +set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts" +set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts" :: Check if Null service is working, it's important for the batch script @@ -325,7 +327,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) +if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b) ) ) @@ -732,7 +734,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index ce82567..5df6110 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -60,6 +60,8 @@ exit /b set "blank=" set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/" +set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts" +set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts" :: Check if Null service is working, it's important for the batch script @@ -326,7 +328,7 @@ echo: call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & start %mas% & exit /b) +if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b) ) ) @@ -387,7 +389,7 @@ if %_erl%==5 goto:retokens if %_erl%==4 goto:fixwmi if %_erl%==3 goto:sfcscan if %_erl%==2 goto:dism_rest -if %_erl%==1 start %mas%troubleshoot.html &goto at_menu +if %_erl%==1 (start %selfgit% & start %github% & start %mas%troubleshoot & goto at_menu) goto :at_menu ::======================================================================================================================================== @@ -1489,7 +1491,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. " call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==2 exit /b -if !errorlevel!==1 (start https://git.activated.win/massg%-%rave/Micr%-%osoft-Act%-%ivation-Scripts & start https://github.com/massgra%-%vel/Micro%-%soft-Acti%-%vation-Scripts & for %%# in (%fixes%) do (start %%#)) +if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( From a99acbb02557409e553f2e2c9cb906b8682cfb04 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 27 May 2025 20:43:23 +0530 Subject: [PATCH 017/117] Update Powershell error detection code --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 16 ++++++++++++---- .../Activators/HWID_Activation.cmd | 16 ++++++++++++---- .../Activators/KMS38_Activation.cmd | 16 ++++++++++++---- .../Activators/Ohook_Activation_AIO.cmd | 16 ++++++++++++---- .../Activators/Online_KMS_Activation.cmd | 16 ++++++++++++---- .../Activators/TSforge_Activation.cmd | 16 ++++++++++++---- .../Change_Office_Edition.cmd | 16 ++++++++++++---- .../Change_Windows_Edition.cmd | 16 ++++++++++++---- .../Extract_OEM_Folder.cmd | 16 ++++++++++++---- MAS/Separate-Files-Version/Troubleshoot.cmd | 16 ++++++++++++---- 10 files changed, 120 insertions(+), 40 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index ced0953..9d2c61f 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -219,12 +219,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[ if /i not "%tstresult%"=="FullLanguage" ( %eline% -echo: %tstresult% -cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode" +for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a) +echo Test 1 - %tstresult% +echo Test 2 - !tstresult2! +echo: REM check LanguageMode -cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( +echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo FullLanguage mode not found in PowerShell. Aborting... echo If you have applied restrictions on Powershell then undo those changes. echo: @@ -254,7 +256,13 @@ goto dk_done REM check antivirus and other errors echo PowerShell is not working properly. Aborting... -cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }""" + +if /i "!tstresult2!"=="FullLanguage" ( +echo: +echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" +) + echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 2b1fe2e..34fe81d 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -241,12 +241,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[ if /i not "%tstresult%"=="FullLanguage" ( %eline% -echo: %tstresult% -cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode" +for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a) +echo Test 1 - %tstresult% +echo Test 2 - !tstresult2! +echo: REM check LanguageMode -cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( +echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo FullLanguage mode not found in PowerShell. Aborting... echo If you have applied restrictions on Powershell then undo those changes. echo: @@ -276,7 +278,13 @@ goto dk_done REM check antivirus and other errors echo PowerShell is not working properly. Aborting... -cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }""" + +if /i "!tstresult2!"=="FullLanguage" ( +echo: +echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" +) + echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index eed6d3b..c9aa57f 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -244,12 +244,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[ if /i not "%tstresult%"=="FullLanguage" ( %eline% -echo: %tstresult% -cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode" +for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a) +echo Test 1 - %tstresult% +echo Test 2 - !tstresult2! +echo: REM check LanguageMode -cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( +echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo FullLanguage mode not found in PowerShell. Aborting... echo If you have applied restrictions on Powershell then undo those changes. echo: @@ -279,7 +281,13 @@ goto dk_done REM check antivirus and other errors echo PowerShell is not working properly. Aborting... -cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }""" + +if /i "!tstresult2!"=="FullLanguage" ( +echo: +echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" +) + echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 9904958..aa321b3 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -249,12 +249,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[ if /i not "%tstresult%"=="FullLanguage" ( %eline% -echo: %tstresult% -cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode" +for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a) +echo Test 1 - %tstresult% +echo Test 2 - !tstresult2! +echo: REM check LanguageMode -cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( +echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo FullLanguage mode not found in PowerShell. Aborting... echo If you have applied restrictions on Powershell then undo those changes. echo: @@ -284,7 +286,13 @@ goto dk_done REM check antivirus and other errors echo PowerShell is not working properly. Aborting... -cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }""" + +if /i "!tstresult2!"=="FullLanguage" ( +echo: +echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" +) + echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index a5ff772..db8bba9 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -280,12 +280,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[ if /i not "%tstresult%"=="FullLanguage" ( %eline% -echo: %tstresult% -cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode" +for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a) +echo Test 1 - %tstresult% +echo Test 2 - !tstresult2! +echo: REM check LanguageMode -cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( +echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo FullLanguage mode not found in PowerShell. Aborting... echo If you have applied restrictions on Powershell then undo those changes. echo: @@ -315,7 +317,13 @@ goto dk_done REM check antivirus and other errors echo PowerShell is not working properly. Aborting... -cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }""" + +if /i "!tstresult2!"=="FullLanguage" ( +echo: +echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" +) + echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index d1ecff3..5c0a10b 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -298,12 +298,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[ if /i not "%tstresult%"=="FullLanguage" ( %eline% -echo: %tstresult% -cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode" +for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a) +echo Test 1 - %tstresult% +echo Test 2 - !tstresult2! +echo: REM check LanguageMode -cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( +echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo FullLanguage mode not found in PowerShell. Aborting... echo If you have applied restrictions on Powershell then undo those changes. echo: @@ -333,7 +335,13 @@ goto dk_done REM check antivirus and other errors echo PowerShell is not working properly. Aborting... -cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }""" + +if /i "!tstresult2!"=="FullLanguage" ( +echo: +echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" +) + echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 652109d..eed5d70 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -194,12 +194,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[ if /i not "%tstresult%"=="FullLanguage" ( %eline% -echo: %tstresult% -cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode" +for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a) +echo Test 1 - %tstresult% +echo Test 2 - !tstresult2! +echo: REM check LanguageMode -cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( +echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo FullLanguage mode not found in PowerShell. Aborting... echo If you have applied restrictions on Powershell then undo those changes. echo: @@ -229,7 +231,13 @@ goto dk_done REM check antivirus and other errors echo PowerShell is not working properly. Aborting... -cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }""" + +if /i "!tstresult2!"=="FullLanguage" ( +echo: +echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" +) + echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 9ff5535..e93db0c 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -199,12 +199,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[ if /i not "%tstresult%"=="FullLanguage" ( %eline% -echo: %tstresult% -cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode" +for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a) +echo Test 1 - %tstresult% +echo Test 2 - !tstresult2! +echo: REM check LanguageMode -cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( +echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo FullLanguage mode not found in PowerShell. Aborting... echo If you have applied restrictions on Powershell then undo those changes. echo: @@ -234,7 +236,13 @@ goto dk_done REM check antivirus and other errors echo PowerShell is not working properly. Aborting... -cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }""" + +if /i "!tstresult2!"=="FullLanguage" ( +echo: +echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" +) + echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 29c50cb..9b43ac2 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -210,12 +210,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[ if /i not "%tstresult%"=="FullLanguage" ( %eline% -echo: %tstresult% -cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode" +for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a) +echo Test 1 - %tstresult% +echo Test 2 - !tstresult2! +echo: REM check LanguageMode -cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( +echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo FullLanguage mode not found in PowerShell. Aborting... echo If you have applied restrictions on Powershell then undo those changes. echo: @@ -245,7 +247,13 @@ goto done2 REM check antivirus and other errors echo PowerShell is not working properly. Aborting... -cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }""" + +if /i "!tstresult2!"=="FullLanguage" ( +echo: +echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" +) + echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 5df6110..d35e046 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -211,12 +211,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[ if /i not "%tstresult%"=="FullLanguage" ( %eline% -echo: %tstresult% -cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode" +for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a) +echo Test 1 - %tstresult% +echo Test 2 - !tstresult2! +echo: REM check LanguageMode -cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( +echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo FullLanguage mode not found in PowerShell. Aborting... echo If you have applied restrictions on Powershell then undo those changes. echo: @@ -246,7 +248,13 @@ goto dk_done REM check antivirus and other errors echo PowerShell is not working properly. Aborting... -cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }""" + +if /i "!tstresult2!"=="FullLanguage" ( +echo: +echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" +) + echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" From 8ed0c6874bf63f3b3c9499a7cd7546611f75be02 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 27 May 2025 22:04:35 +0530 Subject: [PATCH 018/117] Suggest TSforge for Office where Windows is not supposed to get feature upgrades --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 9d2c61f..b8026db 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -396,7 +396,16 @@ if not defined terminal mode 76, 34 if %winbuild% GEQ 10240 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" set _hwidgo=1 if %winbuild% GTR 14393 if exist "%SysPath%\spp\tokens\skus\EnterpriseSN\" set _hwidgo= if not defined _hwidgo set _tsforgego=1 + set _ohookgo=1 +if %winbuild% GEQ 9200 ( +if %winbuild% LSS 10240 set _ohookgo= +if %winbuild% GEQ 19041 if %winbuild% LEQ 19045 set _ohookgo= +if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" set _ohookgo= +if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" set _ohookgo= +if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-EnterpriseS*dition~*.mum" set _ohookgo= +) +if not defined _ohookgo set _tsforgego=1 echo: echo: From 9f244ddc179b3fd3479aebec58cbc26c1bebb78a Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 27 May 2025 22:10:02 +0530 Subject: [PATCH 019/117] Fix grammar --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 6 +++--- .../Activators/Ohook_Activation_AIO.cmd | 2 +- .../Activators/Online_KMS_Activation.cmd | 2 +- .../Activators/TSforge_Activation.cmd | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index b8026db..a5761b0 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -2348,7 +2348,7 @@ call :dk_color %Red% "Checking Installed Office [Not Found]" if defined ohub ( echo: -echo You only have the Office dashboard app installed, you need to install the full version of Office. +echo You only have the Office Dashboard app installed. You need to install the full version of Office. ) echo: call :dk_color %Blue% "Download and install Office from the below URL and then try again." @@ -4654,7 +4654,7 @@ call :dk_color %Gray% "Checking Installed Office [Not Found]" if defined ohub ( echo: -echo You have only Office dashboard app installed, you need to install full Office version. +echo You only have the Office Dashboard app installed. You need to install the full version of Office. ) call :dk_color %Blue% "Download and install Office from below URL and try again." if %_actwin%==0 set fixes=%fixes% %mas%genuine-installation-media @@ -12083,7 +12083,7 @@ call :dk_color %Red% "Checking Installed Office [Not Found]" if defined ohub ( echo: -echo You have only Office dashboard app installed, you need to install full Office version. +echo You only have the Office Dashboard app installed. You need to install the full version of Office. ) call :dk_color %Blue% "Download and install Office from below URL and try again." set fixes=%fixes% %mas%genuine-installation-media diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index aa321b3..ac11d16 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -539,7 +539,7 @@ call :dk_color %Red% "Checking Installed Office [Not Found]" if defined ohub ( echo: -echo You only have the Office dashboard app installed, you need to install the full version of Office. +echo You only have the Office Dashboard app installed. You need to install the full version of Office. ) echo: call :dk_color %Blue% "Download and install Office from the below URL and then try again." diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index db8bba9..200c69e 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -784,7 +784,7 @@ call :dk_color %Red% "Checking Installed Office [Not Found]" if defined ohub ( echo: -echo You have only Office dashboard app installed, you need to install full Office version. +echo You only have the Office Dashboard app installed. You need to install the full version of Office. ) call :dk_color %Blue% "Download and install Office from below URL and try again." set fixes=%fixes% %mas%genuine-installation-media diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 5c0a10b..33e8f7c 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1054,7 +1054,7 @@ call :dk_color %Gray% "Checking Installed Office [Not Found]" if defined ohub ( echo: -echo You have only Office dashboard app installed, you need to install full Office version. +echo You only have the Office Dashboard app installed. You need to install the full version of Office. ) call :dk_color %Blue% "Download and install Office from below URL and try again." if %_actwin%==0 set fixes=%fixes% %mas%genuine-installation-media From 9073a35fe00b7b40b8086a0036e4f13a20e9d4f4 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 1 Jun 2025 20:27:57 +0530 Subject: [PATCH 020/117] Add StaticCID and KMS4k method in TSforge --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 934 +++++++++++++++-- .../Activators/TSforge_Activation.cmd | 987 ++++++++++++++++-- README.md | 234 ++--- 3 files changed, 1891 insertions(+), 264 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index a5761b0..9c90b53 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -3976,6 +3976,11 @@ set tsids= :: To reset rearm counter, evaluation period and clear the tamper state, key lock, run the script with "/Z-Reset" parameter or change 0 to 1 in below line set _resall=0 +:: Choose activation method: +:: In builds 19041 and later, the script will auto select StaticCID (requires internet). If no internet is detected, it will then auto select the KMS4k method. For builds lower than 19041, the script will auto select ZeroCID. +:: To change the activation method, run the script with the parameters "/Z-SCID", "/Z-ZCID", or "/Z-KMS4k", or modify the option from Auto to SCID, ZCID, or KMS4k in the line below. +set _actmethod=Auto + :: Debug Mode: :: To run the script in debug mode, change 0 to any parameter above that you want to run, in below line set "_debug=0" @@ -4010,10 +4015,14 @@ if /i "%%A"=="/Z-OffHost" (set _actoffhost=1) if /i "%%A"=="/Z-APPX" (set _actappx=1) echo "%%A" | find /i "/Z-ID-" >nul && (set _actman=1& set "filtsids=%%A" & call set "filtsids=%%filtsids:~6%%" & if defined filtsids call set tsids=%%filtsids%% %%tsids%%) if /i "%%A"=="/Z-Reset" (set _resall=1) +if /i "%%A"=="/Z-SCID" (set _actmethod=SCID) +if /i "%%A"=="/Z-ZCID" (set _actmethod=ZCID) +if /i "%%A"=="/Z-KMS4k" (set _actmethod=KMS4k) ) if not defined tsids set _actman=0 for %%A in (%_actwin% %_actesu% %_actoff% %_actprojvis% %_actwinesuoff% %_actwinhost% %_actoffhost% %_actappx% %_actman% %_resall%) do (if "%%A"=="1" set _unattended=1) +if /i not %_actmethod%==Auto set _unattended=1 if %winbuild% LSS 7600 ( reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" /v Install %nul2% | find /i "0x1" %nul1% || ( @@ -4059,6 +4068,7 @@ echo [E] Reset - Rearm/Timers ) else ( echo [E] Reset - Rearm/Timers/Tamper/Lock ) +echo [F] Change - Activation Method [%_actmethod%] echo _______________________________________________ echo: echo [6] Remove TSforge Activation @@ -4067,12 +4077,13 @@ echo [0] %_exitmsg% echo ______________________________________________________________ echo: call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard..." -choice /C:12345ABCDE670 /N +choice /C:12345ABCDEF670 /N set _el=!errorlevel! -if !_el!==13 exit /b -if !_el!==12 start %mas%genuine-installation-media & goto :ts_menu -if !_el!==11 call :ts_remove & cls & goto :ts_menu +if !_el!==14 exit /b +if !_el!==13 start %mas%genuine-installation-media & goto :ts_menu +if !_el!==12 call :ts_remove & cls & goto :ts_menu +if !_el!==11 goto :ts_changemethod if !_el!==10 cls & setlocal & set "_resall=1" & call :ts_start & endlocal & cls & goto :ts_menu if !_el!==9 cls & setlocal & set "_actman=1" & call :ts_start & endlocal & cls & goto :ts_menu if !_el!==8 cls & setlocal & set "_actappx=1" & call :ts_start & endlocal & cls & goto :ts_menu @@ -4088,6 +4099,54 @@ goto :ts_menu ::======================================================================================================================================== +:ts_changemethod + +cls +if not defined terminal mode 76, 36 + +echo: +echo: +echo: +echo ______________________________________________________________ +echo: +call :dk_color2 %_White% " [1] " %_Green% " Auto" +echo Build 19041 and later: +echo Uses StaticCID, or KMS4k if offline. +echo Older builds: Uses ZeroCID. +echo _______________________________________________ +echo: +echo [2] StaticCID +echo Needs Internet. +echo Not for Windows 7 or older. +echo _______________________________________________ +echo: +echo [3] ZeroCID +echo Works only on builds below 19041. +echo _______________________________________________ +echo: +echo [4] KMS4k +echo This applies only to volume products. +echo Activates for 4000+ years using KMS. +echo _______________________________________________ +echo: +echo [5] Learn More +echo [0] %_exitmsg% +echo ______________________________________________________________ +echo: +call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard..." +choice /C:123450 /N +set _el=!errorlevel! + +if !_el!==6 goto :ts_menu +if !_el!==5 cls & start %mas%tsforge &goto :ts_menu +if !_el!==4 cls & set "_actmethod=KMS4k" & goto :ts_menu +if !_el!==3 cls & set "_actmethod=ZCID" & goto :ts_menu +if !_el!==2 cls & set "_actmethod=SCID" & goto :ts_menu +if !_el!==1 cls & set "_actmethod=Auto" & goto :ts_menu +goto :ts_changemethod + +::======================================================================================================================================== + :ts_start cls @@ -4168,6 +4227,57 @@ cls echo: call :dk_showosinfo +if /i %_actmethod%==SCID set tsmethod=StaticCID +if /i %_actmethod%==ZCID set tsmethod=ZeroCID +if /i %_actmethod%==KMS4k set tsmethod=KMS4k + +if /i %_actmethod%==Auto ( +if %winbuild% GEQ 19041 ( +set tsmethod=StaticCID +) else ( +set tsmethod=ZeroCID +) +) + +if %winbuild% LSS 9200 if /i %tsmethod%==StaticCID ( +%eline% +echo StaticCID method is supported only on Windows 8 and later. +goto dk_done +) + +::======================================================================================================================================== + +:: Check Internet connection + +if /i %tsmethod%==StaticCID ( +set _int= +for %%a in (l.root-servers.net resolver1.opendns.com download.windowsupdate.com google.com) do if not defined _int ( +for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not "%%#"=="" set _int=1) +) + +if not defined _int ( +%psc% "If([Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]'{DCB00C01-570F-4A9B-8D69-199FDBA5723B}')).IsConnectedToInternet){Exit 0}Else{Exit 1}" +if !errorlevel!==0 (set _int=1&set ping_f= But Ping Failed) +) + +if defined _int ( +echo Checking Internet Connection [Connected!ping_f!] +) else ( +if /i %_actmethod%==Auto if not %_actman%==1 set tsmethod=KMS4k +if /i !tsmethod!==KMS4k ( +call :dk_color %Gray% "Checking Internet Connection [Not Connected]" +call :dk_color %Blue% "Switching To KMS4k Activation Method because Internet is needed for StaticCID method." +) else ( +set error=1 +call :dk_color %Red% "Checking Internet Connection [Not Connected]" +call :dk_color %Blue% "Internet is required for TSforge StaticCID option." +) +echo: +) +) + +::======================================================================================================================================== + echo Initiating Diagnostic Tests... set "_serv=%_slser% Winmgmt" @@ -4185,6 +4295,11 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto :dk_done ) +if /i !tsmethod!==KMS4k ( +call :_taskclear-cache +echo Clearing %KS% Cache [Successful] +) + ::======================================================================================================================================== if %_resall%==1 goto :ts_resetall @@ -4206,16 +4321,23 @@ echo %tsedition% | find /i "Eval" %nul1% && ( goto :ts_wineval ) -call :ts_checkwinperm +set /a UBR=0 +if %winbuild% EQU 26100 ( +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 !UBR! LSS 4188 (set dontcheckact=1) +) + +if not defined dontcheckact call :ts_checkwinperm if defined _perm ( call :dk_color %Gray% "Checking OS Activation [Windows is already permanently activated]" goto :ts_esu ) +if %winbuild% LSS 9200 if /i %tsmethod%==KMS4k goto :ts_oldks if defined _vis goto :ts_winvista set tempid= -set keytype=zero +if /i %tsmethod%==KMS4k (set keytype=ks) else (set keytype=zero) for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -4225,6 +4347,13 @@ echo Checking Activation ID [%tempid%] [%tsedition%] ) else ( call :dk_color %Red% "Checking Activation ID [Not Found] [%tsedition%] [%osSKU%]" set error=1 +if /i %tsmethod%==KMS4k ( +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +) goto :ts_esu ) @@ -4232,6 +4361,83 @@ if defined winsub ( call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] found. Script will activate base edition [SKU ID-%regSKU%]." echo: ) + +goto :ts_esu + +::======================================================================================================================================== + +:ts_oldks + +:: KMS keys for KMS4k method because TSforge cannot install KMS key on Windows Vista and 7 + +:: 1st column = Activation ID +:: 2nd column = Generic key +:: 3rd column = Edition ID +:: Separator = _ + +set f= +set key= +set tempid= +if not defined allapps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f + +for %%# in ( +:: Windows 7 +ae2ee509-1b34-41c0-acb7-6d4650168915_33PXH-7Y6KF-2VJC9-XBBR8-HV%f%THH_Enterprise +1cb6d605-11b3-4e14-bb30-da91c8e3983a_YDRBP-3D83W-TY26F-D46B2-XC%f%KRJ_EnterpriseN +b92e9980-b9d5-4821-9c94-140f632f6312_FJ82H-XT6CR-J8D7P-XQJJ2-GP%f%DD4_Professional +54a09a0d-d57b-4c10-8b69-a842d6590ad5_MRPKT-YTG23-K7D7T-X2JMM-QY%f%7MG_ProfessionalN +db537896-376f-48ae-a492-53d0547773d0_YBYF6-BHCR3-JPKRB-CDW7B-F9%f%BK4_Embedded_POSReady +aa6dd3aa-c2b4-40e2-a544-a6bbb3f5c395_73KQT-CD9G6-K7TQG-66MRP-CQ%f%22C_Embedded_ThinPC +5a041529-fef8-4d07-b06f-b59b573b32d2_W82YF-2Q76Y-63HXB-FGJG9-GF%f%7QX_ProfessionalE +46bbed08-9c7b-48fc-a614-95250573f4ea_C29WB-22CC8-VJ326-GHFJW-H9%f%DH4_EnterpriseE +:: Windows Server 2008 R2 +68531fb9-5511-4989-97be-d11a0f55633f_YC6KT-GKW9T-YTKYR-T4X34-R7%f%VHC_ServerStandard +7482e61b-c589-4b7f-8ecc-46d455ac3b87_74YFP-3QFB3-KQT8W-PMXWJ-7M%f%648_ServerDatacenter +620e2b3d-09e7-42fd-802a-17a13652fe7a_489J6-VHDMP-X63PK-3K798-CP%f%X3Y_ServerEnterprise +7482e61b-c589-4b7f-8ecc-46d455ac3b87_74YFP-3QFB3-KQT8W-PMXWJ-7M%f%648_ServerDatacenterCore +68531fb9-5511-4989-97be-d11a0f55633f_YC6KT-GKW9T-YTKYR-T4X34-R7%f%VHC_ServerStandardCore +620e2b3d-09e7-42fd-802a-17a13652fe7a_489J6-VHDMP-X63PK-3K798-CP%f%X3Y_ServerEnterpriseCore +8a26851c-1c7e-48d3-a687-fbca9b9ac16b_GT63C-RJFQ3-4GMB6-BRFB9-CB%f%83V_ServerEnterpriseIA64 +a78b8bd9-8017-4df5-b86a-09f756affa7c_6TPJF-RBVHG-WBW2R-86QPH-6R%f%TM4_ServerWeb +cda18cf3-c196-46ad-b289-60c072869994_TT8MH-CG224-D3D7Q-498W2-9Q%f%CTX_ServerHPC +a78b8bd9-8017-4df5-b86a-09f756affa7c_6TPJF-RBVHG-WBW2R-86QPH-6R%f%TM4_ServerWebCore +f772515c-0e87-48d5-a676-e6962c3e1195_736RG-XDKJK-V34PF-BHK87-J6%f%X3K_ServerEmbeddedSolution +:: Windows Vista +cfd8ff08-c0d7-452b-9f60-ef5c70c32094_VKK3X-68KWM-X2YGT-QR4M6-4B%f%WMV_Enterprise +4f3d1606-3fea-4c01-be3c-8d671c401e3b_YFKBB-PQJJV-G996G-VWGXY-2V%f%3X8_Business +2c682dc2-8b68-4f63-a165-ae291d4cf138_HMBQG-8H2RH-C77VX-27R82-VM%f%QBT_BusinessN +d4f54950-26f2-4fb4-ba21-ffab16afcade_VTC42-BM838-43QHV-84HX6-XJ%f%XKV_EnterpriseN +:: Windows Server 2008 +ad2542d4-9154-4c6d-8a44-30f11ee96989_TM24T-X9RMF-VWXK6-X8JC9-BF%f%GM2_ServerStandard +68b6e220-cf09-466b-92d3-45cd964b9509_7M67G-PC374-GR742-YH8V4-TC%f%BY3_ServerDatacenter +c1af4d90-d1bc-44ca-85d4-003ba33db3b9_YQGMW-MPWTJ-34KDK-48M3W-X4%f%Q6V_ServerEnterprise +01ef176b-3e0d-422a-b4f8-4ea880035e8f_4DWFP-JF3DJ-B7DTH-78FJB-PD%f%RHK_ServerEnterpriseIA64 +ddfa9f7c-f09e-40b9-8c1a-be877a9a7f4b_WYR28-R7TFJ-3X2YQ-YCY4H-M2%f%49D_ServerWeb +7afb1156-2c1d-40fc-b260-aab7442b62fe_RCTX3-KWVHP-BR6TB-RB6DM-6X%f%7HP_ServerComputeCluster +2401e3d0-c50a-4b58-87b2-7e794b7d2607_W7VD6-7JFBR-RX26B-YKQ3Y-6F%f%FFJ_ServerStandardV +fd09ef77-5647-4eff-809c-af2b64659a45_22XQ2-VRXRG-P8D42-K34TD-G3%f%QQC_ServerDatacenterV +8198490a-add0-47b2-b3ba-316b12d647b4_39BXF-X8Q23-P2WWT-38T2F-G3%f%FPG_ServerEnterpriseV +) do ( +for /f "tokens=1-3 delims=_" %%A in ("%%#") do if %tsedition%==%%C if not defined key ( +echo "%allapps%" | find /i "%%A" %nul1% && ( +set key=%%B +set tempid=%%A +) +) +) + +if not defined key ( +call :dk_color %Red% "Checking Activation ID [%tsedition% SKU-%osSKU% %KS% key is not available]" +call :dk_color %Blue% "Use ZeroCID activation method from the previous menu." +goto :ts_esu +) + +echo Checking Activation ID [%tempid%] [%tsedition%] + +set oldks=1 +set generickey=1 +call :dk_inskey "[%key%]" +set tsids=%tsids% %tempid% goto :ts_esu ::======================================================================================================================================== @@ -4441,6 +4647,15 @@ call :dk_inskey "[%key%]" :ts_esu if not %_actesu%==1 goto :ts_off +if /i %tsmethod%==KMS4k ( +call :dk_color %Red% "Skipping Windows ESU [KMS4k method is not supported with Windows ESU]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +goto :ts_off +) :: Process Windows ESU @@ -4528,8 +4743,12 @@ goto :ts_off if defined esuexistbutnosup ( call :dk_color %Red% "Checking Activation ID [Commercial ESU is not supported for %tsedition%]" +echo %esueditionlist% | find /i "Professional" %nul1% && ( +call :dk_color %Blue% "Go back to Main Menu, select Change Windows Edition option, and change it to [Professional] or any non-Home edition." +) || ( call :dk_color %Blue% "Go back to Main Menu, select Change Windows Edition option and change to any of the below listed editions." echo [%esueditionlist%] +) goto :ts_off ) @@ -4804,6 +5023,24 @@ call :ts_process ::======================================================================================================================================== +:: mass grave[.]dev/office-license-is-not-genuine +:: Add registry keys for volume products so that 'non-genuine' banner won't appear + +set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" +if /i %tsmethod%==KMS4k ( +if %winbuild% GEQ 9200 ( +if not "%osarch%"=="x86" ( +reg delete "%kmskey%" /f /reg:32 %nul% +reg add "%kmskey%" /f /v KeyManagementServiceName /t REG_SZ /d "10.0.0.10" /reg:32 %nul% +) +reg delete "%kmskey%" /f %nul% +reg add "%kmskey%" /f /v KeyManagementServiceName /t REG_SZ /d "10.0.0.10" %nul% +echo Adding a Registry to Prevent Banner [Successful] +) +) + +::======================================================================================================================================== + :ts_startmsi if defined o15msi call :ts_processmsi 15 %o15msi_reg% @@ -4827,6 +5064,17 @@ goto :ts_act echo: echo Processing Windows %KS% Host... +if /i %tsmethod%==KMS4k ( +echo: +call :dk_color %Red% "Skipping Windows %KS% Host [KMS4k method is not supported with Windows %KS% Host]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +goto :ts_act +) + echo: if %winbuild% GEQ 10586 ( call :dk_color %Gray% "With %KS% Host license, system may randomly change Windows Edition later. It is a Windows issue and can be safely ignored." @@ -4938,6 +5186,17 @@ call :dk_color %Blue% "Windows Vista and Server 2008 do not support the installa goto :ts_act ) +if /i %tsmethod%==KMS4k ( +echo: +call :dk_color %Red% "Skipping Office %KS% Host [KMS4k method is not supported with Office %KS% Host]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +goto :ts_act +) + set ohostexist= call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 set ohostids=%allapps% @@ -4990,6 +5249,17 @@ call :dk_color %Gray% "Checking Activation ID [APPX Sideloading goto :dk_done ) +if /i %tsmethod%==KMS4k ( +echo: +call :dk_color %Red% "Skipping Windows 8/8.1 APPX [KMS4k method is not supported with Windows 8/8.1 APPX]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +goto :dk_done +) + set appxexist= if not defined allapps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f @@ -5048,6 +5318,17 @@ echo: echo Processing Manual Activation... echo: +if /i %tsmethod%==KMS4k ( +echo: +call :dk_color %Red% "Skipping Manual Activation [KMS4k method is not supported with it]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +goto :dk_done +) + call :dk_color %Gray% "This option is for advanced users, those who already know what they are doing." call :dk_color %Blue% "Some activation IDs may cause system crash [MUI mismatch], or irreversible changes [CloudEdition etc]." @@ -5207,12 +5488,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble if defined tsids ( echo: -if not defined _vis echo Installing Forged Product Key Data... -echo Depositing Zero Confirmation ID... +if not defined _vis if not defined oldks echo Installing Forged Product Key Data... +if /i %tsmethod%==KMS4k ( +echo Writing TrustedStore data... +) else ( +if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (echo Depositing Zero Confirmation ID...) +) echo: %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( -if %_actman%==0 call :dk_color %Blue% "%_fixmsg%" +if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) else ( @@ -5328,6 +5613,19 @@ set _preview= set _License=%%# set skipprocess= + +set foundprod= +call :tsksdata chkprod %%# +if defined _oMSI if not defined foundprod if /i %tsmethod%==KMS4k ( +set skipprocess=1 +call :dk_color %Red% "Checking Product In Script [%%# MSI Retail is not supported with KMS4k]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +) + if "%_actprojvis%"=="1" ( echo %%# | findstr /i "Project Visio" %nul% || ( set skipprocess=1 @@ -5335,8 +5633,17 @@ call :dk_color %Gray% "Skipping Because Project/Visio Mode [%%#]" ) ) +if "%_actprojvis%"=="0" if /i %tsmethod%==KMS4k echo %_oIds% | findstr /i "O365" %nul% && ( +echo %%# | findstr /i "Project Visio" %nul% && ( +set skipprocess=1 +echo Skipping Because Mondo Is Available [%%#] +) +) + + if not defined skipprocess ( +if /i not %tsmethod%==KMS4k ( set no365= if "%oVer%"=="15" (echo %%# | findstr /i "O365HomePremRetail" %nul% && set no365=1) if "%oVer%"=="16" (echo %%# | findstr /i "O365" %nul% && set no365=1) @@ -5358,8 +5665,30 @@ call :ks_osppready echo Converting Unsupported OEM-ARM Office [%%# To MondoRetail] ) ) +) +if not defined _oMSI if /i %tsmethod%==KMS4k if not defined foundprod ( +call :tsksdata getinfo %%# +if defined _altoffid ( +echo Converting Retail To Volume [%%# To !_altoffid!] +) else ( +set _License=MondoVolume +set _altoffid=MondoVolume +echo Converting Retail To Volume [%%# To !_altoffid!] [Using Mondo because %%# is not found in the script] +) +echo %%# | find /i "O365" %nul% && ( +if "%oVer%"=="15" (call :dk_color %Gray% "Mondo 2013 is equivalent to O365 [15.0 version] in terms of the latest features.") +if "%oVer%"=="16" (call :dk_color %Gray% "Mondo 2016 is equivalent to O365 in terms of the latest features.") +) +call :ks_osppready +) + +if /i %tsmethod%==KMS4k ( +echo !_License! | find /i "Retail" %nul% && (set keytype=zero) || (set keytype=ks) +) else ( set keytype=zero +) + for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':offtsid\:.*';iex ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set _actid=%%a) ) @@ -5388,7 +5717,7 @@ echo "!allapps!" | find /i "!_actid!" %nul1% || call :oh_installlic :: Add SharedComputerLicensing registry key if Retail Office C2R is installed on Windows Server :: https://learn.microsoft.com/en-us/office/troubleshoot/office-suite-issues/click-to-run-office-on-terminal-server -if defined winserver if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" ( +if /i not %tsmethod%==KMS4k if defined winserver if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" ( echo %_oIds% | find /i "Retail" %nul1% && ( set scaIsNeeded=1 reg add %_config% /v SharedComputerLicensing /t REG_SZ /d "1" /f %nul1% @@ -5454,6 +5783,220 @@ exit /b :tsforge: $src = @' +#if !POWERSHELL2 +namespace ActivationWs +{ + +/* + +This code is adapted from ActivationWs. +Original Repository: https://github.com/dadorner-msft/activationws + +MIT License + +Copyright (c) Daniel Dorner + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +using System; +using System.IO; +using System.Linq; +using System.Net; +using System.Security.Cryptography; +using System.Text; +using System.Xml.Linq; + + public static class ActivationHelper { + // Key for HMAC/SHA256 signature. + private static readonly byte[] MacKey = new byte[64] { + 254, 49, 152, 117, 251, 72, 132, 134, + 156, 243, 241, 206, 153, 168, 144, 100, + 171, 87, 31, 202, 71, 4, 80, 88, + 48, 36, 226, 20, 98, 135, 121, 160, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 + }; + + private const string Action = "http://www.microsoft.com/BatchActivationService/BatchActivate"; + + private static readonly Uri Uri = new Uri("https://activation.sls.microsoft.com/BatchActivation/BatchActivation.asmx"); + + private static readonly XNamespace SoapSchemaNs = "http://schemas.xmlsoap.org/soap/envelope/"; + private static readonly XNamespace XmlSchemaInstanceNs = "http://www.w3.org/2001/XMLSchema-instance"; + private static readonly XNamespace XmlSchemaNs = "http://www.w3.org/2001/XMLSchema"; + private static readonly XNamespace BatchActivationServiceNs = "http://www.microsoft.com/BatchActivationService"; + private static readonly XNamespace BatchActivationRequestNs = "http://www.microsoft.com/DRM/SL/BatchActivationRequest/1.0"; + private static readonly XNamespace BatchActivationResponseNs = "http://www.microsoft.com/DRM/SL/BatchActivationResponse/1.0"; + + public static string CallWebService(int requestType, string installationId, string extendedProductId) { + XDocument soapRequest = CreateSoapRequest(requestType, installationId, extendedProductId); + HttpWebRequest webRequest = CreateWebRequest(soapRequest); + XDocument soapResponse = new XDocument(); + + try { + IAsyncResult asyncResult = webRequest.BeginGetResponse(null, null); + asyncResult.AsyncWaitHandle.WaitOne(); + + // Read data from the response stream. + using (WebResponse webResponse = webRequest.EndGetResponse(asyncResult)) + using (StreamReader streamReader = new StreamReader(webResponse.GetResponseStream())) { + soapResponse = XDocument.Parse(streamReader.ReadToEnd()); + } + + return ParseSoapResponse(soapResponse); + + } catch { + throw; + } + } + + private static XDocument CreateSoapRequest(int requestType, string installationId, string extendedProductId) { + // Create an activation request. + XElement activationRequest = new XElement(BatchActivationRequestNs + "ActivationRequest", + new XElement(BatchActivationRequestNs + "VersionNumber", "2.0"), + new XElement(BatchActivationRequestNs + "RequestType", requestType), + new XElement(BatchActivationRequestNs + "Requests", + new XElement(BatchActivationRequestNs + "Request", + new XElement(BatchActivationRequestNs + "PID", extendedProductId), + requestType == 1 ? new XElement(BatchActivationRequestNs + "IID", installationId) : null) + ) + ); + + // Get the unicode byte array of activationRequest and convert it to Base64. + byte[] bytes = Encoding.Unicode.GetBytes(activationRequest.ToString()); + string requestXml = Convert.ToBase64String(bytes); + + XDocument soapRequest = new XDocument(); + + using (HMACSHA256 hMACSHA = new HMACSHA256(MacKey)) { + // Convert the HMAC hashed data to Base64. + string digest = Convert.ToBase64String(hMACSHA.ComputeHash(bytes)); + + soapRequest = new XDocument( + new XDeclaration("1.0", "UTF-8", "no"), + new XElement(SoapSchemaNs + "Envelope", + new XAttribute(XNamespace.Xmlns + "soap", SoapSchemaNs), + new XAttribute(XNamespace.Xmlns + "xsi", XmlSchemaInstanceNs), + new XAttribute(XNamespace.Xmlns + "xsd", XmlSchemaNs), + new XElement(SoapSchemaNs + "Body", + new XElement(BatchActivationServiceNs + "BatchActivate", + new XElement(BatchActivationServiceNs + "request", + new XElement(BatchActivationServiceNs + "Digest", digest), + new XElement(BatchActivationServiceNs + "RequestXml", requestXml) + ) + ) + ) + )); + + } + + return soapRequest; + } + + private static HttpWebRequest CreateWebRequest(XDocument soapRequest) { + HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(Uri); + webRequest.Accept = "text/xml"; + webRequest.ContentType = "text/xml; charset=\"utf-8\""; + webRequest.Headers.Add("SOAPAction", Action); + webRequest.Host = "activation.sls.microsoft.com"; + webRequest.Method = "POST"; + + try { + // Insert SOAP envelope + using (Stream stream = webRequest.GetRequestStream()) { + soapRequest.Save(stream); + } + + return webRequest; + + } catch { + throw; + } + } + + private static string ParseSoapResponse(XDocument soapResponse) { + if (soapResponse == null) { + throw new ArgumentNullException("soapResponse", "The remote server returned an unexpected response."); + } + + if (!soapResponse.Descendants(BatchActivationServiceNs + "ResponseXml").Any()) { + throw new Exception("The remote server returned an unexpected response"); + } + + try { + XDocument responseXml = XDocument.Parse(soapResponse.Descendants(BatchActivationServiceNs + "ResponseXml").First().Value); + + if (responseXml.Descendants(BatchActivationResponseNs + "ErrorCode").Any()) { + string errorCode = responseXml.Descendants(BatchActivationResponseNs + "ErrorCode").First().Value; + + switch (errorCode) { + case "0x7F": + throw new Exception("The Multiple Activation Key has exceeded its limit"); + + case "0x67": + throw new Exception("The product key has been blocked"); + + case "0x68": + throw new Exception("Invalid product key"); + + case "0x86": + throw new Exception("Invalid key type"); + + case "0x90": + throw new Exception("Please check the Installation ID and try again"); + + default: + throw new Exception(string.Format("The remote server reported an error ({0})", errorCode)); + } + + } else if (responseXml.Descendants(BatchActivationResponseNs + "ResponseType").Any()) { + string responseType = responseXml.Descendants(BatchActivationResponseNs + "ResponseType").First().Value; + + switch (responseType) { + case "1": + string confirmationId = responseXml.Descendants(BatchActivationResponseNs + "CID").First().Value; + return confirmationId; + + case "2": + string activationsRemaining = responseXml.Descendants(BatchActivationResponseNs + "ActivationRemaining").First().Value; + return activationsRemaining; + + default: + throw new Exception("The remote server returned an unrecognized response"); + } + + } else { + throw new Exception("The remote server returned an unrecognized response"); + } + + } catch { + throw; + } + } + } +} +#endif + // Common.cs namespace LibTSforge { @@ -8015,27 +8558,23 @@ namespace LibTSforge.Modifiers } -// Activators/AVMA4K.cs +// Activators/KMS4K.cs namespace LibTSforge.Activators { using System; + using System.IO; using PhysicalStore; using SPP; - public static class AVMA4k + public class KMS4k { public static void Activate(PSVersion version, bool production, Guid actId) { - if (version != PSVersion.WinModern && version != PSVersion.WinBlue) - { - throw new NotSupportedException("AVMA licenses are not available for this product."); - } - Guid appId; if (actId == Guid.Empty) { appId = SLApi.WINDOWS_APP_ID; - actId = SLApi.GetDefaultActivationID(appId, false); + actId = SLApi.GetDefaultActivationID(appId, true); if (actId == Guid.Empty) { @@ -8047,9 +8586,9 @@ namespace LibTSforge.Activators appId = SLApi.GetAppId(actId); } - if (SLApi.GetPKeyChannel(SLApi.GetInstalledPkeyID(actId)) != "VT:IA") + if (SLApi.GetPKeyChannel(SLApi.GetInstalledPkeyID(actId)) != "Volume:GVLK") { - throw new NotSupportedException("Non-VT:IA product key installed."); + throw new NotSupportedException("Non-Volume:GVLK product key installed."); } SPPUtils.KillSPP(version); @@ -8060,80 +8599,171 @@ namespace LibTSforge.Activators { string key = string.Format("SPPSVC\\{0}\\{1}", appId, actId); - long creationTime = BitConverter.ToInt64(store.GetBlock("__##USERSEP##\\$$_RESERVED_$$\\NAMESPACE__", "__##USERSEP-RESERVED##__$$GLOBAL-CREATION-TIME$$").Data, 0); - long tickCount = BitConverter.ToInt64(store.GetBlock("__##USERSEP##\\$$_RESERVED_$$\\NAMESPACE__", "__##USERSEP-RESERVED##__$$GLOBAL-TICKCOUNT-UPTIME$$").Data, 0); - long deltaTime = BitConverter.ToInt64(store.GetBlock(key, "__##USERSEP-RESERVED##__$$UP-TIME-DELTA$$").Data, 0); + ulong unknown = 0; + ulong time1; + ulong time2 = (ulong)DateTime.UtcNow.ToFileTime(); + ulong expiry = Constants.TimerMax; - const ulong unknown = 0; - ulong time1 = (ulong)(creationTime + tickCount + deltaTime); - ulong crcBindTime = (ulong)DateTime.UtcNow.ToFileTime(); - ulong timerTime = crcBindTime / 10000; - ulong expiry = Constants.TimerMax / 10000; - - VariableBag avmaBinding = new VariableBag(version); - - avmaBinding.Blocks.AddRange(new[] + if (version == PSVersion.Vista || version == PSVersion.Win7) { + unknown = 0x800000000; + time1 = 0; + } + else + { + long creationTime = BitConverter.ToInt64(store.GetBlock("__##USERSEP##\\$$_RESERVED_$$\\NAMESPACE__", "__##USERSEP-RESERVED##__$$GLOBAL-CREATION-TIME$$").Data, 0); + long tickCount = BitConverter.ToInt64(store.GetBlock("__##USERSEP##\\$$_RESERVED_$$\\NAMESPACE__", "__##USERSEP-RESERVED##__$$GLOBAL-TICKCOUNT-UPTIME$$").Data, 0); + long deltaTime = BitConverter.ToInt64(store.GetBlock(key, "__##USERSEP-RESERVED##__$$UP-TIME-DELTA$$").Data, 0); + + time1 = (ulong)(creationTime + tickCount + deltaTime); + time2 /= 10000; + expiry /= 10000; + } + + if (version == PSVersion.Vista) + { + VistaTimer vistaTimer = new VistaTimer + { + Time = time2, + Expiry = Constants.TimerMax + }; + + string vistaTimerName = string.Format("msft:sl/timer/VLExpiration/VOLUME/{0}/{1}", appId, actId); + + store.DeleteBlock(key, vistaTimerName); + store.DeleteBlock(key, actId.ToString()); + + BinaryWriter writer = new BinaryWriter(new MemoryStream()); + writer.Write(Constants.KMSv4Response.Length); + writer.Write(Constants.KMSv4Response); + writer.Write(Constants.UniversalHWIDBlock); + byte[] kmsData = writer.GetBytes(); + + store.AddBlocks(new[] + { + new PSBlock + { + Type = BlockType.TIMER, + Flags = 0, + KeyAsStr = key, + ValueAsStr = vistaTimerName, + Data = vistaTimer.CastToArray() + }, + new PSBlock + { + Type = BlockType.NAMED, + Flags = 0, + KeyAsStr = key, + ValueAsStr = actId.ToString(), + Data = kmsData + } + }); + } + else + { + byte[] hwidBlock = Constants.UniversalHWIDBlock; + byte[] kmsResp; + + switch (version) + { + case PSVersion.Win7: + kmsResp = Constants.KMSv4Response; + break; + case PSVersion.Win8: + kmsResp = Constants.KMSv5Response; + break; + case PSVersion.WinBlue: + case PSVersion.WinModern: + kmsResp = Constants.KMSv6Response; + break; + default: + throw new NotSupportedException("Unsupported PSVersion."); + } + + VariableBag kmsBinding = new VariableBag(version); + + kmsBinding.Blocks.AddRange(new[] + { new CRCBlockModern { DataType = CRCBlockType.BINARY, Key = new byte[] { }, - Value = BitConverter.GetBytes(crcBindTime), + Value = kmsResp }, new CRCBlockModern { DataType = CRCBlockType.STRING, Key = new byte[] { }, - ValueAsStr = "AVMA4K", + ValueAsStr = "msft:rm/algorithm/hwid/4.0" }, new CRCBlockModern { - DataType = CRCBlockType.STRING, - Key = new byte[] { }, - ValueAsStr = "00491-50000-00001-AA666", + DataType = CRCBlockType.BINARY, + KeyAsStr = "SppBindingLicenseData", + Value = hwidBlock } - }); + }); - byte[] avmaBindingData = avmaBinding.Serialize(); + if (version == PSVersion.WinModern) + { + kmsBinding.Blocks.AddRange(new[] + { + new CRCBlockModern + { + DataType = CRCBlockType.STRING, + Key = new byte[] { }, + ValueAsStr = "massgrave.dev" + }, + new CRCBlockModern + { + DataType = CRCBlockType.STRING, + Key = new byte[] { }, + ValueAsStr = "6969" + } + }); + } - Timer avmaTimer = new Timer - { - Unknown = unknown, - Time1 = time1, - Time2 = timerTime, - Expiry = expiry - }; + byte[] kmsBindingData = kmsBinding.Serialize(); - string storeVal = string.Format("msft:spp/ia/bind/1.0/store/{0}/{1}", appId, actId); - string timerVal = string.Format("msft:spp/ia/bind/1.0/timer/{0}/{1}", appId, actId); + Timer kmsTimer = new Timer + { + Unknown = unknown, + Time1 = time1, + Time2 = time2, + Expiry = expiry + }; - store.DeleteBlock(key, storeVal); - store.DeleteBlock(key, timerVal); + string storeVal = string.Format("msft:spp/kms/bind/2.0/store/{0}/{1}", appId, actId); + string timerVal = string.Format("msft:spp/kms/bind/2.0/timer/{0}/{1}", appId, actId); - store.AddBlocks(new[] - { + store.DeleteBlock(key, storeVal); + store.DeleteBlock(key, timerVal); + + store.AddBlocks(new[] + { new PSBlock { Type = BlockType.NAMED, - Flags = 0x400, + Flags = (version == PSVersion.WinModern) ? (uint)0x400 : 0, KeyAsStr = key, ValueAsStr = storeVal, - Data = avmaBindingData, + Data = kmsBindingData }, new PSBlock { Type = BlockType.TIMER, - Flags = 0x4, + Flags = (version == PSVersion.Win7) ? (uint)0 : 0x4, KeyAsStr = key, ValueAsStr = timerVal, - Data = avmaTimer.CastToArray() + Data = kmsTimer.CastToArray() } - }); + }); + } } - SLApi.RefreshLicenseStatus(); + SPPUtils.RestartSPP(version); SLApi.FireStateChangedEvent(appId); - Logger.WriteLine("Activated using AVMA4k successfully."); + Logger.WriteLine("Activated using KMS4k successfully."); } } } @@ -10240,15 +10870,16 @@ namespace LibTSforge.PhysicalStore '@ $ErrorActionPreference = 'Stop' $binPath = "$env:_work\BIN\LibTSforge.dll" +$psMajorVer = (Get-Host).Version.Major if (Test-Path -LiteralPath $binPath) { Write-Host "LibTSforge.dll found in BIN folder. Loading the DLL..." Add-Type -Path $binPath } else { - $cp = [CodeDom.Compiler.CompilerParameters] [string[]]@("System.dll", "System.Core.dll", "System.ServiceProcess.dll", "System.Xml.dll") - $cp.CompilerOptions = "/unsafe" - $lang = If ((Get-Host).Version.Major -gt 2) { "CSharp" } Else { "CSharpVersion3" } + $cp = [CodeDom.Compiler.CompilerParameters] [string[]]@("System.dll", "System.Core.dll", "System.ServiceProcess.dll", "System.Xml.dll", "System.Xml.Linq.dll") + if ($psMajorVer -le 2) { $cp.CompilerOptions = "/define:POWERSHELL2 /unsafe" } else { $cp.CompilerOptions = "/unsafe" } + $lang = if ($psMajorVer -gt 2) { "CSharp" } else { "CSharpVersion3" } $ctemp = "$env:SystemRoot\Temp\" if (-Not (Test-Path -Path $ctemp)) { New-Item -Path $ctemp -ItemType Directory > $null } @@ -10297,32 +10928,65 @@ function slGetSkuInfo($SkuId) { if (-not $env:resetstuff) { foreach ($tsactid in $tsactids) { try { + $activated = $null $prodDes = Get-WmiInfo -tsactid $tsactid -property "Description" $prodName = Get-WmiInfo -tsactid $tsactid -property "Name" if ($prodName) { $nameParts = $prodName -split ',', 2 $prodName = if ($nameParts.Count -gt 1) { ($nameParts[1].Trim() -split '[ ,]')[0] } else { $null } } - if (-not $env:_vis) { - [LibTSforge.Modifiers.GenPKeyInstall]::InstallGenPKey($ver, $prod, $tsactid) - } - if ($prodName -match 'Office' -and -not (slGetSkuInfo($tsactid))) { + if (-not $env:_vis -and -not $env:oldks) { + [LibTSforge.Modifiers.GenPKeyInstall]::InstallGenPKey($ver, $prod, $tsactid) + } + if ($prodName -match 'Office' -and $prodDes -notmatch 'KMS' -and -not (slGetSkuInfo($tsactid))) { $licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus" if ($licenseStatus -eq 1) { Write-Host "[$prodName] is already permanently activated." -ForegroundColor White -BackgroundColor DarkGreen continue } } - [LibTSforge.Activators.ZeroCID]::Activate($ver, $prod, $tsactid) - $licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus" - if ($licenseStatus -eq 1) { + if ($env:tsmethod -eq "StaticCID") { + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + $attempts = @( + @(100055, 1000043, 1338662172562478), + @(1345, 1003020, 6311608238084405) + ) + foreach ($params in $attempts) { + [LibTSforge.Modifiers.SetIIDParams]::SetParams($ver, $prod, $tsactid, [LibTSforge.SPP.PKeyAlgorithm]::PKEY2009, $params[0], $params[1], $params[2]) + $instId = [LibTSforge.SPP.SLApi]::GetInstallationID($tsactid) + $confId = [ActivationWs.ActivationHelper]::CallWebService(1, $instId, "31337-42069-123-456789-04-1337-2600.0000-2542001") + $result = [LibTSforge.SPP.SLApi]::DepositConfirmationID($tsactid, $instId, $confId) + if ($result -eq 0) { break } + } + [LibTSforge.SPP.SPPUtils]::RestartSPP($ver) + } + elseif ($env:tsmethod -eq "KMS4k") { + [LibTSforge.Activators.KMS4k]::Activate($ver, $prod, $tsactid) + } + else { + [LibTSforge.Activators.ZeroCID]::Activate($ver, $prod, $tsactid) + } + if ($env:tsmethod -eq "KMS4k") { + $GracePeriodStatus = Get-WmiInfo -tsactid $tsactid -property "GracePeriodRemaining" + if ($GracePeriodStatus -gt 259200) { $activated = 1 } + } + else { + $licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus" + if ($licenseStatus -eq 1) { $activated = 1 } + } + if ($activated) { if ($prodDes -match 'KMS' -and $prodDes -notmatch 'CLIENT') { [LibTSforge.Modifiers.KMSHostCharge]::Charge($ver, $prod, $tsactid) - Write-Host "[$prodName] CSVLK is permanently activated with ZeroCID." -ForegroundColor White -BackgroundColor DarkGreen + Write-Host "[$prodName] CSVLK is permanently activated with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen Write-Host "[$prodName] CSVLK is charged with 25 clients for 30 days." -ForegroundColor White -BackgroundColor DarkGreen } else { - Write-Host "[$prodName] is permanently activated with ZeroCID." -ForegroundColor White -BackgroundColor DarkGreen + if ($env:tsmethod -eq "KMS4k") { + 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 { + Write-Host "[$prodName] is permanently activated with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen + } } } else { @@ -10340,11 +11004,11 @@ if (-not $env:resetstuff) { if ($env:resetstuff) { try { - if (-not $env:_vis) {[LibTSforge.Modifiers.TamperedFlagsDelete]::DeleteTamperFlags($ver, $prod)} + if (-not $env:_vis) { [LibTSforge.Modifiers.TamperedFlagsDelete]::DeleteTamperFlags($ver, $prod) } [LibTSforge.SPP.SLApi]::RefreshLicenseStatus() [LibTSforge.Modifiers.RearmReset]::Reset($ver, $prod) [LibTSforge.Modifiers.GracePeriodReset]::Reset($ver, $prod) - if (-not $env:_vis) {[LibTSforge.Modifiers.KeyChangeLockDelete]::Delete($ver, $prod)} + if (-not $env:_vis) { [LibTSforge.Modifiers.KeyChangeLockDelete]::Delete($ver, $prod) } } catch { $errcode = 3 @@ -10604,6 +11268,130 @@ Office-ActID -pkeypath "$env:pkeypath" -edition "$env:_License" -keytype "$env:k ::======================================================================================================================================== +:: 1st column = Office version +:: 2nd column = Volume or free retail product +:: 3rd column = Retail product names that needs to be converted to the Volume product mentioned in 2nd column +:: Separator = "_" + +:tsksdata + +set f= +for %%# in ( +:: Office 2013 +15_AccessVolume_-AccessRetail- +15_AccessRuntimeRetail +15_ExcelVolume_-ExcelRetail- +15_GrooveVolume_-GrooveRetail- +15_InfoPathVolume_-InfoPathRetail- +15_LyncAcademicRetail +15_LyncEntryRetail +15_LyncVolume_-LyncRetail- +15_MondoRetail +15_MondoVolume_-O365BusinessRetail-O365HomePremRetail-O365ProPlusRetail-O365SmallBusPremRetail- +15_OneNoteFreeRetail +15_OneNoteVolume_-OneNoteRetail- +15_OutlookVolume_-OutlookRetail- +15_PowerPointVolume_-PowerPointRetail- +15_ProjectProVolume_-ProjectProRetail- +15_ProjectStdVolume_-ProjectStdRetail- +15_ProPlusVolume_-ProPlusRetail-ProfessionalPipcRetail-ProfessionalRetail- +15_PublisherVolume_-PublisherRetail- +15_SPDRetail +15_StandardVolume_-StandardRetail-HomeBusinessPipcRetail-HomeBusinessRetail-HomeStudentARMRetail-HomeStudentPlusARMRetail-HomeStudentRetail-PersonalPipcRetail-PersonalRetail- +15_VisioProVolume_-VisioProRetail- +15_VisioStdVolume_-VisioStdRetail- +15_WordVolume_-WordRetail- +:: Office 2016 +16_AccessRuntimeRetail +16_AccessVolume_-AccessRetail- +16_ExcelVolume_-ExcelRetail- +16_MondoRetail +16_MondoVolume_-O365AppsBasicRetail-O365BusinessRetail-O365EduCloudRetail-O365HomePremRetail-O365ProPlusRetail-O365SmallBusPremRetail- +16_OneNoteFreeRetail +16_OneNoteVolume_-OneNoteRetail-OneNote2021Retail- +16_OutlookVolume_-OutlookRetail- +16_PowerPointVolume_-PowerPointRetail- +16_ProjectProVolume_-ProjectProRetail- +16_ProjectProXVolume +16_ProjectStdVolume_-ProjectStdRetail- +16_ProjectStdXVolume +16_ProPlusVolume_-ProPlusRetail-ProfessionalPipcRetail-ProfessionalRetail- +16_PublisherVolume_-PublisherRetail- +16_SkypeServiceBypassRetail +16_SkypeforBusinessEntryRetail +16_SkypeforBusinessVolume_-SkypeforBusinessRetail- +16_StandardVolume_-StandardRetail-HomeBusinessPipcRetail-HomeBusinessRetail-HomeStudentARMRetail-HomeStudentPlusARMRetail-HomeStudentRetail-HomeStudentVNextRetail-PersonalPipcRetail-PersonalRetail- +16_VisioProVolume_-VisioProRetail- +16_VisioProXVolume +16_VisioStdVolume_-VisioStdRetail- +16_VisioStdXVolume +16_WordVolume_-WordRetail- +:: Office 2019 +16_AccessRuntime2019Retail +16_Access2019Volume_-Access2019Retail- +16_Excel2019Volume_-Excel2019Retail- +16_Outlook2019Volume_-Outlook2019Retail- +16_PowerPoint2019Volume_-PowerPoint2019Retail- +16_ProjectPro2019Volume_-ProjectPro2019Retail- +16_ProjectStd2019Volume_-ProjectStd2019Retail- +16_ProPlus2019Volume_-ProPlus2019Retail-Professional2019Retail- +16_Publisher2019Volume_-Publisher2019Retail- +16_SkypeforBusiness2019Volume_-SkypeforBusiness2019Retail- +16_SkypeforBusinessEntry2019Retail +16_Standard2019Volume_-Standard2019Retail-HomeBusiness2019Retail-HomeStudentARM2019Retail-HomeStudentPlusARM2019Retail-HomeStudent2019Retail-Personal2019Retail- +16_VisioPro2019Volume_-VisioPro2019Retail- +16_VisioStd2019Volume_-VisioStd2019Retail- +16_Word2019Volume_-Word2019Retail- +:: Office 2021 +:: OneNote2021Volume KMS license is not available +16_AccessRuntime2021Retail +16_Access2021Volume_-Access2021Retail- +16_Excel2021Volume_-Excel2021Retail- +16_Outlook2021Volume_-Outlook2021Retail- +16_OneNoteFree2021Retail +16_PowerPoint2021Volume_-PowerPoint2021Retail- +16_ProjectPro2021Volume_-ProjectPro2021Retail- +16_ProjectStd2021Volume_-ProjectStd2021Retail- +16_ProPlus2021Volume_-ProPlus2021Retail-Professional2021Retail- +16_Publisher2021Volume_-Publisher2021Retail- +16_SkypeforBusiness2021Volume_-SkypeforBusiness2021Retail- +16_Standard2021Volume_-Standard2021Retail-HomeBusiness2021Retail-HomeStudent2021Retail-Personal2021Retail- +16_VisioPro2021Volume_-VisioPro2021Retail- +16_VisioStd2021Volume_-VisioStd2021Retail- +16_Word2021Volume_-Word2021Retail- +:: Office 2024 +16_Access2024Volume_-Access2024Retail- +16_Excel2024Volume_-Excel2024Retail- +16_Outlook2024Volume_-Outlook2024Retail- +16_PowerPoint2024Volume_-PowerPoint2024Retail- +16_ProjectPro2024Volume_-ProjectPro2024Retail- +16_ProjectStd2024Volume_-ProjectStd2024Retail- +16_ProPlus2024Volume_-ProPlus2024Retail- +16_SkypeforBusiness2024Volume +16_Standard2024Volume_-Home2024Retail-HomeBusiness2024Retail- +16_VisioPro2024Volume_-VisioPro2024Retail- +16_VisioStd2024Volume_-VisioStd2024Retail- +16_Word2024Volume_-Word2024Retail- +) do ( +for /f "tokens=1-3 delims=_" %%A in ("%%#") do ( + +if %1==chkprod if "%oVer%"=="%%A" if not defined foundprod ( +if /i "%%B"=="%2" set foundprod=1 +) + +if %1==getinfo if "%oVer%"=="%%A" ( +echo: %%C | find /i "-%2-" %nul% && ( +set _License=%%B +set _altoffid=%%B +) +) + +) +) +exit /b + +::======================================================================================================================================== + :ts_getedition set tsedition= diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 33e8f7c..c80d70e 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -45,6 +45,11 @@ set tsids= :: To reset rearm counter, evaluation period and clear the tamper state, key lock, run the script with "/Z-Reset" parameter or change 0 to 1 in below line set _resall=0 +:: Choose activation method: +:: In builds 19041 and later, the script will auto select StaticCID (requires internet). If no internet is detected, it will then auto select the KMS4k method. For builds lower than 19041, the script will auto select ZeroCID. +:: To change the activation method, run the script with the parameters "/Z-SCID", "/Z-ZCID", or "/Z-KMS4k", or modify the option from Auto to SCID, ZCID, or KMS4k in the line below. +set _actmethod=Auto + :: Debug Mode: :: To run the script in debug mode, change 0 to any parameter above that you want to run, in below line set "_debug=0" @@ -191,10 +196,14 @@ if /i "%%A"=="/Z-OffHost" (set _actoffhost=1) if /i "%%A"=="/Z-APPX" (set _actappx=1) echo "%%A" | find /i "/Z-ID-" >nul && (set _actman=1& set "filtsids=%%A" & call set "filtsids=%%filtsids:~6%%" & if defined filtsids call set tsids=%%filtsids%% %%tsids%%) if /i "%%A"=="/Z-Reset" (set _resall=1) +if /i "%%A"=="/Z-SCID" (set _actmethod=SCID) +if /i "%%A"=="/Z-ZCID" (set _actmethod=ZCID) +if /i "%%A"=="/Z-KMS4k" (set _actmethod=KMS4k) ) if not defined tsids set _actman=0 for %%A in (%_actwin% %_actesu% %_actoff% %_actprojvis% %_actwinesuoff% %_actwinhost% %_actoffhost% %_actappx% %_actman% %_resall%) do (if "%%A"=="1" set _unattended=1) +if /i not %_actmethod%==Auto set _unattended=1 ::======================================================================================================================================== @@ -459,6 +468,7 @@ echo [E] Reset - Rearm/Timers ) else ( echo [E] Reset - Rearm/Timers/Tamper/Lock ) +echo [F] Change - Activation Method [%_actmethod%] echo _______________________________________________ echo: echo [6] Remove TSforge Activation @@ -467,12 +477,13 @@ echo [0] %_exitmsg% echo ______________________________________________________________ echo: call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard..." -choice /C:12345ABCDE670 /N +choice /C:12345ABCDEF670 /N set _el=!errorlevel! -if !_el!==13 exit /b -if !_el!==12 start %mas%genuine-installation-media & goto :ts_menu -if !_el!==11 call :ts_remove & cls & goto :ts_menu +if !_el!==14 exit /b +if !_el!==13 start %mas%genuine-installation-media & goto :ts_menu +if !_el!==12 call :ts_remove & cls & goto :ts_menu +if !_el!==11 goto :ts_changemethod if !_el!==10 cls & setlocal & set "_resall=1" & call :ts_start & endlocal & cls & goto :ts_menu if !_el!==9 cls & setlocal & set "_actman=1" & call :ts_start & endlocal & cls & goto :ts_menu if !_el!==8 cls & setlocal & set "_actappx=1" & call :ts_start & endlocal & cls & goto :ts_menu @@ -488,6 +499,54 @@ goto :ts_menu ::======================================================================================================================================== +:ts_changemethod + +cls +if not defined terminal mode 76, 36 + +echo: +echo: +echo: +echo ______________________________________________________________ +echo: +call :dk_color2 %_White% " [1] " %_Green% " Auto" +echo Build 19041 and later: +echo Uses StaticCID, or KMS4k if offline. +echo Older builds: Uses ZeroCID. +echo _______________________________________________ +echo: +echo [2] StaticCID +echo Needs Internet. +echo Not for Windows 7 or older. +echo _______________________________________________ +echo: +echo [3] ZeroCID +echo Works only on builds below 19041. +echo _______________________________________________ +echo: +echo [4] KMS4k +echo This applies only to volume products. +echo Activates for 4000+ years using KMS. +echo _______________________________________________ +echo: +echo [5] Learn More +echo [0] %_exitmsg% +echo ______________________________________________________________ +echo: +call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard..." +choice /C:123450 /N +set _el=!errorlevel! + +if !_el!==6 goto :ts_menu +if !_el!==5 cls & start %mas%tsforge &goto :ts_menu +if !_el!==4 cls & set "_actmethod=KMS4k" & goto :ts_menu +if !_el!==3 cls & set "_actmethod=ZCID" & goto :ts_menu +if !_el!==2 cls & set "_actmethod=SCID" & goto :ts_menu +if !_el!==1 cls & set "_actmethod=Auto" & goto :ts_menu +goto :ts_changemethod + +::======================================================================================================================================== + :ts_start cls @@ -568,6 +627,57 @@ cls echo: call :dk_showosinfo +if /i %_actmethod%==SCID set tsmethod=StaticCID +if /i %_actmethod%==ZCID set tsmethod=ZeroCID +if /i %_actmethod%==KMS4k set tsmethod=KMS4k + +if /i %_actmethod%==Auto ( +if %winbuild% GEQ 19041 ( +set tsmethod=StaticCID +) else ( +set tsmethod=ZeroCID +) +) + +if %winbuild% LSS 9200 if /i %tsmethod%==StaticCID ( +%eline% +echo StaticCID method is supported only on Windows 8 and later. +goto dk_done +) + +::======================================================================================================================================== + +:: Check Internet connection + +if /i %tsmethod%==StaticCID ( +set _int= +for %%a in (l.root-servers.net resolver1.opendns.com download.windowsupdate.com google.com) do if not defined _int ( +for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not "%%#"=="" set _int=1) +) + +if not defined _int ( +%psc% "If([Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]'{DCB00C01-570F-4A9B-8D69-199FDBA5723B}')).IsConnectedToInternet){Exit 0}Else{Exit 1}" +if !errorlevel!==0 (set _int=1&set ping_f= But Ping Failed) +) + +if defined _int ( +echo Checking Internet Connection [Connected!ping_f!] +) else ( +if /i %_actmethod%==Auto if not %_actman%==1 set tsmethod=KMS4k +if /i !tsmethod!==KMS4k ( +call :dk_color %Gray% "Checking Internet Connection [Not Connected]" +call :dk_color %Blue% "Switching To KMS4k Activation Method because Internet is needed for StaticCID method." +) else ( +set error=1 +call :dk_color %Red% "Checking Internet Connection [Not Connected]" +call :dk_color %Blue% "Internet is required for TSforge StaticCID option." +) +echo: +) +) + +::======================================================================================================================================== + echo Initiating Diagnostic Tests... set "_serv=%_slser% Winmgmt" @@ -585,6 +695,11 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto :dk_done ) +if /i !tsmethod!==KMS4k ( +call :_taskclear-cache +echo Clearing %KS% Cache [Successful] +) + ::======================================================================================================================================== if %_resall%==1 goto :ts_resetall @@ -606,16 +721,23 @@ echo %tsedition% | find /i "Eval" %nul1% && ( goto :ts_wineval ) -call :ts_checkwinperm +set /a UBR=0 +if %winbuild% EQU 26100 ( +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 !UBR! LSS 4188 (set dontcheckact=1) +) + +if not defined dontcheckact call :ts_checkwinperm if defined _perm ( call :dk_color %Gray% "Checking OS Activation [Windows is already permanently activated]" goto :ts_esu ) +if %winbuild% LSS 9200 if /i %tsmethod%==KMS4k goto :ts_oldks if defined _vis goto :ts_winvista set tempid= -set keytype=zero +if /i %tsmethod%==KMS4k (set keytype=ks) else (set keytype=zero) for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -625,6 +747,13 @@ echo Checking Activation ID [%tempid%] [%tsedition%] ) else ( call :dk_color %Red% "Checking Activation ID [Not Found] [%tsedition%] [%osSKU%]" set error=1 +if /i %tsmethod%==KMS4k ( +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +) goto :ts_esu ) @@ -632,6 +761,83 @@ if defined winsub ( call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] found. Script will activate base edition [SKU ID-%regSKU%]." echo: ) + +goto :ts_esu + +::======================================================================================================================================== + +:ts_oldks + +:: KMS keys for KMS4k method because TSforge cannot install KMS key on Windows Vista and 7 + +:: 1st column = Activation ID +:: 2nd column = Generic key +:: 3rd column = Edition ID +:: Separator = _ + +set f= +set key= +set tempid= +if not defined allapps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f + +for %%# in ( +:: Windows 7 +ae2ee509-1b34-41c0-acb7-6d4650168915_33PXH-7Y6KF-2VJC9-XBBR8-HV%f%THH_Enterprise +1cb6d605-11b3-4e14-bb30-da91c8e3983a_YDRBP-3D83W-TY26F-D46B2-XC%f%KRJ_EnterpriseN +b92e9980-b9d5-4821-9c94-140f632f6312_FJ82H-XT6CR-J8D7P-XQJJ2-GP%f%DD4_Professional +54a09a0d-d57b-4c10-8b69-a842d6590ad5_MRPKT-YTG23-K7D7T-X2JMM-QY%f%7MG_ProfessionalN +db537896-376f-48ae-a492-53d0547773d0_YBYF6-BHCR3-JPKRB-CDW7B-F9%f%BK4_Embedded_POSReady +aa6dd3aa-c2b4-40e2-a544-a6bbb3f5c395_73KQT-CD9G6-K7TQG-66MRP-CQ%f%22C_Embedded_ThinPC +5a041529-fef8-4d07-b06f-b59b573b32d2_W82YF-2Q76Y-63HXB-FGJG9-GF%f%7QX_ProfessionalE +46bbed08-9c7b-48fc-a614-95250573f4ea_C29WB-22CC8-VJ326-GHFJW-H9%f%DH4_EnterpriseE +:: Windows Server 2008 R2 +68531fb9-5511-4989-97be-d11a0f55633f_YC6KT-GKW9T-YTKYR-T4X34-R7%f%VHC_ServerStandard +7482e61b-c589-4b7f-8ecc-46d455ac3b87_74YFP-3QFB3-KQT8W-PMXWJ-7M%f%648_ServerDatacenter +620e2b3d-09e7-42fd-802a-17a13652fe7a_489J6-VHDMP-X63PK-3K798-CP%f%X3Y_ServerEnterprise +7482e61b-c589-4b7f-8ecc-46d455ac3b87_74YFP-3QFB3-KQT8W-PMXWJ-7M%f%648_ServerDatacenterCore +68531fb9-5511-4989-97be-d11a0f55633f_YC6KT-GKW9T-YTKYR-T4X34-R7%f%VHC_ServerStandardCore +620e2b3d-09e7-42fd-802a-17a13652fe7a_489J6-VHDMP-X63PK-3K798-CP%f%X3Y_ServerEnterpriseCore +8a26851c-1c7e-48d3-a687-fbca9b9ac16b_GT63C-RJFQ3-4GMB6-BRFB9-CB%f%83V_ServerEnterpriseIA64 +a78b8bd9-8017-4df5-b86a-09f756affa7c_6TPJF-RBVHG-WBW2R-86QPH-6R%f%TM4_ServerWeb +cda18cf3-c196-46ad-b289-60c072869994_TT8MH-CG224-D3D7Q-498W2-9Q%f%CTX_ServerHPC +a78b8bd9-8017-4df5-b86a-09f756affa7c_6TPJF-RBVHG-WBW2R-86QPH-6R%f%TM4_ServerWebCore +f772515c-0e87-48d5-a676-e6962c3e1195_736RG-XDKJK-V34PF-BHK87-J6%f%X3K_ServerEmbeddedSolution +:: Windows Vista +cfd8ff08-c0d7-452b-9f60-ef5c70c32094_VKK3X-68KWM-X2YGT-QR4M6-4B%f%WMV_Enterprise +4f3d1606-3fea-4c01-be3c-8d671c401e3b_YFKBB-PQJJV-G996G-VWGXY-2V%f%3X8_Business +2c682dc2-8b68-4f63-a165-ae291d4cf138_HMBQG-8H2RH-C77VX-27R82-VM%f%QBT_BusinessN +d4f54950-26f2-4fb4-ba21-ffab16afcade_VTC42-BM838-43QHV-84HX6-XJ%f%XKV_EnterpriseN +:: Windows Server 2008 +ad2542d4-9154-4c6d-8a44-30f11ee96989_TM24T-X9RMF-VWXK6-X8JC9-BF%f%GM2_ServerStandard +68b6e220-cf09-466b-92d3-45cd964b9509_7M67G-PC374-GR742-YH8V4-TC%f%BY3_ServerDatacenter +c1af4d90-d1bc-44ca-85d4-003ba33db3b9_YQGMW-MPWTJ-34KDK-48M3W-X4%f%Q6V_ServerEnterprise +01ef176b-3e0d-422a-b4f8-4ea880035e8f_4DWFP-JF3DJ-B7DTH-78FJB-PD%f%RHK_ServerEnterpriseIA64 +ddfa9f7c-f09e-40b9-8c1a-be877a9a7f4b_WYR28-R7TFJ-3X2YQ-YCY4H-M2%f%49D_ServerWeb +7afb1156-2c1d-40fc-b260-aab7442b62fe_RCTX3-KWVHP-BR6TB-RB6DM-6X%f%7HP_ServerComputeCluster +2401e3d0-c50a-4b58-87b2-7e794b7d2607_W7VD6-7JFBR-RX26B-YKQ3Y-6F%f%FFJ_ServerStandardV +fd09ef77-5647-4eff-809c-af2b64659a45_22XQ2-VRXRG-P8D42-K34TD-G3%f%QQC_ServerDatacenterV +8198490a-add0-47b2-b3ba-316b12d647b4_39BXF-X8Q23-P2WWT-38T2F-G3%f%FPG_ServerEnterpriseV +) do ( +for /f "tokens=1-3 delims=_" %%A in ("%%#") do if %tsedition%==%%C if not defined key ( +echo "%allapps%" | find /i "%%A" %nul1% && ( +set key=%%B +set tempid=%%A +) +) +) + +if not defined key ( +call :dk_color %Red% "Checking Activation ID [%tsedition% SKU-%osSKU% %KS% key is not available]" +call :dk_color %Blue% "Use ZeroCID activation method from the previous menu." +goto :ts_esu +) + +echo Checking Activation ID [%tempid%] [%tsedition%] + +set oldks=1 +set generickey=1 +call :dk_inskey "[%key%]" +set tsids=%tsids% %tempid% goto :ts_esu ::======================================================================================================================================== @@ -841,6 +1047,15 @@ call :dk_inskey "[%key%]" :ts_esu if not %_actesu%==1 goto :ts_off +if /i %tsmethod%==KMS4k ( +call :dk_color %Red% "Skipping Windows ESU [KMS4k method is not supported with Windows ESU]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +goto :ts_off +) :: Process Windows ESU @@ -928,8 +1143,12 @@ goto :ts_off if defined esuexistbutnosup ( call :dk_color %Red% "Checking Activation ID [Commercial ESU is not supported for %tsedition%]" +echo %esueditionlist% | find /i "Professional" %nul1% && ( +call :dk_color %Blue% "Go back to Main Menu, select Change Windows Edition option, and change it to [Professional] or any non-Home edition." +) || ( call :dk_color %Blue% "Go back to Main Menu, select Change Windows Edition option and change to any of the below listed editions." echo [%esueditionlist%] +) goto :ts_off ) @@ -1204,6 +1423,24 @@ call :ts_process ::======================================================================================================================================== +:: mass grave[.]dev/office-license-is-not-genuine +:: Add registry keys for volume products so that 'non-genuine' banner won't appear + +set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" +if /i %tsmethod%==KMS4k ( +if %winbuild% GEQ 9200 ( +if not "%osarch%"=="x86" ( +reg delete "%kmskey%" /f /reg:32 %nul% +reg add "%kmskey%" /f /v KeyManagementServiceName /t REG_SZ /d "10.0.0.10" /reg:32 %nul% +) +reg delete "%kmskey%" /f %nul% +reg add "%kmskey%" /f /v KeyManagementServiceName /t REG_SZ /d "10.0.0.10" %nul% +echo Adding a Registry to Prevent Banner [Successful] +) +) + +::======================================================================================================================================== + :ts_startmsi if defined o15msi call :ts_processmsi 15 %o15msi_reg% @@ -1227,6 +1464,17 @@ goto :ts_act echo: echo Processing Windows %KS% Host... +if /i %tsmethod%==KMS4k ( +echo: +call :dk_color %Red% "Skipping Windows %KS% Host [KMS4k method is not supported with Windows %KS% Host]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +goto :ts_act +) + echo: if %winbuild% GEQ 10586 ( call :dk_color %Gray% "With %KS% Host license, system may randomly change Windows Edition later. It is a Windows issue and can be safely ignored." @@ -1338,6 +1586,17 @@ call :dk_color %Blue% "Windows Vista and Server 2008 do not support the installa goto :ts_act ) +if /i %tsmethod%==KMS4k ( +echo: +call :dk_color %Red% "Skipping Office %KS% Host [KMS4k method is not supported with Office %KS% Host]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +goto :ts_act +) + set ohostexist= call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 set ohostids=%allapps% @@ -1390,6 +1649,17 @@ call :dk_color %Gray% "Checking Activation ID [APPX Sideloading goto :dk_done ) +if /i %tsmethod%==KMS4k ( +echo: +call :dk_color %Red% "Skipping Windows 8/8.1 APPX [KMS4k method is not supported with Windows 8/8.1 APPX]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +goto :dk_done +) + set appxexist= if not defined allapps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f @@ -1448,6 +1718,17 @@ echo: echo Processing Manual Activation... echo: +if /i %tsmethod%==KMS4k ( +echo: +call :dk_color %Red% "Skipping Manual Activation [KMS4k method is not supported with it]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +goto :dk_done +) + call :dk_color %Gray% "This option is for advanced users, those who already know what they are doing." call :dk_color %Blue% "Some activation IDs may cause system crash [MUI mismatch], or irreversible changes [CloudEdition etc]." @@ -1607,12 +1888,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble if defined tsids ( echo: -if not defined _vis echo Installing Forged Product Key Data... -echo Depositing Zero Confirmation ID... +if not defined _vis if not defined oldks echo Installing Forged Product Key Data... +if /i %tsmethod%==KMS4k ( +echo Writing TrustedStore data... +) else ( +if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (echo Depositing Zero Confirmation ID...) +) echo: %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( -if %_actman%==0 call :dk_color %Blue% "%_fixmsg%" +if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) else ( @@ -1788,6 +2073,19 @@ set _preview= set _License=%%# set skipprocess= + +set foundprod= +call :tsksdata chkprod %%# +if defined _oMSI if not defined foundprod if /i %tsmethod%==KMS4k ( +set skipprocess=1 +call :dk_color %Red% "Checking Product In Script [%%# MSI Retail is not supported with KMS4k]" +if /i %_actmethod%==Auto ( +call :dk_color %Blue% "Connect to the Internet and try again. Script will use the StaticCID activation method." +) else ( +call :dk_color %Blue% "Use non-KMS4K activation options from the previous menu." +) +) + if "%_actprojvis%"=="1" ( echo %%# | findstr /i "Project Visio" %nul% || ( set skipprocess=1 @@ -1795,8 +2093,17 @@ call :dk_color %Gray% "Skipping Because Project/Visio Mode [%%#]" ) ) +if "%_actprojvis%"=="0" if /i %tsmethod%==KMS4k echo %_oIds% | findstr /i "O365" %nul% && ( +echo %%# | findstr /i "Project Visio" %nul% && ( +set skipprocess=1 +echo Skipping Because Mondo Is Available [%%#] +) +) + + if not defined skipprocess ( +if /i not %tsmethod%==KMS4k ( set no365= if "%oVer%"=="15" (echo %%# | findstr /i "O365HomePremRetail" %nul% && set no365=1) if "%oVer%"=="16" (echo %%# | findstr /i "O365" %nul% && set no365=1) @@ -1818,8 +2125,30 @@ call :ks_osppready echo Converting Unsupported OEM-ARM Office [%%# To MondoRetail] ) ) +) +if not defined _oMSI if /i %tsmethod%==KMS4k if not defined foundprod ( +call :tsksdata getinfo %%# +if defined _altoffid ( +echo Converting Retail To Volume [%%# To !_altoffid!] +) else ( +set _License=MondoVolume +set _altoffid=MondoVolume +echo Converting Retail To Volume [%%# To !_altoffid!] [Using Mondo because %%# is not found in the script] +) +echo %%# | find /i "O365" %nul% && ( +if "%oVer%"=="15" (call :dk_color %Gray% "Mondo 2013 is equivalent to O365 [15.0 version] in terms of the latest features.") +if "%oVer%"=="16" (call :dk_color %Gray% "Mondo 2016 is equivalent to O365 in terms of the latest features.") +) +call :ks_osppready +) + +if /i %tsmethod%==KMS4k ( +echo !_License! | find /i "Retail" %nul% && (set keytype=zero) || (set keytype=ks) +) else ( set keytype=zero +) + for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':offtsid\:.*';iex ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set _actid=%%a) ) @@ -1848,7 +2177,7 @@ echo "!allapps!" | find /i "!_actid!" %nul1% || call :oh_installlic :: Add SharedComputerLicensing registry key if Retail Office C2R is installed on Windows Server :: https://learn.microsoft.com/en-us/office/troubleshoot/office-suite-issues/click-to-run-office-on-terminal-server -if defined winserver if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" ( +if /i not %tsmethod%==KMS4k if defined winserver if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" ( echo %_oIds% | find /i "Retail" %nul1% && ( set scaIsNeeded=1 reg add %_config% /v SharedComputerLicensing /t REG_SZ /d "1" /f %nul1% @@ -2153,6 +2482,59 @@ exit /b ::======================================================================================================================================== +:: Clean existing K-M-S cache from the registry + +:_taskclear-cache + +set w= +for %%# in (SppE%w%xtComObj.exe sppsvc.exe SLsvc.exe) do ( +reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" /f %nul% +) + +set "OPPk=SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" + +if %winbuild% LSS 7600 ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL" %nul% && ( +set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL" +) +) +if not defined SPPk ( +set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" +) + +set "slp=SoftwareLicensingProduct" +set "ospp=OfficeSoftwareProtectionProduct" + +set "_wApp=55c92734-d682-4d71-983e-d6ec3f16059f" +set "_oApp=0ff1ce15-a989-479d-af46-f275c6370663" +set "_oA14=59a52881-a989-479d-af46-f275c6370663" + +%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServiceName +%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServiceName /reg:32 +%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServicePort +%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServicePort /reg:32 +%nul% reg delete "HKLM\%SPPk%" /f /v DisableDnsPublishing +%nul% reg delete "HKLM\%SPPk%" /f /v DisableKeyManagementServiceHostCaching +%nul% reg delete "HKLM\%SPPk%\%_wApp%" /f +if %winbuild% GEQ 9200 ( +%nul% reg delete "HKLM\%SPPk%\%_oApp%" /f +%nul% reg delete "HKLM\%SPPk%\%_oApp%" /f /reg:32 +) +if %winbuild% GEQ 9600 ( +%nul% reg delete "HKU\S-1-5-20\%SPPk%\%_wApp%" /f +%nul% reg delete "HKU\S-1-5-20\%SPPk%\%_oApp%" /f +) +%nul% reg delete "HKLM\%OPPk%" /f /v KeyManagementServiceName +%nul% reg delete "HKLM\%OPPk%" /f /v KeyManagementServicePort +%nul% reg delete "HKLM\%OPPk%" /f /v DisableDnsPublishing +%nul% reg delete "HKLM\%OPPk%" /f /v DisableKeyManagementServiceHostCaching +%nul% reg delete "HKLM\%OPPk%\%_oA14%" /f +%nul% reg delete "HKLM\%OPPk%\%_oApp%" /f + +exit /b + +::======================================================================================================================================== + :: Set variables :dk_setvar @@ -3064,6 +3446,220 @@ exit /b :tsforge: $src = @' +#if !POWERSHELL2 +namespace ActivationWs +{ + +/* + +This code is adapted from ActivationWs. +Original Repository: https://github.com/dadorner-msft/activationws + +MIT License + +Copyright (c) Daniel Dorner + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +using System; +using System.IO; +using System.Linq; +using System.Net; +using System.Security.Cryptography; +using System.Text; +using System.Xml.Linq; + + public static class ActivationHelper { + // Key for HMAC/SHA256 signature. + private static readonly byte[] MacKey = new byte[64] { + 254, 49, 152, 117, 251, 72, 132, 134, + 156, 243, 241, 206, 153, 168, 144, 100, + 171, 87, 31, 202, 71, 4, 80, 88, + 48, 36, 226, 20, 98, 135, 121, 160, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 + }; + + private const string Action = "http://www.microsoft.com/BatchActivationService/BatchActivate"; + + private static readonly Uri Uri = new Uri("https://activation.sls.microsoft.com/BatchActivation/BatchActivation.asmx"); + + private static readonly XNamespace SoapSchemaNs = "http://schemas.xmlsoap.org/soap/envelope/"; + private static readonly XNamespace XmlSchemaInstanceNs = "http://www.w3.org/2001/XMLSchema-instance"; + private static readonly XNamespace XmlSchemaNs = "http://www.w3.org/2001/XMLSchema"; + private static readonly XNamespace BatchActivationServiceNs = "http://www.microsoft.com/BatchActivationService"; + private static readonly XNamespace BatchActivationRequestNs = "http://www.microsoft.com/DRM/SL/BatchActivationRequest/1.0"; + private static readonly XNamespace BatchActivationResponseNs = "http://www.microsoft.com/DRM/SL/BatchActivationResponse/1.0"; + + public static string CallWebService(int requestType, string installationId, string extendedProductId) { + XDocument soapRequest = CreateSoapRequest(requestType, installationId, extendedProductId); + HttpWebRequest webRequest = CreateWebRequest(soapRequest); + XDocument soapResponse = new XDocument(); + + try { + IAsyncResult asyncResult = webRequest.BeginGetResponse(null, null); + asyncResult.AsyncWaitHandle.WaitOne(); + + // Read data from the response stream. + using (WebResponse webResponse = webRequest.EndGetResponse(asyncResult)) + using (StreamReader streamReader = new StreamReader(webResponse.GetResponseStream())) { + soapResponse = XDocument.Parse(streamReader.ReadToEnd()); + } + + return ParseSoapResponse(soapResponse); + + } catch { + throw; + } + } + + private static XDocument CreateSoapRequest(int requestType, string installationId, string extendedProductId) { + // Create an activation request. + XElement activationRequest = new XElement(BatchActivationRequestNs + "ActivationRequest", + new XElement(BatchActivationRequestNs + "VersionNumber", "2.0"), + new XElement(BatchActivationRequestNs + "RequestType", requestType), + new XElement(BatchActivationRequestNs + "Requests", + new XElement(BatchActivationRequestNs + "Request", + new XElement(BatchActivationRequestNs + "PID", extendedProductId), + requestType == 1 ? new XElement(BatchActivationRequestNs + "IID", installationId) : null) + ) + ); + + // Get the unicode byte array of activationRequest and convert it to Base64. + byte[] bytes = Encoding.Unicode.GetBytes(activationRequest.ToString()); + string requestXml = Convert.ToBase64String(bytes); + + XDocument soapRequest = new XDocument(); + + using (HMACSHA256 hMACSHA = new HMACSHA256(MacKey)) { + // Convert the HMAC hashed data to Base64. + string digest = Convert.ToBase64String(hMACSHA.ComputeHash(bytes)); + + soapRequest = new XDocument( + new XDeclaration("1.0", "UTF-8", "no"), + new XElement(SoapSchemaNs + "Envelope", + new XAttribute(XNamespace.Xmlns + "soap", SoapSchemaNs), + new XAttribute(XNamespace.Xmlns + "xsi", XmlSchemaInstanceNs), + new XAttribute(XNamespace.Xmlns + "xsd", XmlSchemaNs), + new XElement(SoapSchemaNs + "Body", + new XElement(BatchActivationServiceNs + "BatchActivate", + new XElement(BatchActivationServiceNs + "request", + new XElement(BatchActivationServiceNs + "Digest", digest), + new XElement(BatchActivationServiceNs + "RequestXml", requestXml) + ) + ) + ) + )); + + } + + return soapRequest; + } + + private static HttpWebRequest CreateWebRequest(XDocument soapRequest) { + HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(Uri); + webRequest.Accept = "text/xml"; + webRequest.ContentType = "text/xml; charset=\"utf-8\""; + webRequest.Headers.Add("SOAPAction", Action); + webRequest.Host = "activation.sls.microsoft.com"; + webRequest.Method = "POST"; + + try { + // Insert SOAP envelope + using (Stream stream = webRequest.GetRequestStream()) { + soapRequest.Save(stream); + } + + return webRequest; + + } catch { + throw; + } + } + + private static string ParseSoapResponse(XDocument soapResponse) { + if (soapResponse == null) { + throw new ArgumentNullException("soapResponse", "The remote server returned an unexpected response."); + } + + if (!soapResponse.Descendants(BatchActivationServiceNs + "ResponseXml").Any()) { + throw new Exception("The remote server returned an unexpected response"); + } + + try { + XDocument responseXml = XDocument.Parse(soapResponse.Descendants(BatchActivationServiceNs + "ResponseXml").First().Value); + + if (responseXml.Descendants(BatchActivationResponseNs + "ErrorCode").Any()) { + string errorCode = responseXml.Descendants(BatchActivationResponseNs + "ErrorCode").First().Value; + + switch (errorCode) { + case "0x7F": + throw new Exception("The Multiple Activation Key has exceeded its limit"); + + case "0x67": + throw new Exception("The product key has been blocked"); + + case "0x68": + throw new Exception("Invalid product key"); + + case "0x86": + throw new Exception("Invalid key type"); + + case "0x90": + throw new Exception("Please check the Installation ID and try again"); + + default: + throw new Exception(string.Format("The remote server reported an error ({0})", errorCode)); + } + + } else if (responseXml.Descendants(BatchActivationResponseNs + "ResponseType").Any()) { + string responseType = responseXml.Descendants(BatchActivationResponseNs + "ResponseType").First().Value; + + switch (responseType) { + case "1": + string confirmationId = responseXml.Descendants(BatchActivationResponseNs + "CID").First().Value; + return confirmationId; + + case "2": + string activationsRemaining = responseXml.Descendants(BatchActivationResponseNs + "ActivationRemaining").First().Value; + return activationsRemaining; + + default: + throw new Exception("The remote server returned an unrecognized response"); + } + + } else { + throw new Exception("The remote server returned an unrecognized response"); + } + + } catch { + throw; + } + } + } +} +#endif + // Common.cs namespace LibTSforge { @@ -5625,27 +6221,23 @@ namespace LibTSforge.Modifiers } -// Activators/AVMA4K.cs +// Activators/KMS4K.cs namespace LibTSforge.Activators { using System; + using System.IO; using PhysicalStore; using SPP; - public static class AVMA4k + public class KMS4k { public static void Activate(PSVersion version, bool production, Guid actId) { - if (version != PSVersion.WinModern && version != PSVersion.WinBlue) - { - throw new NotSupportedException("AVMA licenses are not available for this product."); - } - Guid appId; if (actId == Guid.Empty) { appId = SLApi.WINDOWS_APP_ID; - actId = SLApi.GetDefaultActivationID(appId, false); + actId = SLApi.GetDefaultActivationID(appId, true); if (actId == Guid.Empty) { @@ -5657,9 +6249,9 @@ namespace LibTSforge.Activators appId = SLApi.GetAppId(actId); } - if (SLApi.GetPKeyChannel(SLApi.GetInstalledPkeyID(actId)) != "VT:IA") + if (SLApi.GetPKeyChannel(SLApi.GetInstalledPkeyID(actId)) != "Volume:GVLK") { - throw new NotSupportedException("Non-VT:IA product key installed."); + throw new NotSupportedException("Non-Volume:GVLK product key installed."); } SPPUtils.KillSPP(version); @@ -5670,80 +6262,171 @@ namespace LibTSforge.Activators { string key = string.Format("SPPSVC\\{0}\\{1}", appId, actId); - long creationTime = BitConverter.ToInt64(store.GetBlock("__##USERSEP##\\$$_RESERVED_$$\\NAMESPACE__", "__##USERSEP-RESERVED##__$$GLOBAL-CREATION-TIME$$").Data, 0); - long tickCount = BitConverter.ToInt64(store.GetBlock("__##USERSEP##\\$$_RESERVED_$$\\NAMESPACE__", "__##USERSEP-RESERVED##__$$GLOBAL-TICKCOUNT-UPTIME$$").Data, 0); - long deltaTime = BitConverter.ToInt64(store.GetBlock(key, "__##USERSEP-RESERVED##__$$UP-TIME-DELTA$$").Data, 0); + ulong unknown = 0; + ulong time1; + ulong time2 = (ulong)DateTime.UtcNow.ToFileTime(); + ulong expiry = Constants.TimerMax; - const ulong unknown = 0; - ulong time1 = (ulong)(creationTime + tickCount + deltaTime); - ulong crcBindTime = (ulong)DateTime.UtcNow.ToFileTime(); - ulong timerTime = crcBindTime / 10000; - ulong expiry = Constants.TimerMax / 10000; - - VariableBag avmaBinding = new VariableBag(version); - - avmaBinding.Blocks.AddRange(new[] + if (version == PSVersion.Vista || version == PSVersion.Win7) { + unknown = 0x800000000; + time1 = 0; + } + else + { + long creationTime = BitConverter.ToInt64(store.GetBlock("__##USERSEP##\\$$_RESERVED_$$\\NAMESPACE__", "__##USERSEP-RESERVED##__$$GLOBAL-CREATION-TIME$$").Data, 0); + long tickCount = BitConverter.ToInt64(store.GetBlock("__##USERSEP##\\$$_RESERVED_$$\\NAMESPACE__", "__##USERSEP-RESERVED##__$$GLOBAL-TICKCOUNT-UPTIME$$").Data, 0); + long deltaTime = BitConverter.ToInt64(store.GetBlock(key, "__##USERSEP-RESERVED##__$$UP-TIME-DELTA$$").Data, 0); + + time1 = (ulong)(creationTime + tickCount + deltaTime); + time2 /= 10000; + expiry /= 10000; + } + + if (version == PSVersion.Vista) + { + VistaTimer vistaTimer = new VistaTimer + { + Time = time2, + Expiry = Constants.TimerMax + }; + + string vistaTimerName = string.Format("msft:sl/timer/VLExpiration/VOLUME/{0}/{1}", appId, actId); + + store.DeleteBlock(key, vistaTimerName); + store.DeleteBlock(key, actId.ToString()); + + BinaryWriter writer = new BinaryWriter(new MemoryStream()); + writer.Write(Constants.KMSv4Response.Length); + writer.Write(Constants.KMSv4Response); + writer.Write(Constants.UniversalHWIDBlock); + byte[] kmsData = writer.GetBytes(); + + store.AddBlocks(new[] + { + new PSBlock + { + Type = BlockType.TIMER, + Flags = 0, + KeyAsStr = key, + ValueAsStr = vistaTimerName, + Data = vistaTimer.CastToArray() + }, + new PSBlock + { + Type = BlockType.NAMED, + Flags = 0, + KeyAsStr = key, + ValueAsStr = actId.ToString(), + Data = kmsData + } + }); + } + else + { + byte[] hwidBlock = Constants.UniversalHWIDBlock; + byte[] kmsResp; + + switch (version) + { + case PSVersion.Win7: + kmsResp = Constants.KMSv4Response; + break; + case PSVersion.Win8: + kmsResp = Constants.KMSv5Response; + break; + case PSVersion.WinBlue: + case PSVersion.WinModern: + kmsResp = Constants.KMSv6Response; + break; + default: + throw new NotSupportedException("Unsupported PSVersion."); + } + + VariableBag kmsBinding = new VariableBag(version); + + kmsBinding.Blocks.AddRange(new[] + { new CRCBlockModern { DataType = CRCBlockType.BINARY, Key = new byte[] { }, - Value = BitConverter.GetBytes(crcBindTime), + Value = kmsResp }, new CRCBlockModern { DataType = CRCBlockType.STRING, Key = new byte[] { }, - ValueAsStr = "AVMA4K", + ValueAsStr = "msft:rm/algorithm/hwid/4.0" }, new CRCBlockModern { - DataType = CRCBlockType.STRING, - Key = new byte[] { }, - ValueAsStr = "00491-50000-00001-AA666", + DataType = CRCBlockType.BINARY, + KeyAsStr = "SppBindingLicenseData", + Value = hwidBlock } - }); + }); - byte[] avmaBindingData = avmaBinding.Serialize(); + if (version == PSVersion.WinModern) + { + kmsBinding.Blocks.AddRange(new[] + { + new CRCBlockModern + { + DataType = CRCBlockType.STRING, + Key = new byte[] { }, + ValueAsStr = "massgrave.dev" + }, + new CRCBlockModern + { + DataType = CRCBlockType.STRING, + Key = new byte[] { }, + ValueAsStr = "6969" + } + }); + } - Timer avmaTimer = new Timer - { - Unknown = unknown, - Time1 = time1, - Time2 = timerTime, - Expiry = expiry - }; + byte[] kmsBindingData = kmsBinding.Serialize(); - string storeVal = string.Format("msft:spp/ia/bind/1.0/store/{0}/{1}", appId, actId); - string timerVal = string.Format("msft:spp/ia/bind/1.0/timer/{0}/{1}", appId, actId); + Timer kmsTimer = new Timer + { + Unknown = unknown, + Time1 = time1, + Time2 = time2, + Expiry = expiry + }; - store.DeleteBlock(key, storeVal); - store.DeleteBlock(key, timerVal); + string storeVal = string.Format("msft:spp/kms/bind/2.0/store/{0}/{1}", appId, actId); + string timerVal = string.Format("msft:spp/kms/bind/2.0/timer/{0}/{1}", appId, actId); - store.AddBlocks(new[] - { + store.DeleteBlock(key, storeVal); + store.DeleteBlock(key, timerVal); + + store.AddBlocks(new[] + { new PSBlock { Type = BlockType.NAMED, - Flags = 0x400, + Flags = (version == PSVersion.WinModern) ? (uint)0x400 : 0, KeyAsStr = key, ValueAsStr = storeVal, - Data = avmaBindingData, + Data = kmsBindingData }, new PSBlock { Type = BlockType.TIMER, - Flags = 0x4, + Flags = (version == PSVersion.Win7) ? (uint)0 : 0x4, KeyAsStr = key, ValueAsStr = timerVal, - Data = avmaTimer.CastToArray() + Data = kmsTimer.CastToArray() } - }); + }); + } } - SLApi.RefreshLicenseStatus(); + SPPUtils.RestartSPP(version); SLApi.FireStateChangedEvent(appId); - Logger.WriteLine("Activated using AVMA4k successfully."); + Logger.WriteLine("Activated using KMS4k successfully."); } } } @@ -7850,15 +8533,16 @@ namespace LibTSforge.PhysicalStore '@ $ErrorActionPreference = 'Stop' $binPath = "$env:_work\BIN\LibTSforge.dll" +$psMajorVer = (Get-Host).Version.Major if (Test-Path -LiteralPath $binPath) { Write-Host "LibTSforge.dll found in BIN folder. Loading the DLL..." Add-Type -Path $binPath } else { - $cp = [CodeDom.Compiler.CompilerParameters] [string[]]@("System.dll", "System.Core.dll", "System.ServiceProcess.dll", "System.Xml.dll") - $cp.CompilerOptions = "/unsafe" - $lang = If ((Get-Host).Version.Major -gt 2) { "CSharp" } Else { "CSharpVersion3" } + $cp = [CodeDom.Compiler.CompilerParameters] [string[]]@("System.dll", "System.Core.dll", "System.ServiceProcess.dll", "System.Xml.dll", "System.Xml.Linq.dll") + if ($psMajorVer -le 2) { $cp.CompilerOptions = "/define:POWERSHELL2 /unsafe" } else { $cp.CompilerOptions = "/unsafe" } + $lang = if ($psMajorVer -gt 2) { "CSharp" } else { "CSharpVersion3" } $ctemp = "$env:SystemRoot\Temp\" if (-Not (Test-Path -Path $ctemp)) { New-Item -Path $ctemp -ItemType Directory > $null } @@ -7907,32 +8591,65 @@ function slGetSkuInfo($SkuId) { if (-not $env:resetstuff) { foreach ($tsactid in $tsactids) { try { + $activated = $null $prodDes = Get-WmiInfo -tsactid $tsactid -property "Description" $prodName = Get-WmiInfo -tsactid $tsactid -property "Name" if ($prodName) { $nameParts = $prodName -split ',', 2 $prodName = if ($nameParts.Count -gt 1) { ($nameParts[1].Trim() -split '[ ,]')[0] } else { $null } } - if (-not $env:_vis) { - [LibTSforge.Modifiers.GenPKeyInstall]::InstallGenPKey($ver, $prod, $tsactid) - } - if ($prodName -match 'Office' -and -not (slGetSkuInfo($tsactid))) { + if (-not $env:_vis -and -not $env:oldks) { + [LibTSforge.Modifiers.GenPKeyInstall]::InstallGenPKey($ver, $prod, $tsactid) + } + if ($prodName -match 'Office' -and $prodDes -notmatch 'KMS' -and -not (slGetSkuInfo($tsactid))) { $licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus" if ($licenseStatus -eq 1) { Write-Host "[$prodName] is already permanently activated." -ForegroundColor White -BackgroundColor DarkGreen continue } } - [LibTSforge.Activators.ZeroCID]::Activate($ver, $prod, $tsactid) - $licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus" - if ($licenseStatus -eq 1) { + if ($env:tsmethod -eq "StaticCID") { + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + $attempts = @( + @(100055, 1000043, 1338662172562478), + @(1345, 1003020, 6311608238084405) + ) + foreach ($params in $attempts) { + [LibTSforge.Modifiers.SetIIDParams]::SetParams($ver, $prod, $tsactid, [LibTSforge.SPP.PKeyAlgorithm]::PKEY2009, $params[0], $params[1], $params[2]) + $instId = [LibTSforge.SPP.SLApi]::GetInstallationID($tsactid) + $confId = [ActivationWs.ActivationHelper]::CallWebService(1, $instId, "31337-42069-123-456789-04-1337-2600.0000-2542001") + $result = [LibTSforge.SPP.SLApi]::DepositConfirmationID($tsactid, $instId, $confId) + if ($result -eq 0) { break } + } + [LibTSforge.SPP.SPPUtils]::RestartSPP($ver) + } + elseif ($env:tsmethod -eq "KMS4k") { + [LibTSforge.Activators.KMS4k]::Activate($ver, $prod, $tsactid) + } + else { + [LibTSforge.Activators.ZeroCID]::Activate($ver, $prod, $tsactid) + } + if ($env:tsmethod -eq "KMS4k") { + $GracePeriodStatus = Get-WmiInfo -tsactid $tsactid -property "GracePeriodRemaining" + if ($GracePeriodStatus -gt 259200) { $activated = 1 } + } + else { + $licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus" + if ($licenseStatus -eq 1) { $activated = 1 } + } + if ($activated) { if ($prodDes -match 'KMS' -and $prodDes -notmatch 'CLIENT') { [LibTSforge.Modifiers.KMSHostCharge]::Charge($ver, $prod, $tsactid) - Write-Host "[$prodName] CSVLK is permanently activated with ZeroCID." -ForegroundColor White -BackgroundColor DarkGreen + Write-Host "[$prodName] CSVLK is permanently activated with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen Write-Host "[$prodName] CSVLK is charged with 25 clients for 30 days." -ForegroundColor White -BackgroundColor DarkGreen } else { - Write-Host "[$prodName] is permanently activated with ZeroCID." -ForegroundColor White -BackgroundColor DarkGreen + if ($env:tsmethod -eq "KMS4k") { + 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 { + Write-Host "[$prodName] is permanently activated with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen + } } } else { @@ -7950,11 +8667,11 @@ if (-not $env:resetstuff) { if ($env:resetstuff) { try { - if (-not $env:_vis) {[LibTSforge.Modifiers.TamperedFlagsDelete]::DeleteTamperFlags($ver, $prod)} + if (-not $env:_vis) { [LibTSforge.Modifiers.TamperedFlagsDelete]::DeleteTamperFlags($ver, $prod) } [LibTSforge.SPP.SLApi]::RefreshLicenseStatus() [LibTSforge.Modifiers.RearmReset]::Reset($ver, $prod) [LibTSforge.Modifiers.GracePeriodReset]::Reset($ver, $prod) - if (-not $env:_vis) {[LibTSforge.Modifiers.KeyChangeLockDelete]::Delete($ver, $prod)} + if (-not $env:_vis) { [LibTSforge.Modifiers.KeyChangeLockDelete]::Delete($ver, $prod) } } catch { $errcode = 3 @@ -8394,6 +9111,130 @@ exit /b ::======================================================================================================================================== +:: 1st column = Office version +:: 2nd column = Volume or free retail product +:: 3rd column = Retail product names that needs to be converted to the Volume product mentioned in 2nd column +:: Separator = "_" + +:tsksdata + +set f= +for %%# in ( +:: Office 2013 +15_AccessVolume_-AccessRetail- +15_AccessRuntimeRetail +15_ExcelVolume_-ExcelRetail- +15_GrooveVolume_-GrooveRetail- +15_InfoPathVolume_-InfoPathRetail- +15_LyncAcademicRetail +15_LyncEntryRetail +15_LyncVolume_-LyncRetail- +15_MondoRetail +15_MondoVolume_-O365BusinessRetail-O365HomePremRetail-O365ProPlusRetail-O365SmallBusPremRetail- +15_OneNoteFreeRetail +15_OneNoteVolume_-OneNoteRetail- +15_OutlookVolume_-OutlookRetail- +15_PowerPointVolume_-PowerPointRetail- +15_ProjectProVolume_-ProjectProRetail- +15_ProjectStdVolume_-ProjectStdRetail- +15_ProPlusVolume_-ProPlusRetail-ProfessionalPipcRetail-ProfessionalRetail- +15_PublisherVolume_-PublisherRetail- +15_SPDRetail +15_StandardVolume_-StandardRetail-HomeBusinessPipcRetail-HomeBusinessRetail-HomeStudentARMRetail-HomeStudentPlusARMRetail-HomeStudentRetail-PersonalPipcRetail-PersonalRetail- +15_VisioProVolume_-VisioProRetail- +15_VisioStdVolume_-VisioStdRetail- +15_WordVolume_-WordRetail- +:: Office 2016 +16_AccessRuntimeRetail +16_AccessVolume_-AccessRetail- +16_ExcelVolume_-ExcelRetail- +16_MondoRetail +16_MondoVolume_-O365AppsBasicRetail-O365BusinessRetail-O365EduCloudRetail-O365HomePremRetail-O365ProPlusRetail-O365SmallBusPremRetail- +16_OneNoteFreeRetail +16_OneNoteVolume_-OneNoteRetail-OneNote2021Retail- +16_OutlookVolume_-OutlookRetail- +16_PowerPointVolume_-PowerPointRetail- +16_ProjectProVolume_-ProjectProRetail- +16_ProjectProXVolume +16_ProjectStdVolume_-ProjectStdRetail- +16_ProjectStdXVolume +16_ProPlusVolume_-ProPlusRetail-ProfessionalPipcRetail-ProfessionalRetail- +16_PublisherVolume_-PublisherRetail- +16_SkypeServiceBypassRetail +16_SkypeforBusinessEntryRetail +16_SkypeforBusinessVolume_-SkypeforBusinessRetail- +16_StandardVolume_-StandardRetail-HomeBusinessPipcRetail-HomeBusinessRetail-HomeStudentARMRetail-HomeStudentPlusARMRetail-HomeStudentRetail-HomeStudentVNextRetail-PersonalPipcRetail-PersonalRetail- +16_VisioProVolume_-VisioProRetail- +16_VisioProXVolume +16_VisioStdVolume_-VisioStdRetail- +16_VisioStdXVolume +16_WordVolume_-WordRetail- +:: Office 2019 +16_AccessRuntime2019Retail +16_Access2019Volume_-Access2019Retail- +16_Excel2019Volume_-Excel2019Retail- +16_Outlook2019Volume_-Outlook2019Retail- +16_PowerPoint2019Volume_-PowerPoint2019Retail- +16_ProjectPro2019Volume_-ProjectPro2019Retail- +16_ProjectStd2019Volume_-ProjectStd2019Retail- +16_ProPlus2019Volume_-ProPlus2019Retail-Professional2019Retail- +16_Publisher2019Volume_-Publisher2019Retail- +16_SkypeforBusiness2019Volume_-SkypeforBusiness2019Retail- +16_SkypeforBusinessEntry2019Retail +16_Standard2019Volume_-Standard2019Retail-HomeBusiness2019Retail-HomeStudentARM2019Retail-HomeStudentPlusARM2019Retail-HomeStudent2019Retail-Personal2019Retail- +16_VisioPro2019Volume_-VisioPro2019Retail- +16_VisioStd2019Volume_-VisioStd2019Retail- +16_Word2019Volume_-Word2019Retail- +:: Office 2021 +:: OneNote2021Volume KMS license is not available +16_AccessRuntime2021Retail +16_Access2021Volume_-Access2021Retail- +16_Excel2021Volume_-Excel2021Retail- +16_Outlook2021Volume_-Outlook2021Retail- +16_OneNoteFree2021Retail +16_PowerPoint2021Volume_-PowerPoint2021Retail- +16_ProjectPro2021Volume_-ProjectPro2021Retail- +16_ProjectStd2021Volume_-ProjectStd2021Retail- +16_ProPlus2021Volume_-ProPlus2021Retail-Professional2021Retail- +16_Publisher2021Volume_-Publisher2021Retail- +16_SkypeforBusiness2021Volume_-SkypeforBusiness2021Retail- +16_Standard2021Volume_-Standard2021Retail-HomeBusiness2021Retail-HomeStudent2021Retail-Personal2021Retail- +16_VisioPro2021Volume_-VisioPro2021Retail- +16_VisioStd2021Volume_-VisioStd2021Retail- +16_Word2021Volume_-Word2021Retail- +:: Office 2024 +16_Access2024Volume_-Access2024Retail- +16_Excel2024Volume_-Excel2024Retail- +16_Outlook2024Volume_-Outlook2024Retail- +16_PowerPoint2024Volume_-PowerPoint2024Retail- +16_ProjectPro2024Volume_-ProjectPro2024Retail- +16_ProjectStd2024Volume_-ProjectStd2024Retail- +16_ProPlus2024Volume_-ProPlus2024Retail- +16_SkypeforBusiness2024Volume +16_Standard2024Volume_-Home2024Retail-HomeBusiness2024Retail- +16_VisioPro2024Volume_-VisioPro2024Retail- +16_VisioStd2024Volume_-VisioStd2024Retail- +16_Word2024Volume_-Word2024Retail- +) do ( +for /f "tokens=1-3 delims=_" %%A in ("%%#") do ( + +if %1==chkprod if "%oVer%"=="%%A" if not defined foundprod ( +if /i "%%B"=="%2" set foundprod=1 +) + +if %1==getinfo if "%oVer%"=="%%A" ( +echo: %%C | find /i "-%2-" %nul% && ( +set _License=%%B +set _altoffid=%%B +) +) + +) +) +exit /b + +::======================================================================================================================================== + :ts_getedition set tsedition= diff --git a/README.md b/README.md index 61accf5..3e776ee 100644 --- a/README.md +++ b/README.md @@ -1,118 +1,116 @@ -

MAS Logo

- -

Microsoft Activation Scripts (MAS)

- -

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

- -
- -## How to Activate Windows / Office? - -### Method 1 - PowerShell (Windows 8 and later) ❤️ - -1. **Open PowerShell** - To do that, press the Windows key + X, then select PowerShell or Terminal. - -2. **Copy and paste the code below, then press enter.** -``` -irm https://get.activated.win | iex -``` -Alternatively, you can use the following (this will be deprecated in the future): -``` -irm https://massgrave.dev/get | iex -``` - -3. You will see the activation options. - Press 1 HWID for Windows activation. - Press 2 Ohook for Office activation. - -4. That's all - ---- - -### Method 2 - Traditional (Windows Vista and later) - -
- Click here to view - -1. Download the file using one of the links below: -`https://github.com/massgravel/Microsoft-Activation-Scripts/archive/refs/heads/master.zip` -or -`https://git.activated.win/massgrave/Microsoft-Activation-Scripts/archive/master.zip` -2. Right-click on the downloaded zip file and extract it. -3. In the extracted folder, find the folder named `All-In-One-Version`. -4. Run the file named `MAS_AIO.cmd`. -5. You will see the activation options. Follow the on-screen instructions. -6. That's all. - -
- ---- - -- **[Office for macOS](https://massgrave.dev/office_for_mac)** -- To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches). - ---- - -### Not working ❓ - -- If you are **unable to launch MAS** using the PowerShell method, please refer to **Method 2** listed above. -- If MAS is launched and the script shows any errors, check for any troubleshooting steps mentioned in blue color and try to follow those. -- If you have any issues, please feel free to reach out to us [here](https://massgrave.dev/troubleshoot). - ---- - -> [!NOTE] -> -> - The IRM command in PowerShell downloads a script from a specified URL, and the IEX command executes it. -> - Always double-check the URL before executing the command and verify the source if manually downloading files. -> - Be cautious, as some spread malware disguised as MAS by using different URLs in the IRM command. - ---- - -``` -Latest Version: 3.2 -Release date: 6-May-2025 -``` - -### [Troubleshooting / Help](https://massgrave.dev/troubleshoot) -### [Download Original Windows & Office](https://massgrave.dev/genuine-installation-media) -### Homepage - [https://massgrave.dev/](https://massgrave.dev/) - -
- -[![1.1]][1] -[![1.2]][2] -[![1.3]][3] - -
- -
- -[![1.4]][4] -[![1.5]][5] -[![1.6]][6] -[![1.7]][7] - -
- -[1.1]: https://massgrave.dev/img/logo_github.png (GitHub) -[1.2]: https://massgrave.dev/img/logo_azuredevops.png (AzureDevOps) -[1.3]: https://massgrave.dev/img/logo_gitea.png (Self-hosted Git) - -[1.4]: https://massgrave.dev/img/logo_discord.png (Chat with us without signup) -[1.5]: https://massgrave.dev/img/logo_reddit.png (Reddit) -[1.6]: https://massgrave.dev/img/logo_bluesky.png (Bluesky) -[1.7]: https://massgrave.dev/img/logo_x.png (Twitter) - -[1]: https://github.com/massgravel/Microsoft-Activation-Scripts -[2]: https://dev.azure.com/massgrave/_git/Microsoft-Activation-Scripts -[3]: https://git.activated.win/massgrave/Microsoft-Activation-Scripts -[4]: https://discord.gg/j2yFsV5ZVC -[5]: https://www.reddit.com/r/MAS_Activator -[6]: https://bsky.app/profile/massgrave.dev -[7]: https://twitter.com/massgravel - ---- - -

Made with Love ❤️

+

MAS Logo

+ +

Microsoft Activation Scripts (MAS)

+ +

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

+ +
+ +## How to Activate Windows / Office? + +### Method 1 - PowerShell (Windows 8 and later) ❤️ + +1. **Open PowerShell** + To do that, press the Windows key + X, then select PowerShell or Terminal. + +2. **Copy and paste the code below, then press enter.** +``` +irm https://get.activated.win | iex +``` +Alternatively, you can use the following (this will be deprecated in the future): +``` +irm https://massgrave.dev/get | iex +``` + +3. You will see the activation options. Choose the activation options highlighted in green. + +4. That's all + +--- + +### Method 2 - Traditional (Windows Vista and later) + +
+ Click here to view + +1. Download the file using one of the links below: +`https://github.com/massgravel/Microsoft-Activation-Scripts/archive/refs/heads/master.zip` +or +`https://git.activated.win/massgrave/Microsoft-Activation-Scripts/archive/master.zip` +2. Right-click on the downloaded zip file and extract it. +3. In the extracted folder, find the folder named `All-In-One-Version`. +4. Run the file named `MAS_AIO.cmd`. +5. You will see the activation options. Follow the on-screen instructions. +6. That's all. + +
+ +--- + +- To activate additional products such as **Office for macOS, Visual Studio, RDS CALs, and Windows XP**, check [here](https://massgrave.dev/unsupported_products_activation). +- To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches). + +--- + +### Not working ❓ + +- If you are **unable to launch MAS** using the PowerShell method, please refer to **Method 2** listed above. +- If MAS is launched and the script shows any errors, check for any troubleshooting steps mentioned in blue color and try to follow those. +- If you have any issues, please feel free to reach out to us [here](https://massgrave.dev/troubleshoot). + +--- + +> [!NOTE] +> +> - The IRM command in PowerShell downloads a script from a specified URL, and the IEX command executes it. +> - Always double-check the URL before executing the command and verify the source if manually downloading files. +> - Be cautious, as some spread malware disguised as MAS by using different URLs in the IRM command. + +--- + +``` +Latest Version: 3.2 +Release date: 6-May-2025 +``` + +### [Troubleshooting / Help](https://massgrave.dev/troubleshoot) +### [Download Original Windows & Office](https://massgrave.dev/genuine-installation-media) +### Homepage - [https://massgrave.dev/](https://massgrave.dev/) + +
+ +[![1.1]][1] +[![1.2]][2] +[![1.3]][3] + +
+ +
+ +[![1.4]][4] +[![1.5]][5] +[![1.6]][6] +[![1.7]][7] + +
+ +[1.1]: https://massgrave.dev/img/logo_github.png (GitHub) +[1.2]: https://massgrave.dev/img/logo_azuredevops.png (AzureDevOps) +[1.3]: https://massgrave.dev/img/logo_gitea.png (Self-hosted Git) + +[1.4]: https://massgrave.dev/img/logo_discord.png (Chat with us without signup) +[1.5]: https://massgrave.dev/img/logo_reddit.png (Reddit) +[1.6]: https://massgrave.dev/img/logo_bluesky.png (Bluesky) +[1.7]: https://massgrave.dev/img/logo_x.png (Twitter) + +[1]: https://github.com/massgravel/Microsoft-Activation-Scripts +[2]: https://dev.azure.com/massgrave/_git/Microsoft-Activation-Scripts +[3]: https://git.activated.win/massgrave/Microsoft-Activation-Scripts +[4]: https://discord.gg/j2yFsV5ZVC +[5]: https://www.reddit.com/r/MAS_Activator +[6]: https://bsky.app/profile/massgrave.dev +[7]: https://twitter.com/massgravel + +--- + +

Made with Love ❤️

From 2e44a4a77bc4564c6ad38fa09ff4e134765c6b31 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 1 Jun 2025 20:30:48 +0530 Subject: [PATCH 021/117] 3.3 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/KMS38_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 | 2 +- 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 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 9c90b53..7a8eaa9 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 @@ @::fh36d7f-random -@set masver=3.2 +@set masver=3.3 @setlocal DisableDelayedExpansion @echo off diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 34fe81d..3f46cb3 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.2 +@set masver=3.3 @echo off diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index c9aa57f..e2190ac 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1,4 +1,4 @@ -@set masver=3.2 +@set masver=3.3 @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 ac11d16..60e7a5c 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.2 +@set masver=3.3 @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 200c69e..27e539a 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.2 +@set masver=3.3 @echo off diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index c80d70e..4c625e9 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.2 +@set masver=3.3 @echo off diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index eed5d70..6cf421e 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.2 +@set masver=3.3 @echo off diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index e93db0c..6020c87 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.2 +@set masver=3.3 @echo off diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 9b43ac2..63a4ad9 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.2 +@set masver=3.3 @echo off diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index d35e046..c10657e 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1,4 +1,4 @@ -@set masver=3.2 +@set masver=3.3 @echo off From 6566bb53c12c9d9c3d892f8eb41340366bdf9d5d Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 1 Jun 2025 20:31:23 +0530 Subject: [PATCH 022/117] export-ignore --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 8749e12..de5bd3d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -# MAS export-ignore -# LICENSE export-ignore -# README.md export-ignore +MAS export-ignore +LICENSE export-ignore +README.md export-ignore .gitattributes export-ignore From 55b6fce50aba2229f8a071aa8de439d8d7f763b0 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 1 Jun 2025 20:46:56 +0530 Subject: [PATCH 023/117] Update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3e776ee..1f55758 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,8 @@ or --- ``` -Latest Version: 3.2 -Release date: 6-May-2025 +Latest Version: 3.3 +Release date: 1-June-2025 ``` ### [Troubleshooting / Help](https://massgrave.dev/troubleshoot) From c89bebdee8880bb4d288f813cf4f4b32c3b80f79 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 1 Jun 2025 21:10:50 +0530 Subject: [PATCH 024/117] Revert export-ignore --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index de5bd3d..8749e12 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -MAS export-ignore -LICENSE export-ignore -README.md export-ignore +# MAS export-ignore +# LICENSE export-ignore +# README.md export-ignore .gitattributes export-ignore From f969378f6b6a958d9f0913c58315bb17cf54e88b Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 3 Jun 2025 13:35:40 +0530 Subject: [PATCH 025/117] Fix a bug in unattended mode in TSforge --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 ++ MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 2 ++ 2 files changed, 4 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 7a8eaa9..ce84109 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -4097,6 +4097,8 @@ if !_el!==1 cls & setlocal & set "_actwin=1" & call :ts_start & endlocal goto :ts_menu ) +goto :ts_start + ::======================================================================================================================================== :ts_changemethod diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 4c625e9..2814b35 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -497,6 +497,8 @@ if !_el!==1 cls & setlocal & set "_actwin=1" & call :ts_start & endlocal goto :ts_menu ) +goto :ts_start + ::======================================================================================================================================== :ts_changemethod From dc90e1ff0fbf3d3a5dc47d3c54afb265a304e689 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 3 Jun 2025 14:55:20 +0530 Subject: [PATCH 026/117] Update info message related to ZCID --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 27 ++++++++++--------- .../Activators/TSforge_Activation.cmd | 27 ++++++++++--------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index ce84109..4a15d57 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -4111,25 +4111,26 @@ echo: echo: echo ______________________________________________________________ echo: -call :dk_color2 %_White% " [1] " %_Green% " Auto" -echo Build 19041 and later: -echo Uses StaticCID, or KMS4k if offline. -echo Older builds: Uses ZeroCID. -echo _______________________________________________ +call :dk_color2 %_White% " [1] " %_Green% "Auto" +echo Builds ^> 19041 -StaticCID (KMS4k if offline) +echo Builds ^< 19041 -ZeroCID +echo ________________________________________________ echo: echo [2] StaticCID -echo Needs Internet. -echo Not for Windows 7 or older. -echo _______________________________________________ +echo Needs Internet +echo Not for Windows 7 or older +echo ________________________________________________ echo: echo [3] ZeroCID -echo Works only on builds below 19041. -echo _______________________________________________ +echo Works reliably on builds below 19041 +echo May break on builds between 19041-26100 +echo Does not work on builds above 26100.4188 +echo ________________________________________________ echo: echo [4] KMS4k -echo This applies only to volume products. -echo Activates for 4000+ years using KMS. -echo _______________________________________________ +echo Volume licenses only +echo Activates for 4000+ years +echo ________________________________________________ echo: echo [5] Learn More echo [0] %_exitmsg% diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 2814b35..3de091f 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -511,25 +511,26 @@ echo: echo: echo ______________________________________________________________ echo: -call :dk_color2 %_White% " [1] " %_Green% " Auto" -echo Build 19041 and later: -echo Uses StaticCID, or KMS4k if offline. -echo Older builds: Uses ZeroCID. -echo _______________________________________________ +call :dk_color2 %_White% " [1] " %_Green% "Auto" +echo Builds ^> 19041 -StaticCID (KMS4k if offline) +echo Builds ^< 19041 -ZeroCID +echo ________________________________________________ echo: echo [2] StaticCID -echo Needs Internet. -echo Not for Windows 7 or older. -echo _______________________________________________ +echo Needs Internet +echo Not for Windows 7 or older +echo ________________________________________________ echo: echo [3] ZeroCID -echo Works only on builds below 19041. -echo _______________________________________________ +echo Works reliably on builds below 19041 +echo May break on builds between 19041-26100 +echo Does not work on builds above 26100.4188 +echo ________________________________________________ echo: echo [4] KMS4k -echo This applies only to volume products. -echo Activates for 4000+ years using KMS. -echo _______________________________________________ +echo Volume licenses only +echo Activates for 4000+ years +echo ________________________________________________ echo: echo [5] Learn More echo [0] %_exitmsg% From 482600c890468cc1f818633ed0787589398a57a7 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 3 Jun 2025 16:44:13 +0530 Subject: [PATCH 027/117] Show info related to expired Office preview products --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 59 +++++++++++++------ .../Activators/Ohook_Activation_AIO.cmd | 17 ++++++ .../Activators/Online_KMS_Activation.cmd | 17 ++++++ .../Activators/TSforge_Activation.cmd | 55 +++++++++++------ 4 files changed, 110 insertions(+), 38 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 4a15d57..f9b8c35 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -2423,6 +2423,7 @@ set error=1 goto :starto16c2r ) +call :oh_expiredpreview 2013 call :oh_fixprids call :oh_process if defined isOspp ( @@ -2480,6 +2481,7 @@ set error=1 goto :startmsi ) +call :oh_expiredpreview 2016 2019 2021 2024 call :oh_fixprids call :oh_process if defined isOspp ( @@ -2739,6 +2741,21 @@ exit /b ::======================================================================================================================================== +:oh_expiredpreview + +for %%# in (%*) do ( +if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" ( +set error=1 +set showfix=1 +call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]" +call :dk_color %Blue% "Please run the Office updates first, and then attempt to activate it again." +) +) + +exit /b + +::======================================================================================================================================== + :oh_ppcpath if not defined isOspp ( @@ -4111,29 +4128,29 @@ echo: echo: echo ______________________________________________________________ echo: -call :dk_color2 %_White% " [1] " %_Green% "Auto" -echo Builds ^> 19041 -StaticCID (KMS4k if offline) -echo Builds ^< 19041 -ZeroCID -echo ________________________________________________ +call :dk_color2 %_White% " [1] " %_Green% "Auto" +echo Builds ^>= 19041 - StaticCID (KMS4k if offline) +echo Builds ^< 19041 - ZeroCID +echo __________________________________________________ echo: -echo [2] StaticCID -echo Needs Internet -echo Not for Windows 7 or older -echo ________________________________________________ +echo [2] StaticCID +echo Needs Internet +echo Not for Windows 7 or older +echo __________________________________________________ echo: -echo [3] ZeroCID -echo Works reliably on builds below 19041 -echo May break on builds between 19041-26100 -echo Does not work on builds above 26100.4188 -echo ________________________________________________ +echo [3] ZeroCID +echo Works reliably on builds below 19041 +echo May break on builds between 19041-26100 +echo Does not work on builds above 26100.4188 +echo __________________________________________________ echo: -echo [4] KMS4k -echo Volume licenses only -echo Activates for 4000+ years -echo ________________________________________________ +echo [4] KMS4k +echo Volume licenses only +echo Activates for 4000+ years +echo __________________________________________________ echo: -echo [5] Learn More -echo [0] %_exitmsg% +echo [5] Learn More +echo [0] %_exitmsg% echo ______________________________________________________________ echo: call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard..." @@ -4980,6 +4997,7 @@ set error=1 goto :ts_starto16c2r ) +call :oh_expiredpreview 2013 if "%_actprojvis%"=="0" call :oh_fixprids call :ts_process @@ -5021,6 +5039,7 @@ set error=1 goto :ts_startmsi ) +call :oh_expiredpreview 2016 2019 2021 2024 if "%_actprojvis%"=="0" call :oh_fixprids call :ts_process @@ -12966,6 +12985,7 @@ set error=1 goto :ks_starto16c2r ) +call :oh_expiredpreview 2013 if "%_actprojvis%"=="0" call :oh_fixprids call :ks_process @@ -13006,6 +13026,7 @@ set error=1 goto :ks_startmsi ) +call :oh_expiredpreview 2016 2019 2021 2024 if "%_actprojvis%"=="0" call :oh_fixprids call :ks_process diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 60e7a5c..0a5ae7c 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -614,6 +614,7 @@ set error=1 goto :starto16c2r ) +call :oh_expiredpreview 2013 call :oh_fixprids call :oh_process if defined isOspp ( @@ -671,6 +672,7 @@ set error=1 goto :startmsi ) +call :oh_expiredpreview 2016 2019 2021 2024 call :oh_fixprids call :oh_process if defined isOspp ( @@ -930,6 +932,21 @@ exit /b ::======================================================================================================================================== +:oh_expiredpreview + +for %%# in (%*) do ( +if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" ( +set error=1 +set showfix=1 +call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]" +call :dk_color %Blue% "Please run the Office updates first, and then attempt to activate it again." +) +) + +exit /b + +::======================================================================================================================================== + :oh_ppcpath if not defined isOspp ( diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 27e539a..670cc67 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -876,6 +876,7 @@ set error=1 goto :ks_starto16c2r ) +call :oh_expiredpreview 2013 if "%_actprojvis%"=="0" call :oh_fixprids call :ks_process @@ -916,6 +917,7 @@ set error=1 goto :ks_startmsi ) +call :oh_expiredpreview 2016 2019 2021 2024 if "%_actprojvis%"=="0" call :oh_fixprids call :ks_process @@ -1096,6 +1098,21 @@ exit /b ::======================================================================================================================================== +:oh_expiredpreview + +for %%# in (%*) do ( +if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" ( +set error=1 +set showfix=1 +call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]" +call :dk_color %Blue% "Please run the Office updates first, and then attempt to activate it again." +) +) + +exit /b + +::======================================================================================================================================== + :: Some Office Retail to Volume converter tools may edit the ProductReleaseIds to add VL products. This code restores it because it may affect features. :oh_fixprids diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 3de091f..e07baeb 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -511,29 +511,29 @@ echo: echo: echo ______________________________________________________________ echo: -call :dk_color2 %_White% " [1] " %_Green% "Auto" -echo Builds ^> 19041 -StaticCID (KMS4k if offline) -echo Builds ^< 19041 -ZeroCID -echo ________________________________________________ +call :dk_color2 %_White% " [1] " %_Green% "Auto" +echo Builds ^>= 19041 - StaticCID (KMS4k if offline) +echo Builds ^< 19041 - ZeroCID +echo __________________________________________________ echo: -echo [2] StaticCID -echo Needs Internet -echo Not for Windows 7 or older -echo ________________________________________________ +echo [2] StaticCID +echo Needs Internet +echo Not for Windows 7 or older +echo __________________________________________________ echo: -echo [3] ZeroCID -echo Works reliably on builds below 19041 -echo May break on builds between 19041-26100 -echo Does not work on builds above 26100.4188 -echo ________________________________________________ +echo [3] ZeroCID +echo Works reliably on builds below 19041 +echo May break on builds between 19041-26100 +echo Does not work on builds above 26100.4188 +echo __________________________________________________ echo: -echo [4] KMS4k -echo Volume licenses only -echo Activates for 4000+ years -echo ________________________________________________ +echo [4] KMS4k +echo Volume licenses only +echo Activates for 4000+ years +echo __________________________________________________ echo: -echo [5] Learn More -echo [0] %_exitmsg% +echo [5] Learn More +echo [0] %_exitmsg% echo ______________________________________________________________ echo: call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard..." @@ -1380,6 +1380,7 @@ set error=1 goto :ts_starto16c2r ) +call :oh_expiredpreview 2013 if "%_actprojvis%"=="0" call :oh_fixprids call :ts_process @@ -1421,6 +1422,7 @@ set error=1 goto :ts_startmsi ) +call :oh_expiredpreview 2016 2019 2021 2024 if "%_actprojvis%"=="0" call :oh_fixprids call :ts_process @@ -2002,6 +2004,21 @@ exit /b ::======================================================================================================================================== +:oh_expiredpreview + +for %%# in (%*) do ( +if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" ( +set error=1 +set showfix=1 +call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]" +call :dk_color %Blue% "Please run the Office updates first, and then attempt to activate it again." +) +) + +exit /b + +::======================================================================================================================================== + :: Some Office Retail to Volume converter tools may edit the ProductReleaseIds to add VL products. This code restores it because it may affect features. :oh_fixprids From faf3bf3a08f875d0f3df2ef8bb089d0ab5c42049 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 3 Jun 2025 17:23:00 +0530 Subject: [PATCH 028/117] Update KMS server list --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 ++-- .../Activators/Online_KMS_Activation.cmd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index f9b8c35..c6d62c4 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -13939,8 +13939,8 @@ set srvlist= set -= set "srvlist=kms.03%-%k.org kms-default.cangs%-%hui.net kms.six%-%yin.com kms.moe%-%club.org kms.cgt%-%soft.com" -set "srvlist=%srvlist% kms.id%-%ina.cn kms.moe%-%yuuko.com xinch%-%eng213618.cn kms.lol%-%i.best kms.my%-%ds.cloud" -set "srvlist=%srvlist% kms.0%-%t.net.cn win.k%-%ms.pub kms.wx%-%lost.com kms.moe%-%yuuko.top kms.gh%-%pym.com" +set "srvlist=%srvlist% kms.id%-%ina.cn kms.moe%-%yuuko.com xinch%-%eng213618.cn kms.lol%-%i.best kms.mc%-%06.net" +set "srvlist=%srvlist% kms.0%-%t.net.cn win.k%-%ms.pub kms.wx%-%lost.com kms.moe%-%yuuko.top kms.gh%-%xi.com" set n=1 for %%a in (%srvlist%) do (set %%a=&set server!n!=%%a&set /a n+=1) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 670cc67..afd489b 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -2154,8 +2154,8 @@ set srvlist= set -= set "srvlist=kms.03%-%k.org kms-default.cangs%-%hui.net kms.six%-%yin.com kms.moe%-%club.org kms.cgt%-%soft.com" -set "srvlist=%srvlist% kms.id%-%ina.cn kms.moe%-%yuuko.com xinch%-%eng213618.cn kms.lol%-%i.best kms.my%-%ds.cloud" -set "srvlist=%srvlist% kms.0%-%t.net.cn win.k%-%ms.pub kms.wx%-%lost.com kms.moe%-%yuuko.top kms.gh%-%pym.com" +set "srvlist=%srvlist% kms.id%-%ina.cn kms.moe%-%yuuko.com xinch%-%eng213618.cn kms.lol%-%i.best kms.mc%-%06.net" +set "srvlist=%srvlist% kms.0%-%t.net.cn win.k%-%ms.pub kms.wx%-%lost.com kms.moe%-%yuuko.top kms.gh%-%xi.com" set n=1 for %%a in (%srvlist%) do (set %%a=&set server!n!=%%a&set /a n+=1) From 67abcd0c8925832fcf4365b9cf3706ab6fbf8571 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 3 Jun 2025 18:25:10 +0530 Subject: [PATCH 029/117] 3.4 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 ++-- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 2 +- .../Activators/Ohook_Activation_AIO.cmd | 2 +- .../Activators/Online_KMS_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 2 +- 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 | 4 ++-- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index c6d62c4..20a5790 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 @@ -@::fh36d7f-random -@set masver=3.3 +@::yfh37fow-random +@set masver=3.4 @setlocal DisableDelayedExpansion @echo off diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 3f46cb3..3224434 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.3 +@set masver=3.4 @echo off diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index e2190ac..3e9e4d5 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1,4 +1,4 @@ -@set masver=3.3 +@set masver=3.4 @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 0a5ae7c..93b5c80 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.3 +@set masver=3.4 @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 afd489b..eb43119 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.3 +@set masver=3.4 @echo off diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index e07baeb..27307cb 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.3 +@set masver=3.4 @echo off diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 6cf421e..f83e68c 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.3 +@set masver=3.4 @echo off diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 6020c87..905b584 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.3 +@set masver=3.4 @echo off diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 63a4ad9..7fa15af 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.3 +@set masver=3.4 @echo off diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index c10657e..aebe72b 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1,4 +1,4 @@ -@set masver=3.3 +@set masver=3.4 @echo off diff --git a/README.md b/README.md index 1f55758..53a01b9 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,8 @@ or --- ``` -Latest Version: 3.3 -Release date: 1-June-2025 +Latest Version: 3.4 +Release date: 3-June-2025 ``` ### [Troubleshooting / Help](https://massgrave.dev/troubleshoot) From ae9f4e34ffa18817ce3b7746094520dec5e2cf34 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 3 Jun 2025 18:31:39 +0530 Subject: [PATCH 030/117] export-ignore --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 8749e12..de5bd3d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -# MAS export-ignore -# LICENSE export-ignore -# README.md export-ignore +MAS export-ignore +LICENSE export-ignore +README.md export-ignore .gitattributes export-ignore From 5ad6226f37e7af75807819d669ff5ae0e3421a87 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 3 Jun 2025 18:37:59 +0530 Subject: [PATCH 031/117] Revert export-ignore --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index de5bd3d..8749e12 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -MAS export-ignore -LICENSE export-ignore -README.md export-ignore +# MAS export-ignore +# LICENSE export-ignore +# README.md export-ignore .gitattributes export-ignore From d7a69943635d8545c7507d1ca30c052aa9b597bf Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 25 Jun 2025 02:34:34 +0530 Subject: [PATCH 032/117] Fix a bug in detecting Terminal app --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 +++- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 4 +++- MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 4 +++- .../Activators/Ohook_Activation_AIO.cmd | 4 +++- .../Activators/Online_KMS_Activation.cmd | 4 +++- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 4 +++- MAS/Separate-Files-Version/Change_Office_Edition.cmd | 4 +++- MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 4 +++- MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 4 +++- MAS/Separate-Files-Version/Troubleshoot.cmd | 4 +++- 10 files changed, 30 insertions(+), 10 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 20a5790..62898a1 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -283,7 +283,9 @@ set terminal= if defined terminal ( set lines=0 -for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A +for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" ( +for %%B in (%%A) do set lines=%%B +) if !lines! GEQ 100 set terminal= ) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 3224434..18ff439 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -305,7 +305,9 @@ set terminal= if defined terminal ( set lines=0 -for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A +for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" ( +for %%B in (%%A) do set lines=%%B +) if !lines! GEQ 100 set terminal= ) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 3e9e4d5..ed3c9e8 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -308,7 +308,9 @@ set terminal= if defined terminal ( set lines=0 -for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A +for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" ( +for %%B in (%%A) do set lines=%%B +) if !lines! GEQ 100 set terminal= ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 93b5c80..9b63d8b 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -313,7 +313,9 @@ set terminal= if defined terminal ( set lines=0 -for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A +for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" ( +for %%B in (%%A) do set lines=%%B +) if !lines! GEQ 100 set terminal= ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index eb43119..b7a0e0f 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -344,7 +344,9 @@ set terminal= if defined terminal ( set lines=0 -for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A +for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" ( +for %%B in (%%A) do set lines=%%B +) if !lines! GEQ 100 set terminal= ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 27307cb..7d42dfd 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -371,7 +371,9 @@ set terminal= if defined terminal ( set lines=0 -for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A +for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" ( +for %%B in (%%A) do set lines=%%B +) if !lines! GEQ 100 set terminal= ) diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index f83e68c..bf55873 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -258,7 +258,9 @@ set terminal= if defined terminal ( set lines=0 -for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A +for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" ( +for %%B in (%%A) do set lines=%%B +) if !lines! GEQ 100 set terminal= ) diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 905b584..19349b7 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -263,7 +263,9 @@ set terminal= if defined terminal ( set lines=0 -for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A +for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" ( +for %%B in (%%A) do set lines=%%B +) if !lines! GEQ 100 set terminal= ) diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 7fa15af..43664f2 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -274,7 +274,9 @@ set terminal= if defined terminal ( set lines=0 -for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A +for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" ( +for %%B in (%%A) do set lines=%%B +) if !lines! GEQ 100 set terminal= ) diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index aebe72b..79d5f36 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -275,7 +275,9 @@ set terminal= if defined terminal ( set lines=0 -for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A +for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" ( +for %%B in (%%A) do set lines=%%B +) if !lines! GEQ 100 set terminal= ) From 409c4f71ad4b069c8b57adc148c7980927e7f75c Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 26 Jun 2025 22:49:57 +0530 Subject: [PATCH 033/117] Evade AV detection --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 70 +++++++++---------- .../Activators/HWID_Activation.cmd | 10 +-- .../Activators/KMS38_Activation.cmd | 14 ++-- .../Activators/Ohook_Activation_AIO.cmd | 14 ++-- .../Activators/Online_KMS_Activation.cmd | 18 ++--- .../Activators/TSforge_Activation.cmd | 32 ++++----- .../Change_Office_Edition.cmd | 8 +-- .../Change_Windows_Edition.cmd | 8 +-- .../Check_Activation_Status.cmd | 3 +- .../Extract_OEM_Folder.cmd | 4 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 10 +-- 11 files changed, 96 insertions(+), 95 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 62898a1..9f77c76 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -215,7 +215,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -574,7 +574,7 @@ set "_dir=!desktop!\$OEM$\$$\Setup\Scripts" md "!_dir!\" :: Add random data on top to create unique file which helps in avoiding AV's detections -%psc% "$f=[io.file]::ReadAllText('!_batp!'); [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\MAS_AIO.cmd', '@::RANDOM-' + [Guid]::NewGuid().Guid + [Environment]::NewLine + $f, [System.Text.Encoding]::ASCII)" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!'); [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\MAS_AIO.cmd', '@::RANDOM-' + [Guid]::NewGuid().Guid + [Environment]::NewLine + $f, [System.Text.Encoding]::ASCII)" ( echo @echo off @@ -797,7 +797,7 @@ set notworking= call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f if defined allapps call :hwiddata key if not defined key ( -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getactivationid\:.*';iex ($f[1])"') do (set altapplist=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getactivationid\:.*';ie%blank%x ($f[1])"') do (set altapplist=%%a) if defined altapplist call :hwiddata key ) @@ -1208,7 +1208,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':winsubstatus\:.*';ie%blank%x ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1655,7 +1655,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1845,7 +1845,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" @@ -2872,7 +2872,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -3384,8 +3384,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% ) exit /b @@ -3721,7 +3721,7 @@ exit /b :oh_extractdll set b= -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[io.file]::ReadAllText('!_batp!') -split ':hexedit\:.*';iex ($m[1])" %nul2% | find /i "Error found" %nul1% && set hasherror=1 +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':hexedit\:.*';ie%blank%x ($m[1])" %nul2% | find /i "Error found" %nul1% && set hasherror=1 exit /b :hexedit: @@ -4288,7 +4288,7 @@ echo Checking Internet Connection [Connected!ping_f!] if /i %_actmethod%==Auto if not %_actman%==1 set tsmethod=KMS4k if /i !tsmethod!==KMS4k ( call :dk_color %Gray% "Checking Internet Connection [Not Connected]" -call :dk_color %Blue% "Switching To KMS4k Activation Method because Internet is needed for StaticCID method." +call :dk_color %Blue% "Switching To KMS4k method because Internet is needed for StaticCID method." ) else ( set error=1 call :dk_color %Red% "Checking Internet Connection [Not Connected]" @@ -4360,7 +4360,7 @@ if defined _vis goto :ts_winvista set tempid= if /i %tsmethod%==KMS4k (set keytype=ks) else (set keytype=zero) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wintsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -4650,7 +4650,7 @@ goto :ts_esu ) set resetstuff=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';ie%blank%x ($f[1])" set resetstuff= if !errorlevel!==3 ( set error=1 @@ -5125,10 +5125,10 @@ if %winbuild% GEQ 10586 ( for %%# in ("%SysPath%\spp\tokens\skus\%tsedition%\*CSVLK*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") else (set "_arr="%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") ) -if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'" %nul% +if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'" %nul% ) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wintsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -5322,7 +5322,7 @@ echo Processing Reset of Rearm / Timers / Tamper / Lock... echo: set resetstuff=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';ie%blank%x ($f[1])" if %errorlevel%==3 ( call :dk_color %Red% "Reset Failed." @@ -5370,7 +5370,7 @@ if %errorlevel%==1 exit /b echo: echo Fetching Supported Activation IDs list. Please wait... -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':listactids\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':listactids\:.*';ie%blank%x ($f[1])" if %errorlevel%==3 ( call :dk_color %Gray% "No supported activation ID found, aborting..." goto :dk_done @@ -5519,7 +5519,7 @@ echo Writing TrustedStore data... if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (echo Depositing Zero Confirmation ID...) ) echo: -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot @@ -5713,7 +5713,7 @@ echo !_License! | find /i "Retail" %nul% && (set keytype=zero) || (set keytype=k set keytype=zero ) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':offtsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':offtsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set _actid=%%a) ) set "_allactid=!tsids!" @@ -12008,7 +12008,7 @@ echo: %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';ie%blank%x ($f[1])" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -12178,7 +12178,7 @@ echo Removing the Added Specific KMS Host [Successful] :: Protect KMS38 if opted by the user and conditions are correct if defined _k38 ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" %nul% reg delete "HKLM\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( echo Protect KMS38 From KMS [Successful] [Locked a Registry Key] @@ -12222,7 +12222,7 @@ title Remove KMS38 Protection %masver% %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';ie%blank%x ($f[1])" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -14001,7 +14001,7 @@ if not defined _int (s%nil%cht%nil%asks /cre%nil%ate /tn "Activation-Run_Once" / if exist "%_temp%\.*" rmdir /s /q "%_temp%\" %nul% call :ks_createInfo.txt -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" ::======================================================================================================================================== @@ -14031,7 +14031,7 @@ exit /b :ks_RenExport -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" exit /b ::======================================================================================================================================== @@ -14785,7 +14785,7 @@ mode 100, 36 %psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=35;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" %nul% ) -%psc% "$f=[IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':sppmgr\:.*';ie%blank%x ($f[1])" goto dk_done :sppmgr: @@ -16682,7 +16682,7 @@ echo Checking SPP permission related issues... call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!]" -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';iex ($f[1])" %nul% +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':fixsppperms\:.*';ie%blank%x ($f[1])" %nul% call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!] [Failed To Fix]" @@ -16752,8 +16752,8 @@ if defined _vis ( echo: echo Reinstalling system licenses... -%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( @@ -17372,7 +17372,7 @@ exit /b :regownstart -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regown\:.*';iex ($f[1]);" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regown\:.*';ie%blank%x ($f[1]);" exit /b :: Below code takes ownership of a volatile registry key and deletes it @@ -17515,7 +17515,7 @@ set _ntarget= set _wtarget= if %winbuild% GEQ 10240 for /f "tokens=4" %%a in ('dism /online /english /Get-TargetEditions ^| findstr /i /c:"Target Edition : "') do (if defined _dtarget (set "_dtarget= !_dtarget! %%a ") else (set "_dtarget= %%a ")) -if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) +if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) if %winbuild% GEQ 10240 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( if %winbuild% GEQ 17063 call :ced_edilist @@ -17721,7 +17721,7 @@ echo: call :ced_prep if defined preperror goto dk_done -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" call :ced_postprep ) %line% @@ -17759,7 +17759,7 @@ call :ced_prep if defined preperror goto dk_done if %_stg%==0 (set stage=) else (set stage=-StageCurrent) -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" call :ced_postprep %line% @@ -18503,7 +18503,7 @@ goto :oe_edition cls call :ch_getinfo call :oe_tempcleanup -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getlist\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getlist\:.*';ie%blank%x ($f[1])" :oe_editionchange @@ -18577,7 +18577,7 @@ cls set suites= echo %list% | find /i "Suites" %nul1% && ( set suites=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getappnames\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getappnames\:.*';ie%blank%x ($f[1])" if not exist %SystemRoot%\Temp\getAppIds.txt ( %eline% echo Failed to generate available apps list. @@ -19058,7 +19058,7 @@ if not defined terminal mode 105, 32 :: Get build number for the target FFN, using build number with OfficeC2RClient.exe command to trigger updates provides accurate results set build= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getbuild\:.*';iex ($f[1])" %nul6%') do (set build=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getbuild\:.*';ie%blank%x ($f[1])" %nul6%') do (set build=%%a) echo "%build%" | find /i "16." %nul% || set build= echo: diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 18ff439..5f0485f 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -237,7 +237,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -507,7 +507,7 @@ set notworking= call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f if defined allapps call :hwiddata key if not defined key ( -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getactivationid\:.*';iex ($f[1])"') do (set altapplist=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getactivationid\:.*';ie%blank%x ($f[1])"') do (set altapplist=%%a) if defined altapplist call :hwiddata key ) @@ -918,7 +918,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':winsubstatus\:.*';ie%blank%x ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1349,7 +1349,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1539,7 +1539,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index ed3c9e8..556c2ce 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -240,7 +240,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -663,7 +663,7 @@ echo: %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';ie%blank%x ($f[1])" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -833,7 +833,7 @@ echo Removing the Added Specific KMS Host [Successful] :: Protect KMS38 if opted by the user and conditions are correct if defined _k38 ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" %nul% reg delete "HKLM\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( echo Protect KMS38 From KMS [Successful] [Locked a Registry Key] @@ -877,7 +877,7 @@ title Remove KMS38 Protection %masver% %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';ie%blank%x ($f[1])" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -1018,7 +1018,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':winsubstatus\:.*';ie%blank%x ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1492,7 +1492,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1682,7 +1682,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 9b63d8b..1445b4b 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -245,7 +245,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -1063,7 +1063,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -1575,8 +1575,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% ) exit /b @@ -2027,7 +2027,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -2217,7 +2217,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" @@ -2892,7 +2892,7 @@ exit /b :oh_extractdll set b= -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[io.file]::ReadAllText('!_batp!') -split ':hexedit\:.*';iex ($m[1])" %nul2% | find /i "Error found" %nul1% && set hasherror=1 +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':hexedit\:.*';ie%blank%x ($m[1])" %nul2% | find /i "Error found" %nul1% && set hasherror=1 exit /b :hexedit: diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index b7a0e0f..6721bd8 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -276,7 +276,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -1348,7 +1348,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -1553,8 +1553,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% ) exit /b @@ -2216,7 +2216,7 @@ if not defined _int (s%nil%cht%nil%asks /cre%nil%ate /tn "Activation-Run_Once" / if exist "%_temp%\.*" rmdir /s /q "%_temp%\" %nul% call :ks_createInfo.txt -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" ::======================================================================================================================================== @@ -2246,7 +2246,7 @@ exit /b :ks_RenExport -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" exit /b ::======================================================================================================================================== @@ -2612,7 +2612,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':winsubstatus\:.*';ie%blank%x ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -3083,7 +3083,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -3273,7 +3273,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 7d42dfd..cb6ee29 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -303,7 +303,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -671,7 +671,7 @@ echo Checking Internet Connection [Connected!ping_f!] if /i %_actmethod%==Auto if not %_actman%==1 set tsmethod=KMS4k if /i !tsmethod!==KMS4k ( call :dk_color %Gray% "Checking Internet Connection [Not Connected]" -call :dk_color %Blue% "Switching To KMS4k Activation Method because Internet is needed for StaticCID method." +call :dk_color %Blue% "Switching To KMS4k method because Internet is needed for StaticCID method." ) else ( set error=1 call :dk_color %Red% "Checking Internet Connection [Not Connected]" @@ -743,7 +743,7 @@ if defined _vis goto :ts_winvista set tempid= if /i %tsmethod%==KMS4k (set keytype=ks) else (set keytype=zero) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wintsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -1033,7 +1033,7 @@ goto :ts_esu ) set resetstuff=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';ie%blank%x ($f[1])" set resetstuff= if !errorlevel!==3 ( set error=1 @@ -1508,10 +1508,10 @@ if %winbuild% GEQ 10586 ( for %%# in ("%SysPath%\spp\tokens\skus\%tsedition%\*CSVLK*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") else (set "_arr="%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") ) -if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'" %nul% +if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'" %nul% ) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wintsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -1705,7 +1705,7 @@ echo Processing Reset of Rearm / Timers / Tamper / Lock... echo: set resetstuff=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';ie%blank%x ($f[1])" if %errorlevel%==3 ( call :dk_color %Red% "Reset Failed." @@ -1753,7 +1753,7 @@ if %errorlevel%==1 exit /b echo: echo Fetching Supported Activation IDs list. Please wait... -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':listactids\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':listactids\:.*';ie%blank%x ($f[1])" if %errorlevel%==3 ( call :dk_color %Gray% "No supported activation ID found, aborting..." goto :dk_done @@ -1902,7 +1902,7 @@ echo Writing TrustedStore data... if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (echo Depositing Zero Confirmation ID...) ) echo: -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot @@ -2171,7 +2171,7 @@ echo !_License! | find /i "Retail" %nul% && (set keytype=zero) || (set keytype=k set keytype=zero ) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':offtsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':offtsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set _actid=%%a) ) set "_allactid=!tsids!" @@ -2292,7 +2292,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -2497,8 +2497,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% ) exit /b @@ -2653,7 +2653,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':winsubstatus\:.*';ie%blank%x ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -3081,7 +3081,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -3271,7 +3271,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index bf55873..2697092 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -190,7 +190,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -547,7 +547,7 @@ goto :oe_edition cls call :ch_getinfo call :oe_tempcleanup -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getlist\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getlist\:.*';ie%blank%x ($f[1])" :oe_editionchange @@ -621,7 +621,7 @@ cls set suites= echo %list% | find /i "Suites" %nul1% && ( set suites=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getappnames\:.*';iex ($f[1])" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getappnames\:.*';ie%blank%x ($f[1])" if not exist %SystemRoot%\Temp\getAppIds.txt ( %eline% echo Failed to generate available apps list. @@ -1102,7 +1102,7 @@ if not defined terminal mode 105, 32 :: Get build number for the target FFN, using build number with OfficeC2RClient.exe command to trigger updates provides accurate results set build= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getbuild\:.*';iex ($f[1])" %nul6%') do (set build=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getbuild\:.*';ie%blank%x ($f[1])" %nul6%') do (set build=%%a) echo "%build%" | find /i "16." %nul% || set build= echo: diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 19349b7..1193f98 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -195,7 +195,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -447,7 +447,7 @@ set _ntarget= set _wtarget= if %winbuild% GEQ 10240 for /f "tokens=4" %%a in ('dism /online /english /Get-TargetEditions ^| findstr /i /c:"Target Edition : "') do (if defined _dtarget (set "_dtarget= !_dtarget! %%a ") else (set "_dtarget= %%a ")) -if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) +if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) if %winbuild% GEQ 10240 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( if %winbuild% GEQ 17063 call :ced_edilist @@ -653,7 +653,7 @@ echo: call :ced_prep if defined preperror goto dk_done -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" call :ced_postprep ) %line% @@ -691,7 +691,7 @@ call :ced_prep if defined preperror goto dk_done if %_stg%==0 (set stage=) else (set stage=-StageCurrent) -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" call :ced_postprep %line% diff --git a/MAS/Separate-Files-Version/Check_Activation_Status.cmd b/MAS/Separate-Files-Version/Check_Activation_Status.cmd index 728b1a0..40df69a 100644 --- a/MAS/Separate-Files-Version/Check_Activation_Status.cmd +++ b/MAS/Separate-Files-Version/Check_Activation_Status.cmd @@ -23,6 +23,7 @@ set "Path=%SystemRoot%\Sysnative;%SystemRoot%;%SystemRoot%\Sysnative\Wbem;%Syste set "ComSpec=%SysPath%\cmd.exe" set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowerShell\v1.0\Modules" +set "blank=" set "ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe" set "_psc=%ps% -nop -c" set "_err===== ERROR ====" @@ -39,7 +40,7 @@ goto :E_Exit set "_batf=%~f0" set "_batp=%_batf:'=''%" setlocal EnableDelayedExpansion -%_psc% "$f=[IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';iex ($f[1])" +%_psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':sppmgr\:.*';ie%blank%x ($f[1])" :E_Exit echo. diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 43664f2..fd0ddc2 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -206,7 +206,7 @@ goto done2 ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -818,7 +818,7 @@ exit /b :export -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\SetupComplete.cmd',$f[1].Trim(),[System.Text.Encoding]::ASCII);" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit \":%~1\:.*`r`n\"; [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\SetupComplete.cmd',$f[1].Trim(),[System.Text.Encoding]::ASCII);" exit /b ::======================================================================================================================================== diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 79d5f36..b4c593c 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -207,7 +207,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -718,7 +718,7 @@ echo Checking SPP permission related issues... call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!]" -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';iex ($f[1])" %nul% +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':fixsppperms\:.*';ie%blank%x ($f[1])" %nul% call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!] [Failed To Fix]" @@ -788,8 +788,8 @@ if defined _vis ( echo: echo Reinstalling system licenses... -%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( @@ -1435,7 +1435,7 @@ exit /b :regownstart -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regown\:.*';iex ($f[1]);" +%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regown\:.*';ie%blank%x ($f[1]);" exit /b :: Below code takes ownership of a volatile registry key and deletes it From 5aa7d4f3de71439c2d6e7432fb0e0c209a87f087 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 2 Jul 2025 23:12:04 +0530 Subject: [PATCH 034/117] Revert "Evade AV detection" This reverts commit 409c4f71ad4b069c8b57adc148c7980927e7f75c. --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 70 +++++++++---------- .../Activators/HWID_Activation.cmd | 10 +-- .../Activators/KMS38_Activation.cmd | 14 ++-- .../Activators/Ohook_Activation_AIO.cmd | 14 ++-- .../Activators/Online_KMS_Activation.cmd | 18 ++--- .../Activators/TSforge_Activation.cmd | 32 ++++----- .../Change_Office_Edition.cmd | 8 +-- .../Change_Windows_Edition.cmd | 8 +-- .../Check_Activation_Status.cmd | 3 +- .../Extract_OEM_Folder.cmd | 4 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 10 +-- 11 files changed, 95 insertions(+), 96 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 9f77c76..62898a1 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -215,7 +215,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -574,7 +574,7 @@ set "_dir=!desktop!\$OEM$\$$\Setup\Scripts" md "!_dir!\" :: Add random data on top to create unique file which helps in avoiding AV's detections -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!'); [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\MAS_AIO.cmd', '@::RANDOM-' + [Guid]::NewGuid().Guid + [Environment]::NewLine + $f, [System.Text.Encoding]::ASCII)" +%psc% "$f=[io.file]::ReadAllText('!_batp!'); [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\MAS_AIO.cmd', '@::RANDOM-' + [Guid]::NewGuid().Guid + [Environment]::NewLine + $f, [System.Text.Encoding]::ASCII)" ( echo @echo off @@ -797,7 +797,7 @@ set notworking= call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f if defined allapps call :hwiddata key if not defined key ( -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getactivationid\:.*';ie%blank%x ($f[1])"') do (set altapplist=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getactivationid\:.*';iex ($f[1])"') do (set altapplist=%%a) if defined altapplist call :hwiddata key ) @@ -1208,7 +1208,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':winsubstatus\:.*';ie%blank%x ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1655,7 +1655,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1845,7 +1845,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" @@ -2872,7 +2872,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -3384,8 +3384,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% ) exit /b @@ -3721,7 +3721,7 @@ exit /b :oh_extractdll set b= -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':hexedit\:.*';ie%blank%x ($m[1])" %nul2% | find /i "Error found" %nul1% && set hasherror=1 +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[io.file]::ReadAllText('!_batp!') -split ':hexedit\:.*';iex ($m[1])" %nul2% | find /i "Error found" %nul1% && set hasherror=1 exit /b :hexedit: @@ -4288,7 +4288,7 @@ echo Checking Internet Connection [Connected!ping_f!] if /i %_actmethod%==Auto if not %_actman%==1 set tsmethod=KMS4k if /i !tsmethod!==KMS4k ( call :dk_color %Gray% "Checking Internet Connection [Not Connected]" -call :dk_color %Blue% "Switching To KMS4k method because Internet is needed for StaticCID method." +call :dk_color %Blue% "Switching To KMS4k Activation Method because Internet is needed for StaticCID method." ) else ( set error=1 call :dk_color %Red% "Checking Internet Connection [Not Connected]" @@ -4360,7 +4360,7 @@ if defined _vis goto :ts_winvista set tempid= if /i %tsmethod%==KMS4k (set keytype=ks) else (set keytype=zero) -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wintsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -4650,7 +4650,7 @@ goto :ts_esu ) set resetstuff=1 -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" set resetstuff= if !errorlevel!==3 ( set error=1 @@ -5125,10 +5125,10 @@ if %winbuild% GEQ 10586 ( for %%# in ("%SysPath%\spp\tokens\skus\%tsedition%\*CSVLK*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") else (set "_arr="%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") ) -if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'" %nul% +if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'" %nul% ) -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wintsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -5322,7 +5322,7 @@ echo Processing Reset of Rearm / Timers / Tamper / Lock... echo: set resetstuff=1 -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" if %errorlevel%==3 ( call :dk_color %Red% "Reset Failed." @@ -5370,7 +5370,7 @@ if %errorlevel%==1 exit /b echo: echo Fetching Supported Activation IDs list. Please wait... -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':listactids\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':listactids\:.*';iex ($f[1])" if %errorlevel%==3 ( call :dk_color %Gray% "No supported activation ID found, aborting..." goto :dk_done @@ -5519,7 +5519,7 @@ echo Writing TrustedStore data... if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (echo Depositing Zero Confirmation ID...) ) echo: -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot @@ -5713,7 +5713,7 @@ echo !_License! | find /i "Retail" %nul% && (set keytype=zero) || (set keytype=k set keytype=zero ) -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':offtsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':offtsid\:.*';iex ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set _actid=%%a) ) set "_allactid=!tsids!" @@ -12008,7 +12008,7 @@ echo: %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -12178,7 +12178,7 @@ echo Removing the Added Specific KMS Host [Successful] :: Protect KMS38 if opted by the user and conditions are correct if defined _k38 ( -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" %nul% reg delete "HKLM\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( echo Protect KMS38 From KMS [Successful] [Locked a Registry Key] @@ -12222,7 +12222,7 @@ title Remove KMS38 Protection %masver% %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -14001,7 +14001,7 @@ if not defined _int (s%nil%cht%nil%asks /cre%nil%ate /tn "Activation-Run_Once" / if exist "%_temp%\.*" rmdir /s /q "%_temp%\" %nul% call :ks_createInfo.txt -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" ::======================================================================================================================================== @@ -14031,7 +14031,7 @@ exit /b :ks_RenExport -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" exit /b ::======================================================================================================================================== @@ -14785,7 +14785,7 @@ mode 100, 36 %psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=35;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" %nul% ) -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':sppmgr\:.*';ie%blank%x ($f[1])" +%psc% "$f=[IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';iex ($f[1])" goto dk_done :sppmgr: @@ -16682,7 +16682,7 @@ echo Checking SPP permission related issues... call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!]" -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':fixsppperms\:.*';ie%blank%x ($f[1])" %nul% +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';iex ($f[1])" %nul% call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!] [Failed To Fix]" @@ -16752,8 +16752,8 @@ if defined _vis ( echo: echo Reinstalling system licenses... -%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% -if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( @@ -17372,7 +17372,7 @@ exit /b :regownstart -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regown\:.*';ie%blank%x ($f[1]);" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regown\:.*';iex ($f[1]);" exit /b :: Below code takes ownership of a volatile registry key and deletes it @@ -17515,7 +17515,7 @@ set _ntarget= set _wtarget= if %winbuild% GEQ 10240 for /f "tokens=4" %%a in ('dism /online /english /Get-TargetEditions ^| findstr /i /c:"Target Edition : "') do (if defined _dtarget (set "_dtarget= !_dtarget! %%a ") else (set "_dtarget= %%a ")) -if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) +if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) if %winbuild% GEQ 10240 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( if %winbuild% GEQ 17063 call :ced_edilist @@ -17721,7 +17721,7 @@ echo: call :ced_prep if defined preperror goto dk_done -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" call :ced_postprep ) %line% @@ -17759,7 +17759,7 @@ call :ced_prep if defined preperror goto dk_done if %_stg%==0 (set stage=) else (set stage=-StageCurrent) -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" call :ced_postprep %line% @@ -18503,7 +18503,7 @@ goto :oe_edition cls call :ch_getinfo call :oe_tempcleanup -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getlist\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getlist\:.*';iex ($f[1])" :oe_editionchange @@ -18577,7 +18577,7 @@ cls set suites= echo %list% | find /i "Suites" %nul1% && ( set suites=1 -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getappnames\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getappnames\:.*';iex ($f[1])" if not exist %SystemRoot%\Temp\getAppIds.txt ( %eline% echo Failed to generate available apps list. @@ -19058,7 +19058,7 @@ if not defined terminal mode 105, 32 :: Get build number for the target FFN, using build number with OfficeC2RClient.exe command to trigger updates provides accurate results set build= -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getbuild\:.*';ie%blank%x ($f[1])" %nul6%') do (set build=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getbuild\:.*';iex ($f[1])" %nul6%') do (set build=%%a) echo "%build%" | find /i "16." %nul% || set build= echo: diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 5f0485f..18ff439 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -237,7 +237,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -507,7 +507,7 @@ set notworking= call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f if defined allapps call :hwiddata key if not defined key ( -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getactivationid\:.*';ie%blank%x ($f[1])"') do (set altapplist=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getactivationid\:.*';iex ($f[1])"') do (set altapplist=%%a) if defined altapplist call :hwiddata key ) @@ -918,7 +918,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':winsubstatus\:.*';ie%blank%x ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1349,7 +1349,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1539,7 +1539,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 556c2ce..ed3c9e8 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -240,7 +240,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -663,7 +663,7 @@ echo: %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -833,7 +833,7 @@ echo Removing the Added Specific KMS Host [Successful] :: Protect KMS38 if opted by the user and conditions are correct if defined _k38 ( -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" %nul% reg delete "HKLM\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( echo Protect KMS38 From KMS [Successful] [Locked a Registry Key] @@ -877,7 +877,7 @@ title Remove KMS38 Protection %masver% %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regdel\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -1018,7 +1018,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':winsubstatus\:.*';ie%blank%x ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1492,7 +1492,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1682,7 +1682,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 1445b4b..9b63d8b 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -245,7 +245,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -1063,7 +1063,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -1575,8 +1575,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% ) exit /b @@ -2027,7 +2027,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -2217,7 +2217,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" @@ -2892,7 +2892,7 @@ exit /b :oh_extractdll set b= -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':hexedit\:.*';ie%blank%x ($m[1])" %nul2% | find /i "Error found" %nul1% && set hasherror=1 +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[io.file]::ReadAllText('!_batp!') -split ':hexedit\:.*';iex ($m[1])" %nul2% | find /i "Error found" %nul1% && set hasherror=1 exit /b :hexedit: diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 6721bd8..b7a0e0f 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -276,7 +276,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -1348,7 +1348,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -1553,8 +1553,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% ) exit /b @@ -2216,7 +2216,7 @@ if not defined _int (s%nil%cht%nil%asks /cre%nil%ate /tn "Activation-Run_Once" / if exist "%_temp%\.*" rmdir /s /q "%_temp%\" %nul% call :ks_createInfo.txt -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" ::======================================================================================================================================== @@ -2246,7 +2246,7 @@ exit /b :ks_RenExport -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" exit /b ::======================================================================================================================================== @@ -2612,7 +2612,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':winsubstatus\:.*';ie%blank%x ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -3083,7 +3083,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -3273,7 +3273,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index cb6ee29..7d42dfd 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -303,7 +303,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -671,7 +671,7 @@ echo Checking Internet Connection [Connected!ping_f!] if /i %_actmethod%==Auto if not %_actman%==1 set tsmethod=KMS4k if /i !tsmethod!==KMS4k ( call :dk_color %Gray% "Checking Internet Connection [Not Connected]" -call :dk_color %Blue% "Switching To KMS4k method because Internet is needed for StaticCID method." +call :dk_color %Blue% "Switching To KMS4k Activation Method because Internet is needed for StaticCID method." ) else ( set error=1 call :dk_color %Red% "Checking Internet Connection [Not Connected]" @@ -743,7 +743,7 @@ if defined _vis goto :ts_winvista set tempid= if /i %tsmethod%==KMS4k (set keytype=ks) else (set keytype=zero) -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wintsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -1033,7 +1033,7 @@ goto :ts_esu ) set resetstuff=1 -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" set resetstuff= if !errorlevel!==3 ( set error=1 @@ -1508,10 +1508,10 @@ if %winbuild% GEQ 10586 ( for %%# in ("%SysPath%\spp\tokens\skus\%tsedition%\*CSVLK*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") else (set "_arr="%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") ) -if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'" %nul% +if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'" %nul% ) -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wintsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -1705,7 +1705,7 @@ echo Processing Reset of Rearm / Timers / Tamper / Lock... echo: set resetstuff=1 -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" if %errorlevel%==3 ( call :dk_color %Red% "Reset Failed." @@ -1753,7 +1753,7 @@ if %errorlevel%==1 exit /b echo: echo Fetching Supported Activation IDs list. Please wait... -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':listactids\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':listactids\:.*';iex ($f[1])" if %errorlevel%==3 ( call :dk_color %Gray% "No supported activation ID found, aborting..." goto :dk_done @@ -1902,7 +1902,7 @@ echo Writing TrustedStore data... if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (echo Depositing Zero Confirmation ID...) ) echo: -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot @@ -2171,7 +2171,7 @@ echo !_License! | find /i "Retail" %nul% && (set keytype=zero) || (set keytype=k set keytype=zero ) -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':offtsid\:.*';ie%blank%x ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':offtsid\:.*';iex ($f[1])" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set _actid=%%a) ) set "_allactid=!tsids!" @@ -2292,7 +2292,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -2497,8 +2497,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% ) exit /b @@ -2653,7 +2653,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':winsubstatus\:.*';ie%blank%x ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -3081,7 +3081,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -3271,7 +3271,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 2697092..bf55873 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -190,7 +190,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -547,7 +547,7 @@ goto :oe_edition cls call :ch_getinfo call :oe_tempcleanup -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getlist\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getlist\:.*';iex ($f[1])" :oe_editionchange @@ -621,7 +621,7 @@ cls set suites= echo %list% | find /i "Suites" %nul1% && ( set suites=1 -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getappnames\:.*';ie%blank%x ($f[1])" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getappnames\:.*';iex ($f[1])" if not exist %SystemRoot%\Temp\getAppIds.txt ( %eline% echo Failed to generate available apps list. @@ -1102,7 +1102,7 @@ if not defined terminal mode 105, 32 :: Get build number for the target FFN, using build number with OfficeC2RClient.exe command to trigger updates provides accurate results set build= -for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':getbuild\:.*';ie%blank%x ($f[1])" %nul6%') do (set build=%%a) +for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getbuild\:.*';iex ($f[1])" %nul6%') do (set build=%%a) echo "%build%" | find /i "16." %nul% || set build= echo: diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 1193f98..19349b7 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -195,7 +195,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -447,7 +447,7 @@ set _ntarget= set _wtarget= if %winbuild% GEQ 10240 for /f "tokens=4" %%a in ('dism /online /english /Get-TargetEditions ^| findstr /i /c:"Target Edition : "') do (if defined _dtarget (set "_dtarget= !_dtarget! %%a ") else (set "_dtarget= %%a ")) -if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) +if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) if %winbuild% GEQ 10240 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( if %winbuild% GEQ 17063 call :ced_edilist @@ -653,7 +653,7 @@ echo: call :ced_prep if defined preperror goto dk_done -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" call :ced_postprep ) %line% @@ -691,7 +691,7 @@ call :ced_prep if defined preperror goto dk_done if %_stg%==0 (set stage=) else (set stage=-StageCurrent) -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" call :ced_postprep %line% diff --git a/MAS/Separate-Files-Version/Check_Activation_Status.cmd b/MAS/Separate-Files-Version/Check_Activation_Status.cmd index 40df69a..728b1a0 100644 --- a/MAS/Separate-Files-Version/Check_Activation_Status.cmd +++ b/MAS/Separate-Files-Version/Check_Activation_Status.cmd @@ -23,7 +23,6 @@ set "Path=%SystemRoot%\Sysnative;%SystemRoot%;%SystemRoot%\Sysnative\Wbem;%Syste set "ComSpec=%SysPath%\cmd.exe" set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowerShell\v1.0\Modules" -set "blank=" set "ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe" set "_psc=%ps% -nop -c" set "_err===== ERROR ====" @@ -40,7 +39,7 @@ goto :E_Exit set "_batf=%~f0" set "_batp=%_batf:'=''%" setlocal EnableDelayedExpansion -%_psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':sppmgr\:.*';ie%blank%x ($f[1])" +%_psc% "$f=[IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';iex ($f[1])" :E_Exit echo. diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index fd0ddc2..43664f2 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -206,7 +206,7 @@ goto done2 ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -818,7 +818,7 @@ exit /b :export -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit \":%~1\:.*`r`n\"; [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\SetupComplete.cmd',$f[1].Trim(),[System.Text.Encoding]::ASCII);" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\SetupComplete.cmd',$f[1].Trim(),[System.Text.Encoding]::ASCII);" exit /b ::======================================================================================================================================== diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index b4c593c..79d5f36 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -207,7 +207,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -718,7 +718,7 @@ echo Checking SPP permission related issues... call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!]" -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':fixsppperms\:.*';ie%blank%x ($f[1])" %nul% +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';iex ($f[1])" %nul% call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!] [Failed To Fix]" @@ -788,8 +788,8 @@ if defined _vis ( echo: echo Reinstalling system licenses... -%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% -if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul% +%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( @@ -1435,7 +1435,7 @@ exit /b :regownstart -%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':regown\:.*';ie%blank%x ($f[1]);" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regown\:.*';iex ($f[1]);" exit /b :: Below code takes ownership of a volatile registry key and deletes it From ef411e14ca2e46177decfe3c2b01db7f535b01ba Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 2 Jul 2025 23:35:17 +0530 Subject: [PATCH 035/117] Evade AV detection --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 68 +++++++++---------- .../Activators/HWID_Activation.cmd | 10 +-- .../Activators/KMS38_Activation.cmd | 14 ++-- .../Activators/Ohook_Activation_AIO.cmd | 14 ++-- .../Activators/Online_KMS_Activation.cmd | 18 ++--- .../Activators/TSforge_Activation.cmd | 30 ++++---- .../Change_Office_Edition.cmd | 8 +-- .../Change_Windows_Edition.cmd | 8 +-- .../Check_Activation_Status.cmd | 2 +- .../Extract_OEM_Folder.cmd | 4 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 10 +-- 11 files changed, 93 insertions(+), 93 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 62898a1..a7c96e2 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -215,7 +215,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -574,7 +574,7 @@ set "_dir=!desktop!\$OEM$\$$\Setup\Scripts" md "!_dir!\" :: Add random data on top to create unique file which helps in avoiding AV's detections -%psc% "$f=[io.file]::ReadAllText('!_batp!'); [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\MAS_AIO.cmd', '@::RANDOM-' + [Guid]::NewGuid().Guid + [Environment]::NewLine + $f, [System.Text.Encoding]::ASCII)" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!'); [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\MAS_AIO.cmd', '@::RANDOM-' + [Guid]::NewGuid().Guid + [Environment]::NewLine + $f, [System.Text.Encoding]::ASCII)" ( echo @echo off @@ -797,7 +797,7 @@ set notworking= call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f if defined allapps call :hwiddata key if not defined key ( -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getactivationid\:.*';iex ($f[1])"') do (set altapplist=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getactivationid\:.*';& ([scriptblock]::Create($f[1]))"') do (set altapplist=%%a) if defined altapplist call :hwiddata key ) @@ -1208,7 +1208,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';& ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1655,7 +1655,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1845,7 +1845,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" @@ -2872,7 +2872,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -3384,8 +3384,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% ) exit /b @@ -3721,7 +3721,7 @@ exit /b :oh_extractdll set b= -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[io.file]::ReadAllText('!_batp!') -split ':hexedit\:.*';iex ($m[1])" %nul2% | find /i "Error found" %nul1% && set hasherror=1 +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[System.IO.File]::ReadAllText('!_batp!') -split ':hexedit\:.*';& ([scriptblock]::Create($m[1]))" %nul2% | find /i "Error found" %nul1% && set hasherror=1 exit /b :hexedit: @@ -4360,7 +4360,7 @@ if defined _vis goto :ts_winvista set tempid= if /i %tsmethod%==KMS4k (set keytype=ks) else (set keytype=zero) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -4650,7 +4650,7 @@ goto :ts_esu ) set resetstuff=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([scriptblock]::Create($f[1]))" set resetstuff= if !errorlevel!==3 ( set error=1 @@ -5125,10 +5125,10 @@ if %winbuild% GEQ 10586 ( for %%# in ("%SysPath%\spp\tokens\skus\%tsedition%\*CSVLK*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") else (set "_arr="%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") ) -if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'" %nul% +if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'" %nul% ) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -5322,7 +5322,7 @@ echo Processing Reset of Rearm / Timers / Tamper / Lock... echo: set resetstuff=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([scriptblock]::Create($f[1]))" if %errorlevel%==3 ( call :dk_color %Red% "Reset Failed." @@ -5370,7 +5370,7 @@ if %errorlevel%==1 exit /b echo: echo Fetching Supported Activation IDs list. Please wait... -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':listactids\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':listactids\:.*';& ([scriptblock]::Create($f[1]))" if %errorlevel%==3 ( call :dk_color %Gray% "No supported activation ID found, aborting..." goto :dk_done @@ -5519,7 +5519,7 @@ echo Writing TrustedStore data... if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (echo Depositing Zero Confirmation ID...) ) echo: -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot @@ -5713,7 +5713,7 @@ echo !_License! | find /i "Retail" %nul% && (set keytype=zero) || (set keytype=k set keytype=zero ) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':offtsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':offtsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set _actid=%%a) ) set "_allactid=!tsids!" @@ -12008,7 +12008,7 @@ echo: %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -12178,7 +12178,7 @@ echo Removing the Added Specific KMS Host [Successful] :: Protect KMS38 if opted by the user and conditions are correct if defined _k38 ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" %nul% reg delete "HKLM\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( echo Protect KMS38 From KMS [Successful] [Locked a Registry Key] @@ -12222,7 +12222,7 @@ title Remove KMS38 Protection %masver% %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -14001,7 +14001,7 @@ if not defined _int (s%nil%cht%nil%asks /cre%nil%ate /tn "Activation-Run_Once" / if exist "%_temp%\.*" rmdir /s /q "%_temp%\" %nul% call :ks_createInfo.txt -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" ::======================================================================================================================================== @@ -14031,7 +14031,7 @@ exit /b :ks_RenExport -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" exit /b ::======================================================================================================================================== @@ -14785,7 +14785,7 @@ mode 100, 36 %psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=35;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" %nul% ) -%psc% "$f=[IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';& ([scriptblock]::Create($f[1]))" goto dk_done :sppmgr: @@ -16682,7 +16682,7 @@ echo Checking SPP permission related issues... call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!]" -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';iex ($f[1])" %nul% +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';& ([scriptblock]::Create($f[1]))" %nul% call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!] [Failed To Fix]" @@ -16752,8 +16752,8 @@ if defined _vis ( echo: echo Reinstalling system licenses... -%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( @@ -17372,7 +17372,7 @@ exit /b :regownstart -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regown\:.*';iex ($f[1]);" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regown\:.*';& ([scriptblock]::Create($f[1]));" exit /b :: Below code takes ownership of a volatile registry key and deletes it @@ -17515,7 +17515,7 @@ set _ntarget= set _wtarget= if %winbuild% GEQ 10240 for /f "tokens=4" %%a in ('dism /online /english /Get-TargetEditions ^| findstr /i /c:"Target Edition : "') do (if defined _dtarget (set "_dtarget= !_dtarget! %%a ") else (set "_dtarget= %%a ")) -if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) +if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) if %winbuild% GEQ 10240 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( if %winbuild% GEQ 17063 call :ced_edilist @@ -17721,7 +17721,7 @@ echo: call :ced_prep if defined preperror goto dk_done -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" call :ced_postprep ) %line% @@ -17759,7 +17759,7 @@ call :ced_prep if defined preperror goto dk_done if %_stg%==0 (set stage=) else (set stage=-StageCurrent) -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" call :ced_postprep %line% @@ -18503,7 +18503,7 @@ goto :oe_edition cls call :ch_getinfo call :oe_tempcleanup -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getlist\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getlist\:.*';& ([scriptblock]::Create($f[1]))" :oe_editionchange @@ -18577,7 +18577,7 @@ cls set suites= echo %list% | find /i "Suites" %nul1% && ( set suites=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getappnames\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getappnames\:.*';& ([scriptblock]::Create($f[1]))" if not exist %SystemRoot%\Temp\getAppIds.txt ( %eline% echo Failed to generate available apps list. @@ -19058,7 +19058,7 @@ if not defined terminal mode 105, 32 :: Get build number for the target FFN, using build number with OfficeC2RClient.exe command to trigger updates provides accurate results set build= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getbuild\:.*';iex ($f[1])" %nul6%') do (set build=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getbuild\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set build=%%a) echo "%build%" | find /i "16." %nul% || set build= echo: diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 18ff439..865dd2f 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -237,7 +237,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -507,7 +507,7 @@ set notworking= call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f if defined allapps call :hwiddata key if not defined key ( -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getactivationid\:.*';iex ($f[1])"') do (set altapplist=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getactivationid\:.*';& ([scriptblock]::Create($f[1]))"') do (set altapplist=%%a) if defined altapplist call :hwiddata key ) @@ -918,7 +918,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';& ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1349,7 +1349,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1539,7 +1539,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index ed3c9e8..134b388 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -240,7 +240,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -663,7 +663,7 @@ echo: %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -833,7 +833,7 @@ echo Removing the Added Specific KMS Host [Successful] :: Protect KMS38 if opted by the user and conditions are correct if defined _k38 ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" %nul% reg delete "HKLM\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( echo Protect KMS38 From KMS [Successful] [Locked a Registry Key] @@ -877,7 +877,7 @@ title Remove KMS38 Protection %masver% %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" %nul% reg delete "HKLM\%specific_kms%" /f ) @@ -1018,7 +1018,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';& ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1492,7 +1492,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1682,7 +1682,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 9b63d8b..0142756 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -245,7 +245,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -1063,7 +1063,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -1575,8 +1575,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% ) exit /b @@ -2027,7 +2027,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -2217,7 +2217,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" @@ -2892,7 +2892,7 @@ exit /b :oh_extractdll set b= -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[io.file]::ReadAllText('!_batp!') -split ':hexedit\:.*';iex ($m[1])" %nul2% | find /i "Error found" %nul1% && set hasherror=1 +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[System.IO.File]::ReadAllText('!_batp!') -split ':hexedit\:.*';& ([scriptblock]::Create($m[1]))" %nul2% | find /i "Error found" %nul1% && set hasherror=1 exit /b :hexedit: diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index b7a0e0f..773115e 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -276,7 +276,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -1348,7 +1348,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -1553,8 +1553,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% ) exit /b @@ -2216,7 +2216,7 @@ if not defined _int (s%nil%cht%nil%asks /cre%nil%ate /tn "Activation-Run_Once" / if exist "%_temp%\.*" rmdir /s /q "%_temp%\" %nul% call :ks_createInfo.txt -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@::%randguid%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII)" ::======================================================================================================================================== @@ -2246,7 +2246,7 @@ exit /b :ks_RenExport -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('%~2',$f[1].Trim(),[System.Text.Encoding]::%~3);" exit /b ::======================================================================================================================================== @@ -2612,7 +2612,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';& ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -3083,7 +3083,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -3273,7 +3273,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 7d42dfd..35ae26f 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -303,7 +303,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -743,7 +743,7 @@ if defined _vis goto :ts_winvista set tempid= if /i %tsmethod%==KMS4k (set keytype=ks) else (set keytype=zero) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -1033,7 +1033,7 @@ goto :ts_esu ) set resetstuff=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([scriptblock]::Create($f[1]))" set resetstuff= if !errorlevel!==3 ( set error=1 @@ -1508,10 +1508,10 @@ if %winbuild% GEQ 10586 ( for %%# in ("%SysPath%\spp\tokens\skus\%tsedition%\*CSVLK*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") else (set "_arr="%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") ) -if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'" %nul% +if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'" %nul% ) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -1705,7 +1705,7 @@ echo Processing Reset of Rearm / Timers / Tamper / Lock... echo: set resetstuff=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([scriptblock]::Create($f[1]))" if %errorlevel%==3 ( call :dk_color %Red% "Reset Failed." @@ -1753,7 +1753,7 @@ if %errorlevel%==1 exit /b echo: echo Fetching Supported Activation IDs list. Please wait... -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':listactids\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':listactids\:.*';& ([scriptblock]::Create($f[1]))" if %errorlevel%==3 ( call :dk_color %Gray% "No supported activation ID found, aborting..." goto :dk_done @@ -1902,7 +1902,7 @@ echo Writing TrustedStore data... if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (echo Depositing Zero Confirmation ID...) ) echo: -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot @@ -2171,7 +2171,7 @@ echo !_License! | find /i "Retail" %nul% && (set keytype=zero) || (set keytype=k set keytype=zero ) -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':offtsid\:.*';iex ($f[1])" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':offtsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set _actid=%%a) ) set "_allactid=!tsids!" @@ -2292,7 +2292,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -2497,8 +2497,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% ) exit /b @@ -2653,7 +2653,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';& ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -3081,7 +3081,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -3271,7 +3271,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index bf55873..10a6b2f 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -190,7 +190,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -547,7 +547,7 @@ goto :oe_edition cls call :ch_getinfo call :oe_tempcleanup -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getlist\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getlist\:.*';& ([scriptblock]::Create($f[1]))" :oe_editionchange @@ -621,7 +621,7 @@ cls set suites= echo %list% | find /i "Suites" %nul1% && ( set suites=1 -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getappnames\:.*';iex ($f[1])" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getappnames\:.*';& ([scriptblock]::Create($f[1]))" if not exist %SystemRoot%\Temp\getAppIds.txt ( %eline% echo Failed to generate available apps list. @@ -1102,7 +1102,7 @@ if not defined terminal mode 105, 32 :: Get build number for the target FFN, using build number with OfficeC2RClient.exe command to trigger updates provides accurate results set build= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getbuild\:.*';iex ($f[1])" %nul6%') do (set build=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getbuild\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set build=%%a) echo "%build%" | find /i "16." %nul% || set build= echo: diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 19349b7..a89f448 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -195,7 +195,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -447,7 +447,7 @@ set _ntarget= set _wtarget= if %winbuild% GEQ 10240 for /f "tokens=4" %%a in ('dism /online /english /Get-TargetEditions ^| findstr /i /c:"Target Edition : "') do (if defined _dtarget (set "_dtarget= !_dtarget! %%a ") else (set "_dtarget= %%a ")) -if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) +if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) if %winbuild% GEQ 10240 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( if %winbuild% GEQ 17063 call :ced_edilist @@ -653,7 +653,7 @@ echo: call :ced_prep if defined preperror goto dk_done -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" call :ced_postprep ) %line% @@ -691,7 +691,7 @@ call :ced_prep if defined preperror goto dk_done if %_stg%==0 (set stage=) else (set stage=-StageCurrent) -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" call :ced_postprep %line% diff --git a/MAS/Separate-Files-Version/Check_Activation_Status.cmd b/MAS/Separate-Files-Version/Check_Activation_Status.cmd index 728b1a0..0e865d9 100644 --- a/MAS/Separate-Files-Version/Check_Activation_Status.cmd +++ b/MAS/Separate-Files-Version/Check_Activation_Status.cmd @@ -39,7 +39,7 @@ goto :E_Exit set "_batf=%~f0" set "_batp=%_batf:'=''%" setlocal EnableDelayedExpansion -%_psc% "$f=[IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';iex ($f[1])" +%_psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';& ([scriptblock]::Create($f[1]))" :E_Exit echo. diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 43664f2..d13e77e 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -206,7 +206,7 @@ goto done2 ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -818,7 +818,7 @@ exit /b :export -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\SetupComplete.cmd',$f[1].Trim(),[System.Text.Encoding]::ASCII);" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\SetupComplete.cmd',$f[1].Trim(),[System.Text.Encoding]::ASCII);" exit /b ::======================================================================================================================================== diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 79d5f36..0064aa4 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -207,7 +207,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -718,7 +718,7 @@ echo Checking SPP permission related issues... call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!]" -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';iex ($f[1])" %nul% +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';& ([scriptblock]::Create($f[1]))" %nul% call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!] [Failed To Fix]" @@ -788,8 +788,8 @@ if defined _vis ( echo: echo Reinstalling system licenses... -%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% -if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( @@ -1435,7 +1435,7 @@ exit /b :regownstart -%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regown\:.*';iex ($f[1]);" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regown\:.*';& ([scriptblock]::Create($f[1]));" exit /b :: Below code takes ownership of a volatile registry key and deletes it From c817ae8bd984a5db42006ca16a0e68d9020db3c6 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 2 Jul 2025 23:46:34 +0530 Subject: [PATCH 036/117] Add detection for Microsoft Defender for Endpoint --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 ++++ MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 4 ++++ MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 4 ++++ .../Activators/Ohook_Activation_AIO.cmd | 4 ++++ .../Activators/Online_KMS_Activation.cmd | 4 ++++ MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 4 ++++ MAS/Separate-Files-Version/Change_Office_Edition.cmd | 4 ++++ MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 4 ++++ MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 4 ++++ MAS/Separate-Files-Version/Troubleshoot.cmd | 4 ++++ 10 files changed, 40 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index a7c96e2..d792170 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -260,6 +260,10 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo: +sc query sense | find /i "RUNNING" %nul% && ( +echo Installed Antivirus - Microsoft Defender for Endpoint +) cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" ) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 865dd2f..5f70d82 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -282,6 +282,10 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo: +sc query sense | find /i "RUNNING" %nul% && ( +echo Installed Antivirus - Microsoft Defender for Endpoint +) cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" ) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 134b388..7b2965a 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -285,6 +285,10 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo: +sc query sense | find /i "RUNNING" %nul% && ( +echo Installed Antivirus - Microsoft Defender for Endpoint +) cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 0142756..0d5e62f 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -290,6 +290,10 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo: +sc query sense | find /i "RUNNING" %nul% && ( +echo Installed Antivirus - Microsoft Defender for Endpoint +) cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 773115e..ae8808a 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -321,6 +321,10 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo: +sc query sense | find /i "RUNNING" %nul% && ( +echo Installed Antivirus - Microsoft Defender for Endpoint +) cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 35ae26f..fd9c444 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -348,6 +348,10 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo: +sc query sense | find /i "RUNNING" %nul% && ( +echo Installed Antivirus - Microsoft Defender for Endpoint +) cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" ) diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 10a6b2f..88fc54f 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -235,6 +235,10 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo: +sc query sense | find /i "RUNNING" %nul% && ( +echo Installed Antivirus - Microsoft Defender for Endpoint +) cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" ) diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index a89f448..05fae97 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -240,6 +240,10 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo: +sc query sense | find /i "RUNNING" %nul% && ( +echo Installed Antivirus - Microsoft Defender for Endpoint +) cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" ) diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index d13e77e..bcc3a78 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -251,6 +251,10 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo: +sc query sense | find /i "RUNNING" %nul% && ( +echo Installed Antivirus - Microsoft Defender for Endpoint +) cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" ) diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 0064aa4..2989d4a 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -252,6 +252,10 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo: +sc query sense | find /i "RUNNING" %nul% && ( +echo Installed Antivirus - Microsoft Defender for Endpoint +) cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" ) From c3e70173e4d0503f8e35d0ed5e98d79a640271c0 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 12 Jul 2025 03:53:16 +0530 Subject: [PATCH 037/117] Skip changing region in top countries --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 9 ++++++--- .../Activators/HWID_Activation.cmd | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index d792170..6c2e0a6 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -859,12 +859,15 @@ call :dk_inskey "[%key%]" for /f "skip=2 tokens=2*" %%a in ('reg query "HKCU\Control Panel\International\Geo" /v Name %nul6%') do set "name=%%b" for /f "skip=2 tokens=2*" %%a in ('reg query "HKCU\Control Panel\International\Geo" /v Nation %nul6%') do set "nation=%%b" -set regionchange= -if not "%name%"=="US" ( +:: Skip changing region in top countries + set regionchange=1 +for %%# in (IN CN US ID PK NG BR BD RU MX ET JP PH EG CD VN TR DE TH GB FR IT KR ES CA SA AU NL CH) do if /i "%name%"=="%%#" set regionchange= + +if defined regionchange ( %psc% "Set-WinHomeLocation -GeoId 244" %nul% if !errorlevel! EQU 0 ( -echo Changing Windows Region To USA [Successful] +echo Changing Windows Region To USA [Successful] [Script will change it back] ) else ( call :dk_color %Red% "Changing Windows Region To USA [Failed]" ) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 5f70d82..067df5e 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -569,12 +569,15 @@ call :dk_inskey "[%key%]" for /f "skip=2 tokens=2*" %%a in ('reg query "HKCU\Control Panel\International\Geo" /v Name %nul6%') do set "name=%%b" for /f "skip=2 tokens=2*" %%a in ('reg query "HKCU\Control Panel\International\Geo" /v Nation %nul6%') do set "nation=%%b" -set regionchange= -if not "%name%"=="US" ( +:: Skip changing region in top countries + set regionchange=1 +for %%# in (IN CN US ID PK NG BR BD RU MX ET JP PH EG CD VN TR DE TH GB FR IT KR ES CA SA AU NL CH) do if /i "%name%"=="%%#" set regionchange= + +if defined regionchange ( %psc% "Set-WinHomeLocation -GeoId 244" %nul% if !errorlevel! EQU 0 ( -echo Changing Windows Region To USA [Successful] +echo Changing Windows Region To USA [Successful] [Script will change it back] ) else ( call :dk_color %Red% "Changing Windows Region To USA [Failed]" ) From 64a726202c4b8845a4b455126313cc343120eeec Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 12 Jul 2025 12:18:44 +0530 Subject: [PATCH 038/117] Update list --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 6c2e0a6..598eafc 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -862,7 +862,7 @@ for /f "skip=2 tokens=2*" %%a in ('reg query "HKCU\Control Panel\International\G :: Skip changing region in top countries set regionchange=1 -for %%# in (IN CN US ID PK NG BR BD RU MX ET JP PH EG CD VN TR DE TH GB FR IT KR ES CA SA AU NL CH) do if /i "%name%"=="%%#" set regionchange= +for %%# in (US CN IN BR DE JP GB FR MX ID IT PK TR KR CA ES AU NG VN PL PH NL EG AR TH CO SA TW MY CL) do if /i "%name%"=="%%#" set regionchange= if defined regionchange ( %psc% "Set-WinHomeLocation -GeoId 244" %nul% diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 067df5e..d69a488 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -572,7 +572,7 @@ for /f "skip=2 tokens=2*" %%a in ('reg query "HKCU\Control Panel\International\G :: Skip changing region in top countries set regionchange=1 -for %%# in (IN CN US ID PK NG BR BD RU MX ET JP PH EG CD VN TR DE TH GB FR IT KR ES CA SA AU NL CH) do if /i "%name%"=="%%#" set regionchange= +for %%# in (US CN IN BR DE JP GB FR MX ID IT PK TR KR CA ES AU NG VN PL PH NL EG AR TH CO SA TW MY CL) do if /i "%name%"=="%%#" set regionchange= if defined regionchange ( %psc% "Set-WinHomeLocation -GeoId 244" %nul% From 5d37a9996611d874ef6738a4783d824bf2c93e06 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 17 Jul 2025 21:34:04 +0530 Subject: [PATCH 039/117] Add ESU support for Core editions (Release preview 19045.6156) --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 27 ++++++++++++------- .../Activators/TSforge_Activation.cmd | 27 ++++++++++++------- 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 598eafc..900290c 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -4706,6 +4706,14 @@ if exist "%SystemRoot%\Servicing\Packages\WinEmb-Branding-Embedded-Standard-Pack ) 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 /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 +if %winbuild% EQU 19045 if %UBR% GEQ 6156 ( +set w10EsuEditionsLaterAdded=Core-CoreN-CoreCountrySpecific-CoreSingleLanguage-IoTEnterprise- +) + if not defined isThinpc if not defined isltsc for %%# in ( REM Windows7 4220f546-f522-46df-8202-4d07afd26454_Client-ESU-Year3[1-3y]_-Enterprise-EnterpriseE-EnterpriseN-Professional-ProfessionalE-ProfessionalN-Ultimate-UltimateE-UltimateN- @@ -4722,10 +4730,10 @@ REM Windows8.1 REM WindowsServer2012/2012R2 55b1dd2d-2209-4ea0-a805-06298bad25b3_Server-ESU-Year3[1-3y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore- REM Windows10 -f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- -1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- -83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- -0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- +f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% +1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% +83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% +0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% b8527af1-5389-447c-9a88-2d1691ea33d3_Client-IoT-ESU-Year1_-IoTEnterprise- 7b76ee02-0a75-4f08-85d5-bd0feadad0c0_Client-IoT-ESU-Year2_-IoTEnterprise- 4dac5a0c-5709-4595-a32c-14a56a4a6b31_Client-IoT-ESU-Year3_-IoTEnterprise- @@ -4771,13 +4779,14 @@ goto :ts_off ) if defined esuexistbutnosup ( -call :dk_color %Red% "Checking Activation ID [Commercial ESU is not supported for %tsedition%]" -echo %esueditionlist% | find /i "Professional" %nul1% && ( -call :dk_color %Blue% "Go back to Main Menu, select Change Windows Edition option, and change it to [Professional] or any non-Home edition." -) || ( +call :dk_color %Red% "Checking Activation ID [Currently installed ESU License is not supported for %tsedition%]" +echo: +if %winbuild% EQU 19045 if not defined w10EsuEditionsLaterAdded ( +call :dk_color %Blue% "To get latest version, go to Windows settings and run the Windows Update. After that, try the script again." +goto :ts_off +) call :dk_color %Blue% "Go back to Main Menu, select Change Windows Edition option and change to any of the below listed editions." echo [%esueditionlist%] -) goto :ts_off ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index fd9c444..4e02ed4 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1086,6 +1086,14 @@ if exist "%SystemRoot%\Servicing\Packages\WinEmb-Branding-Embedded-Standard-Pack ) 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 /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 +if %winbuild% EQU 19045 if %UBR% GEQ 6156 ( +set w10EsuEditionsLaterAdded=Core-CoreN-CoreCountrySpecific-CoreSingleLanguage-IoTEnterprise- +) + if not defined isThinpc if not defined isltsc for %%# in ( REM Windows7 4220f546-f522-46df-8202-4d07afd26454_Client-ESU-Year3[1-3y]_-Enterprise-EnterpriseE-EnterpriseN-Professional-ProfessionalE-ProfessionalN-Ultimate-UltimateE-UltimateN- @@ -1102,10 +1110,10 @@ REM Windows8.1 REM WindowsServer2012/2012R2 55b1dd2d-2209-4ea0-a805-06298bad25b3_Server-ESU-Year3[1-3y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore- REM Windows10 -f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- -1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- -83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- -0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- +f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% +1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% +83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% +0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% b8527af1-5389-447c-9a88-2d1691ea33d3_Client-IoT-ESU-Year1_-IoTEnterprise- 7b76ee02-0a75-4f08-85d5-bd0feadad0c0_Client-IoT-ESU-Year2_-IoTEnterprise- 4dac5a0c-5709-4595-a32c-14a56a4a6b31_Client-IoT-ESU-Year3_-IoTEnterprise- @@ -1151,13 +1159,14 @@ goto :ts_off ) if defined esuexistbutnosup ( -call :dk_color %Red% "Checking Activation ID [Commercial ESU is not supported for %tsedition%]" -echo %esueditionlist% | find /i "Professional" %nul1% && ( -call :dk_color %Blue% "Go back to Main Menu, select Change Windows Edition option, and change it to [Professional] or any non-Home edition." -) || ( +call :dk_color %Red% "Checking Activation ID [Currently installed ESU License is not supported for %tsedition%]" +echo: +if %winbuild% EQU 19045 if not defined w10EsuEditionsLaterAdded ( +call :dk_color %Blue% "To get latest version, go to Windows settings and run the Windows Update. After that, try the script again." +goto :ts_off +) call :dk_color %Blue% "Go back to Main Menu, select Change Windows Edition option and change to any of the below listed editions." echo [%esueditionlist%] -) goto :ts_off ) From 4aa811dd5e8b0442fd2db6ea7bbbcc745c9046e3 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 17 Jul 2025 21:40:37 +0530 Subject: [PATCH 040/117] Update info --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 ++-- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 900290c..5153e2b 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -4295,7 +4295,7 @@ echo Checking Internet Connection [Connected!ping_f!] if /i %_actmethod%==Auto if not %_actman%==1 set tsmethod=KMS4k if /i !tsmethod!==KMS4k ( call :dk_color %Gray% "Checking Internet Connection [Not Connected]" -call :dk_color %Blue% "Switching To KMS4k Activation Method because Internet is needed for StaticCID method." +call :dk_color %Blue% "Switching To KMS4k activation because Internet is needed for StaticCID method." ) else ( set error=1 call :dk_color %Red% "Checking Internet Connection [Not Connected]" @@ -4782,7 +4782,7 @@ if defined esuexistbutnosup ( call :dk_color %Red% "Checking Activation ID [Currently installed ESU License is not supported for %tsedition%]" echo: if %winbuild% EQU 19045 if not defined w10EsuEditionsLaterAdded ( -call :dk_color %Blue% "To get latest version, go to Windows settings and run the Windows Update. After that, try the script again." +call :dk_color %Blue% "To get latest version, go to Windows settings and run Windows Update. After that, try the script again." goto :ts_off ) call :dk_color %Blue% "Go back to Main Menu, select Change Windows Edition option and change to any of the below listed editions." diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 4e02ed4..dd8f1a4 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -675,7 +675,7 @@ echo Checking Internet Connection [Connected!ping_f!] if /i %_actmethod%==Auto if not %_actman%==1 set tsmethod=KMS4k if /i !tsmethod!==KMS4k ( call :dk_color %Gray% "Checking Internet Connection [Not Connected]" -call :dk_color %Blue% "Switching To KMS4k Activation Method because Internet is needed for StaticCID method." +call :dk_color %Blue% "Switching To KMS4k activation because Internet is needed for StaticCID method." ) else ( set error=1 call :dk_color %Red% "Checking Internet Connection [Not Connected]" @@ -1162,7 +1162,7 @@ if defined esuexistbutnosup ( call :dk_color %Red% "Checking Activation ID [Currently installed ESU License is not supported for %tsedition%]" echo: if %winbuild% EQU 19045 if not defined w10EsuEditionsLaterAdded ( -call :dk_color %Blue% "To get latest version, go to Windows settings and run the Windows Update. After that, try the script again." +call :dk_color %Blue% "To get latest version, go to Windows settings and run Windows Update. After that, try the script again." goto :ts_off ) call :dk_color %Blue% "Go back to Main Menu, select Change Windows Edition option and change to any of the below listed editions." From cb36c19f011f127226aaae954201ce51f4e5fc3e Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 17 Jul 2025 23:21:08 +0530 Subject: [PATCH 041/117] Show a tip about ESU updates --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 5153e2b..37d79c8 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -399,23 +399,31 @@ color 07 title Microsoft %blank%Activation %blank%Scripts %masver% if not defined terminal mode 76, 34 -if %winbuild% GEQ 10240 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" set _hwidgo=1 -if %winbuild% GTR 14393 if exist "%SysPath%\spp\tokens\skus\EnterpriseSN\" set _hwidgo= +if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" set _serexist=1 +if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" set _evalexist=1 +if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-EnterpriseS*dition~*.mum" set _ltscexist=1 +if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-EnterpriseSN*dition~*.mum" set _ltscnexist=1 + +if %winbuild% GEQ 10240 if not defined _serexist if not defined _evalexist set _hwidgo=1 +if %winbuild% GTR 14393 if defined _ltscnexist set _hwidgo= if not defined _hwidgo set _tsforgego=1 set _ohookgo=1 if %winbuild% GEQ 9200 ( if %winbuild% LSS 10240 set _ohookgo= if %winbuild% GEQ 19041 if %winbuild% LEQ 19045 set _ohookgo= -if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" set _ohookgo= -if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" set _ohookgo= -if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-EnterpriseS*dition~*.mum" set _ohookgo= +if defined _serexist set _ohookgo= +if defined _evalexist set _ohookgo= +if defined _ltscexist set _ohookgo= ) if not defined _ohookgo set _tsforgego=1 echo: echo: echo: +if %winbuild% GEQ 10240 if %winbuild% LEQ 19045 if not defined _serexist if not defined _evalexist if not defined _ltscexist ( +call :dk_color2 %_Green% " Tip:" %_White% " To activate ESU updates after W10 EOL, use TSforge option." +) echo: echo: ______________________________________________________________ echo: From 10b6e8b6dc537f56eb2867998171586b8503b966 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 18 Jul 2025 00:27:13 +0530 Subject: [PATCH 042/117] Show Ohook in green if O365 is installed --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 37d79c8..0ed6507 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -415,6 +415,8 @@ if %winbuild% GEQ 19041 if %winbuild% LEQ 19045 set _ohookgo= if defined _serexist set _ohookgo= if defined _evalexist set _ohookgo= if defined _ltscexist set _ohookgo= +reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds %nul2% | find /i "O365" %nul% && set _ohookgo=1 +reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds %nul2% | find /i "O365" %nul% && set _ohookgo=1 ) if not defined _ohookgo set _tsforgego=1 From 1fb65d4f9c6213154072a356d75a130d2acc005e Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 21 Jul 2025 14:10:52 +0530 Subject: [PATCH 043/117] Fix an issue in add/remove apps when more than one lang is installed --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 37 ++++++++++++++----- .../Change_Office_Edition.cmd | 37 ++++++++++++++----- 2 files changed, 56 insertions(+), 18 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 0ed6507..ffb802a 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -18772,7 +18772,9 @@ goto :oe_goback :: OfficeClickToRun.exe with productstoadd method is used here to add editions :: It uses delta updates, meaning that since it's using same installed build, it will consume very less Internet -set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%targetedition%.16_%_lang%_x-none cdnbaseurl.16=http://officecdn.microsoft.com/pr/%_updch% baseurl.16=http://officecdn.microsoft.com/pr/%_updch% version.16=%_version% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%_updch% %targetedition%.excludedapps.16=groove%excludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" +call :oe_getlangs + +set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%targetedition%.16_%_allLangs% cdnbaseurl.16=http://officecdn.microsoft.com/pr/%_updch% baseurl.16=http://officecdn.microsoft.com/pr/%_updch% version.16=%_version% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%_updch% %targetedition%.excludedapps.16=groove%excludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" if %change%==1 ( set "c2rcommand=!c2rcommand! productstoremove=AllProducts" @@ -18949,13 +18951,8 @@ if %verified%==0 goto :oe_removeedition cls if not defined terminal mode 105, 32 -set _lang= -echo "%o16c2r_reg%" | find /i "Wow6432Node" %nul1% && (set _tok=10) || (set _tok=9) -for /f "tokens=%_tok% delims=\" %%a in ('reg query "%o16c2r_reg%\ProductReleaseIDs\%_actconfig%\%targetedition%.16" /f "-" /k ^| findstr /i ".*16\\.*-.*"') do ( -if defined _lang (set "_lang=!_lang!_%%a") else (set "_lang=_%%a") -) - -set "c2rcommand="%_c2rExe%" platform=%_oArch% productstoremove=%targetedition%.16%_lang%" +call :oe_getlangs %targetedition% +set "c2rcommand="%_c2rExe%" platform=%_oArch% productstoremove=%targetedition%.16_%_allLangs%" echo: echo Running the below command, please wait... @@ -19138,7 +19135,8 @@ goto :oe_goback set buildchk=0 for /f "tokens=3 delims=." %%a in ("%build%") do set "buildchk=%%a" -set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%_firstoId%.16_%_lang%_x-none cdnbaseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% baseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% version.16=%build% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%targetFFN% %_firstoId%.excludedapps.16=%_firstoIdExcludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" +call :oe_getlangs %_firstoId% +set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%_firstoId%.16_%_allLangs% cdnbaseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% baseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% version.16=%build% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%targetFFN% %_firstoId%.excludedapps.16=%_firstoIdExcludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" set "c2rclientupdate=!c2rcommand! scenario=CLIENTUPDATE" if %clverchk% LSS %buildchk% ( @@ -19320,6 +19318,27 @@ exit /b ::======================================================================================================================================== +:: Check all the installed languages + +:oe_getlangs + +if "%1"=="" ( +set langreg=culture +) else ( +set langreg=%1.16 +) + +set _allLangs= +echo "%o16c2r_reg%" | find /i "Wow6432Node" %nul1% && (set _tok=10) || (set _tok=9) +for /f "tokens=%_tok% delims=\" %%a in ('reg query "%o16c2r_reg%\ProductReleaseIDs\%_actconfig%\%langreg%" /f "-" /k ^| findstr /i "%langreg%\\.*-.*"') do ( +if defined _allLangs (set "_allLangs=!_allLangs!_%%a") else (set "_allLangs=%%a") +) + +set _allLangs=%_allLangs:.16=% +exit /b + +::======================================================================================================================================== + :: Check Internet connection :oe_chkinternet diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 88fc54f..a442896 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -794,7 +794,9 @@ goto :oe_goback :: OfficeClickToRun.exe with productstoadd method is used here to add editions :: It uses delta updates, meaning that since it's using same installed build, it will consume very less Internet -set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%targetedition%.16_%_lang%_x-none cdnbaseurl.16=http://officecdn.microsoft.com/pr/%_updch% baseurl.16=http://officecdn.microsoft.com/pr/%_updch% version.16=%_version% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%_updch% %targetedition%.excludedapps.16=groove%excludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" +call :oe_getlangs + +set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%targetedition%.16_%_allLangs% cdnbaseurl.16=http://officecdn.microsoft.com/pr/%_updch% baseurl.16=http://officecdn.microsoft.com/pr/%_updch% version.16=%_version% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%_updch% %targetedition%.excludedapps.16=groove%excludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" if %change%==1 ( set "c2rcommand=!c2rcommand! productstoremove=AllProducts" @@ -971,13 +973,8 @@ if %verified%==0 goto :oe_removeedition cls if not defined terminal mode 105, 32 -set _lang= -echo "%o16c2r_reg%" | find /i "Wow6432Node" %nul1% && (set _tok=10) || (set _tok=9) -for /f "tokens=%_tok% delims=\" %%a in ('reg query "%o16c2r_reg%\ProductReleaseIDs\%_actconfig%\%targetedition%.16" /f "-" /k ^| findstr /i ".*16\\.*-.*"') do ( -if defined _lang (set "_lang=!_lang!_%%a") else (set "_lang=_%%a") -) - -set "c2rcommand="%_c2rExe%" platform=%_oArch% productstoremove=%targetedition%.16%_lang%" +call :oe_getlangs %targetedition% +set "c2rcommand="%_c2rExe%" platform=%_oArch% productstoremove=%targetedition%.16_%_allLangs%" echo: echo Running the below command, please wait... @@ -1160,7 +1157,8 @@ goto :oe_goback set buildchk=0 for /f "tokens=3 delims=." %%a in ("%build%") do set "buildchk=%%a" -set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%_firstoId%.16_%_lang%_x-none cdnbaseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% baseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% version.16=%build% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%targetFFN% %_firstoId%.excludedapps.16=%_firstoIdExcludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" +call :oe_getlangs %_firstoId% +set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%_firstoId%.16_%_allLangs% cdnbaseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% baseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% version.16=%build% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%targetFFN% %_firstoId%.excludedapps.16=%_firstoIdExcludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" set "c2rclientupdate=!c2rcommand! scenario=CLIENTUPDATE" if %clverchk% LSS %buildchk% ( @@ -1342,6 +1340,27 @@ exit /b ::======================================================================================================================================== +:: Check all the installed languages + +:oe_getlangs + +if "%1"=="" ( +set langreg=culture +) else ( +set langreg=%1.16 +) + +set _allLangs= +echo "%o16c2r_reg%" | find /i "Wow6432Node" %nul1% && (set _tok=10) || (set _tok=9) +for /f "tokens=%_tok% delims=\" %%a in ('reg query "%o16c2r_reg%\ProductReleaseIDs\%_actconfig%\%langreg%" /f "-" /k ^| findstr /i "%langreg%\\.*-.*"') do ( +if defined _allLangs (set "_allLangs=!_allLangs!_%%a") else (set "_allLangs=%%a") +) + +set _allLangs=%_allLangs:.16=% +exit /b + +::======================================================================================================================================== + :: Check Internet connection :oe_chkinternet From 2b37400aa8eb6a53a2233a82248738378bb554a4 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 22 Jul 2025 00:12:59 +0530 Subject: [PATCH 044/117] Detect unsupported languages for Office 2019 Perpetual VL update channel --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 11 +++++++++++ MAS/Separate-Files-Version/Change_Office_Edition.cmd | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index ffb802a..870355b 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -19136,6 +19136,17 @@ set buildchk=0 for /f "tokens=3 delims=." %%a in ("%build%") do set "buildchk=%%a" call :oe_getlangs %_firstoId% + +echo %targetchannel% | find /i "2019 VL" %nul% && ( +for %%A in (en-gb es-mx fr-ca) do ( +echo %_allLangs% | find /i "%%A" %nul% && ( +%eline% +echo [%%A] language is not supported on the Office 2019 Perpetual VL update channel. Aborting... +goto :oe_goback +) +) +) + set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%_firstoId%.16_%_allLangs% cdnbaseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% baseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% version.16=%build% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%targetFFN% %_firstoId%.excludedapps.16=%_firstoIdExcludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" set "c2rclientupdate=!c2rcommand! scenario=CLIENTUPDATE" diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index a442896..3f8afb6 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -1158,6 +1158,17 @@ set buildchk=0 for /f "tokens=3 delims=." %%a in ("%build%") do set "buildchk=%%a" call :oe_getlangs %_firstoId% + +echo %targetchannel% | find /i "2019 VL" %nul% && ( +for %%A in (en-gb es-mx fr-ca) do ( +echo %_allLangs% | find /i "%%A" %nul% && ( +%eline% +echo [%%A] language is not supported on the Office 2019 Perpetual VL update channel. Aborting... +goto :oe_goback +) +) +) + set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%_firstoId%.16_%_allLangs% cdnbaseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% baseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% version.16=%build% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%targetFFN% %_firstoId%.excludedapps.16=%_firstoIdExcludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled" set "c2rclientupdate=!c2rcommand! scenario=CLIENTUPDATE" From 39bcefa02b71115935f889a9789fdb74839f4a30 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 22 Jul 2025 00:55:14 +0530 Subject: [PATCH 045/117] Improve error info --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 10 ++++++---- .../Activators/HWID_Activation.cmd | 10 ++++++---- .../Activators/KMS38_Activation.cmd | 10 ++++++---- .../Activators/Ohook_Activation_AIO.cmd | 10 ++++++---- .../Activators/Online_KMS_Activation.cmd | 10 ++++++---- .../Activators/TSforge_Activation.cmd | 10 ++++++---- 6 files changed, 36 insertions(+), 24 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 870355b..0a4ae97 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1768,14 +1768,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -1817,9 +1819,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( -call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]" +call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" set fixes=%fixes% %mas%issues_due_to_gaming_spoofers -call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" set error=1 set showfix=1 ) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index d69a488..621e381 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1452,14 +1452,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -1501,9 +1503,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( -call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]" +call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" set fixes=%fixes% %mas%issues_due_to_gaming_spoofers -call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" set error=1 set showfix=1 ) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 7b2965a..704e7a3 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1592,14 +1592,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -1641,9 +1643,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( -call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]" +call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" set fixes=%fixes% %mas%issues_due_to_gaming_spoofers -call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" set error=1 set showfix=1 ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 0d5e62f..aa445f0 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -2127,14 +2127,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -2176,9 +2178,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( -call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]" +call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" set fixes=%fixes% %mas%issues_due_to_gaming_spoofers -call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" set error=1 set showfix=1 ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index ae8808a..d23e544 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -3183,14 +3183,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -3232,9 +3234,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( -call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]" +call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" set fixes=%fixes% %mas%issues_due_to_gaming_spoofers -call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" set error=1 set showfix=1 ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index dd8f1a4..2cee818 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -3190,14 +3190,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( set error=1 set showfix=1 -call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]" +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -3239,9 +3241,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( -call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]" +call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" set fixes=%fixes% %mas%issues_due_to_gaming_spoofers -call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" set error=1 set showfix=1 ) From 43cceb366ef8a2a9dcd85b31ee72063efbde8ef9 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 22 Jul 2025 02:02:52 +0530 Subject: [PATCH 046/117] Fix issues in checking expired Office products --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 9 ++++++++- .../Activators/Ohook_Activation_AIO.cmd | 9 ++++++++- .../Activators/Online_KMS_Activation.cmd | 9 ++++++++- .../Activators/TSforge_Activation.cmd | 9 ++++++++- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 0a4ae97..8d238a7 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -2764,8 +2764,15 @@ exit /b :oh_expiredpreview +echo %_oIds% | find /i "Volume" %nul% || exit /b + for %%# in (%*) do ( -if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" ( +if %%#==2013 set _offver= +if %%#==2016 set _offver= +if %%#==2019 set _offver=2019 +if %%#==2021 set _offver=2021 +if %%#==2024 set _offver=2024 +if exist "!_oLPath!\ProPlus!_offver!PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus!_offver!VL_*.xrm-ms" ( set error=1 set showfix=1 call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]" diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index aa445f0..6ad1f49 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -940,8 +940,15 @@ exit /b :oh_expiredpreview +echo %_oIds% | find /i "Volume" %nul% || exit /b + for %%# in (%*) do ( -if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" ( +if %%#==2013 set _offver= +if %%#==2016 set _offver= +if %%#==2019 set _offver=2019 +if %%#==2021 set _offver=2021 +if %%#==2024 set _offver=2024 +if exist "!_oLPath!\ProPlus!_offver!PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus!_offver!VL_*.xrm-ms" ( set error=1 set showfix=1 call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]" diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index d23e544..0c6f1c2 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -1106,8 +1106,15 @@ exit /b :oh_expiredpreview +echo %_oIds% | find /i "Volume" %nul% || exit /b + for %%# in (%*) do ( -if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" ( +if %%#==2013 set _offver= +if %%#==2016 set _offver= +if %%#==2019 set _offver=2019 +if %%#==2021 set _offver=2021 +if %%#==2024 set _offver=2024 +if exist "!_oLPath!\ProPlus!_offver!PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus!_offver!VL_*.xrm-ms" ( set error=1 set showfix=1 call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]" diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 2cee818..f9db886 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -2021,8 +2021,15 @@ exit /b :oh_expiredpreview +echo %_oIds% | find /i "Volume" %nul% || exit /b + for %%# in (%*) do ( -if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" ( +if %%#==2013 set _offver= +if %%#==2016 set _offver= +if %%#==2019 set _offver=2019 +if %%#==2021 set _offver=2021 +if %%#==2024 set _offver=2024 +if exist "!_oLPath!\ProPlus!_offver!PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus!_offver!VL_*.xrm-ms" ( set error=1 set showfix=1 call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]" From bc781ad079bfa097fd3c4fb1f43d6ddc64f8ccc4 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 22 Jul 2025 04:40:17 +0530 Subject: [PATCH 047/117] Remove KMS38 protection feature, it's not important. --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 123 +++++++++--------- .../Activators/KMS38_Activation.cmd | 74 ++--------- MAS/Separate-Files-Version/Troubleshoot.cmd | 102 +++++++++++++++ 3 files changed, 179 insertions(+), 120 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 8d238a7..671bc3f 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -11706,9 +11706,6 @@ exit /b :: To activate, run the script with "/KMS38" parameter or change 0 to 1 in below line set _act=0 -:: To remove KMS38 protection, run the script with /KMS38-RemoveProtection parameter or change 0 to 1 in below line -set _rem=0 - :: To disable changing edition if current edition doesn't support KMS38 activation, change the value to 1 from 0 or run the script with "/KMS38-NoEditionChange" parameter set _NoEditionChange=0 @@ -11729,13 +11726,12 @@ if defined _args set _args=%_args:"=% if defined _args ( for %%A in (%_args%) do ( if /i "%%A"=="/KMS38" set _act=1 -if /i "%%A"=="/KMS38-RemoveProtection" set _rem=1 if /i "%%A"=="/KMS38-NoEditionChange" set _NoEditionChange=1 if /i "%%A"=="-el" set _elev=1 ) ) -for %%A in (%_act% %_rem% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1) +for %%A in (%_act% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1) ::======================================================================================================================================== @@ -11758,8 +11754,6 @@ goto dk_done ::======================================================================================================================================== -if %_rem%==1 goto :k_uninstall - :k_menu if %_unattended%==0 ( @@ -11776,7 +11770,7 @@ echo: echo [1] KMS38 Activation echo ____________________________________________ echo: -echo [2] Remove KM38 Protection +echo [2] Remove KMS38 Activation echo: echo [0] %_exitmsg% echo: ______________________________________________________ @@ -12043,8 +12037,7 @@ echo: %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" -%nul% reg delete "HKLM\%specific_kms%" /f +call :dk_color %Blue% "Specific KMS registry is locked. %_fixmsg%" ) set k_error= @@ -12210,18 +12203,6 @@ echo Removing the Added Specific KMS Host [Successful] ) ) -:: Protect KMS38 if opted by the user and conditions are correct - -if defined _k38 ( -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" -%nul% reg delete "HKLM\%specific_kms%" /f -%nul% reg query "HKLM\%specific_kms%" && ( -echo Protect KMS38 From KMS [Successful] [Locked a Registry Key] -) || ( -call :dk_color %Red% "Protect KMS38 From KMS [Failed to Lock a Registry Key]" -) -) - :: clipup.exe does not exist in server cor and acor editions by default, it was copied there with this script if defined a_cor if exist "%_clipup%" del /f /q "%_clipup%" %nul% @@ -12251,57 +12232,30 @@ goto :dk_done cls if not defined terminal mode 99, 28 -title Remove KMS38 Protection %masver% +title Remove KMS38 Activation %masver% %nul% reg delete "HKLM\%specific_kms%" /f %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f +echo: %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" -%nul% reg delete "HKLM\%specific_kms%" /f +call :dk_color %Red% "Failed to remove specific KMS Host." +call :dk_color %Blue% "%_fixmsg%" +) || ( +echo Successfully removed specific KMS Host. ) echo: -%nul% reg query "HKLM\%specific_kms%" && ( -call :dk_color %Red% "Removing Specific KMS Host [Failed]" -) || ( -echo Removing Specific KMS Host [Successful] -) +echo KMS38 activation doesn't modify any Windows components and doesn't install any new files. +echo: +call :dk_color %Gray% "If you want to reset the activation status," +call :dk_color %Blue% "%_fixmsg%" +echo: goto :dk_done ::======================================================================================================================================== -:: This code runs to protect/undo below registry key for KMS38 protection -:: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f - -:: KMS38 protection stops 180 days KMS Activation from replacing KMS38 activation - -:regdel: -param ( - [switch]$protect -) - -$SID = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544') -$Admin = ($SID.Translate([System.Security.Principal.NTAccount])).Value - -if($protect) { -$ruleArgs = @("$Admin", "Delete, SetValue", "ContainerInherit", "None", "Deny") -} else { -$ruleArgs = @("$Admin", "FullControl", "Allow") -} - -$path = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f' -$key = [Microsoft.Win32.RegistryKey]::OpenBaseKey('LocalMachine', 'Registry64').OpenSubKey($path, 'ReadWriteSubTree', 'ChangePermissions') -$acl = $key.GetAccessControl() - -$rule = [System.Security.AccessControl.RegistryAccessRule]::new.Invoke($ruleArgs) -$acl.ResetAccessRule($rule) -$key.SetAccessControl($acl) -:regdel: - -::======================================================================================================================================== - :: Check KMS activation status :k_actinfo @@ -16692,6 +16646,25 @@ echo: call :dk_color %Blue% "Rebuilding SPP licensing tokens..." echo: +echo Clearing KMS Cache... +echo: +call :_taskclear-cache + +%nul% reg query "HKLM\%SPPk%\%_wApp%" && ( +echo Removing KMS38 protection... +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" +%nul% reg delete "HKLM\%SPPk%\%_wApp%" /f +%nul% reg query "HKLM\%SPPk%\%_wApp%" && ( +call :dk_color %Red% "Failed to remove KMS38 protection." +) || ( +echo Successfully removed KMS38 protection. +echo Successfully cleared KMS Cache. +) +) || ( +echo Successfully cleared KMS Cache. +) +echo: + call :scandat check if not defined token ( @@ -17437,6 +17410,36 @@ $acl.SetAccessRule($rule) $key.SetAccessControl($acl) :regown: +::======================================================================================================================================== + +:: This code runs to undo below registry key KMS38 protection +:: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f + +:: This option is not used in KMS38 anymore, it's here only to remove previous versions protection. + +:regdel: +param ( + [switch]$protect +) + +$SID = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544') +$Admin = ($SID.Translate([System.Security.Principal.NTAccount])).Value + +if($protect) { +$ruleArgs = @("$Admin", "Delete, SetValue", "ContainerInherit", "None", "Deny") +} else { +$ruleArgs = @("$Admin", "FullControl", "Allow") +} + +$path = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f' +$key = [Microsoft.Win32.RegistryKey]::OpenBaseKey('LocalMachine', 'Registry64').OpenSubKey($path, 'ReadWriteSubTree', 'ChangePermissions') +$acl = $key.GetAccessControl() + +$rule = [System.Security.AccessControl.RegistryAccessRule]::new.Invoke($ruleArgs) +$acl.ResetAccessRule($rule) +$key.SetAccessControl($acl) +:regdel: + :+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ :change_winedition diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 704e7a3..8afe342 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -15,9 +15,6 @@ :: To activate, run the script with "/KMS38" parameter or change 0 to 1 in below line set _act=0 -:: To remove KMS38 protection, run the script with /KMS38-RemoveProtection parameter or change 0 to 1 in below line -set _rem=0 - :: To disable changing edition if current edition doesn't support KMS38 activation, change the value to 1 from 0 or run the script with "/KMS38-NoEditionChange" parameter set _NoEditionChange=0 @@ -155,13 +152,12 @@ if defined _args set _args=%_args:re2=% if defined _args ( for %%A in (%_args%) do ( if /i "%%A"=="/KMS38" set _act=1 -if /i "%%A"=="/KMS38-RemoveProtection" set _rem=1 if /i "%%A"=="/KMS38-NoEditionChange" set _NoEditionChange=1 if /i "%%A"=="-el" set _elev=1 ) ) -for %%A in (%_act% %_rem% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1) +for %%A in (%_act% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1) ::======================================================================================================================================== @@ -382,8 +378,6 @@ cls ::======================================================================================================================================== -if %_rem%==1 goto :k_uninstall - :k_menu if %_unattended%==0 ( @@ -400,7 +394,7 @@ echo: echo [1] KMS38 Activation echo ____________________________________________ echo: -echo [2] Remove KM38 Protection +echo [2] Remove KMS38 Activation echo: echo [0] %_exitmsg% echo: ______________________________________________________ @@ -667,8 +661,7 @@ echo: %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" -%nul% reg delete "HKLM\%specific_kms%" /f +call :dk_color %Blue% "Specific KMS registry is locked. %_fixmsg%" ) set k_error= @@ -834,18 +827,6 @@ echo Removing the Added Specific KMS Host [Successful] ) ) -:: Protect KMS38 if opted by the user and conditions are correct - -if defined _k38 ( -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" -%nul% reg delete "HKLM\%specific_kms%" /f -%nul% reg query "HKLM\%specific_kms%" && ( -echo Protect KMS38 From KMS [Successful] [Locked a Registry Key] -) || ( -call :dk_color %Red% "Protect KMS38 From KMS [Failed to Lock a Registry Key]" -) -) - :: clipup.exe does not exist in server cor and acor editions by default, it was copied there with this script if defined a_cor if exist "%_clipup%" del /f /q "%_clipup%" %nul% @@ -875,57 +856,30 @@ goto :dk_done cls if not defined terminal mode 99, 28 -title Remove KMS38 Protection %masver% +title Remove KMS38 Activation %masver% %nul% reg delete "HKLM\%specific_kms%" /f %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f +echo: %nul% reg query "HKLM\%specific_kms%" && ( -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" -%nul% reg delete "HKLM\%specific_kms%" /f +call :dk_color %Red% "Failed to remove specific KMS Host." +call :dk_color %Blue% "%_fixmsg%" +) || ( +echo Successfully removed specific KMS Host. ) echo: -%nul% reg query "HKLM\%specific_kms%" && ( -call :dk_color %Red% "Removing Specific KMS Host [Failed]" -) || ( -echo Removing Specific KMS Host [Successful] -) +echo KMS38 activation doesn't modify any Windows components and doesn't install any new files. +echo: +call :dk_color %Gray% "If you want to reset the activation status," +call :dk_color %Blue% "%_fixmsg%" +echo: goto :dk_done ::======================================================================================================================================== -:: This code runs to protect/undo below registry key for KMS38 protection -:: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f - -:: KMS38 protection stops 180 days KMS Activation from replacing KMS38 activation - -:regdel: -param ( - [switch]$protect -) - -$SID = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544') -$Admin = ($SID.Translate([System.Security.Principal.NTAccount])).Value - -if($protect) { -$ruleArgs = @("$Admin", "Delete, SetValue", "ContainerInherit", "None", "Deny") -} else { -$ruleArgs = @("$Admin", "FullControl", "Allow") -} - -$path = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f' -$key = [Microsoft.Win32.RegistryKey]::OpenBaseKey('LocalMachine', 'Registry64').OpenSubKey($path, 'ReadWriteSubTree', 'ChangePermissions') -$acl = $key.GetAccessControl() - -$rule = [System.Security.AccessControl.RegistryAccessRule]::new.Invoke($ruleArgs) -$acl.ResetAccessRule($rule) -$key.SetAccessControl($acl) -:regdel: - -::======================================================================================================================================== - :: Set variables :dk_setvar diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 2989d4a..3112fca 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -697,6 +697,25 @@ echo: call :dk_color %Blue% "Rebuilding SPP licensing tokens..." echo: +echo Clearing KMS Cache... +echo: +call :_taskclear-cache + +%nul% reg query "HKLM\%SPPk%\%_wApp%" && ( +echo Removing KMS38 protection... +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" +%nul% reg delete "HKLM\%SPPk%\%_wApp%" /f +%nul% reg query "HKLM\%SPPk%\%_wApp%" && ( +call :dk_color %Red% "Failed to remove KMS38 protection." +) || ( +echo Successfully removed KMS38 protection. +echo Successfully cleared KMS Cache. +) +) || ( +echo Successfully cleared KMS Cache. +) +echo: + call :scandat check if not defined token ( @@ -1260,6 +1279,59 @@ exit /b ::======================================================================================================================================== +:: Clean existing K-M-S cache from the registry + +:_taskclear-cache + +set w= +for %%# in (SppE%w%xtComObj.exe sppsvc.exe SLsvc.exe) do ( +reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" /f %nul% +) + +set "OPPk=SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" + +if %winbuild% LSS 7600 ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL" %nul% && ( +set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL" +) +) +if not defined SPPk ( +set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" +) + +set "slp=SoftwareLicensingProduct" +set "ospp=OfficeSoftwareProtectionProduct" + +set "_wApp=55c92734-d682-4d71-983e-d6ec3f16059f" +set "_oApp=0ff1ce15-a989-479d-af46-f275c6370663" +set "_oA14=59a52881-a989-479d-af46-f275c6370663" + +%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServiceName +%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServiceName /reg:32 +%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServicePort +%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServicePort /reg:32 +%nul% reg delete "HKLM\%SPPk%" /f /v DisableDnsPublishing +%nul% reg delete "HKLM\%SPPk%" /f /v DisableKeyManagementServiceHostCaching +%nul% reg delete "HKLM\%SPPk%\%_wApp%" /f +if %winbuild% GEQ 9200 ( +%nul% reg delete "HKLM\%SPPk%\%_oApp%" /f +%nul% reg delete "HKLM\%SPPk%\%_oApp%" /f /reg:32 +) +if %winbuild% GEQ 9600 ( +%nul% reg delete "HKU\S-1-5-20\%SPPk%\%_wApp%" /f +%nul% reg delete "HKU\S-1-5-20\%SPPk%\%_oApp%" /f +) +%nul% reg delete "HKLM\%OPPk%" /f /v KeyManagementServiceName +%nul% reg delete "HKLM\%OPPk%" /f /v KeyManagementServicePort +%nul% reg delete "HKLM\%OPPk%" /f /v DisableDnsPublishing +%nul% reg delete "HKLM\%OPPk%" /f /v DisableKeyManagementServiceHostCaching +%nul% reg delete "HKLM\%OPPk%\%_oA14%" /f +%nul% reg delete "HKLM\%OPPk%\%_oApp%" /f + +exit /b + +::======================================================================================================================================== + :: Fix SPP related registry and folder permissions :fixsppperms: @@ -1471,6 +1543,36 @@ $key.SetAccessControl($acl) ::======================================================================================================================================== +:: This code runs to undo below registry key KMS38 protection +:: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f + +:: This option is not used in KMS38 anymore, it's here only to remove previous versions protection. + +:regdel: +param ( + [switch]$protect +) + +$SID = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544') +$Admin = ($SID.Translate([System.Security.Principal.NTAccount])).Value + +if($protect) { +$ruleArgs = @("$Admin", "Delete, SetValue", "ContainerInherit", "None", "Deny") +} else { +$ruleArgs = @("$Admin", "FullControl", "Allow") +} + +$path = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f' +$key = [Microsoft.Win32.RegistryKey]::OpenBaseKey('LocalMachine', 'Registry64').OpenSubKey($path, 'ReadWriteSubTree', 'ChangePermissions') +$acl = $key.GetAccessControl() + +$rule = [System.Security.AccessControl.RegistryAccessRule]::new.Invoke($ruleArgs) +$acl.ResetAccessRule($rule) +$key.SetAccessControl($acl) +:regdel: + +::======================================================================================================================================== + :dk_color if %_NCS% EQU 1 ( From fd1e146753783cd7e390992d9ad6b5b52623afaf Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 22 Jul 2025 04:50:50 +0530 Subject: [PATCH 048/117] dot-source scriptblock --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 60 +++++++++---------- .../Activators/HWID_Activation.cmd | 12 ++-- .../Activators/KMS38_Activation.cmd | 10 ++-- .../Activators/Ohook_Activation_AIO.cmd | 16 ++--- .../Activators/Online_KMS_Activation.cmd | 16 ++--- .../Activators/TSforge_Activation.cmd | 32 +++++----- .../Change_Office_Edition.cmd | 8 +-- .../Change_Windows_Edition.cmd | 8 +-- .../Check_Activation_Status.cmd | 2 +- .../Extract_OEM_Folder.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 12 ++-- 11 files changed, 89 insertions(+), 89 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 671bc3f..96da6e5 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -215,7 +215,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -811,7 +811,7 @@ set notworking= call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f if defined allapps call :hwiddata key if not defined key ( -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getactivationid\:.*';& ([scriptblock]::Create($f[1]))"') do (set altapplist=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getactivationid\:.*';. ([scriptblock]::Create($f[1]))"') do (set altapplist=%%a) if defined altapplist call :hwiddata key ) @@ -1225,7 +1225,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';& ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';. ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1672,7 +1672,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1768,7 +1768,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Red% "Checking Rearm [System is Rearmed]" call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -1864,7 +1864,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" @@ -2898,7 +2898,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -3410,8 +3410,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% ) exit /b @@ -3747,7 +3747,7 @@ exit /b :oh_extractdll set b= -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[System.IO.File]::ReadAllText('!_batp!') -split ':hexedit\:.*';& ([scriptblock]::Create($m[1]))" %nul2% | find /i "Error found" %nul1% && set hasherror=1 +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[System.IO.File]::ReadAllText('!_batp!') -split ':hexedit\:.*';. ([scriptblock]::Create($m[1]))" %nul2% | find /i "Error found" %nul1% && set hasherror=1 exit /b :hexedit: @@ -4386,7 +4386,7 @@ if defined _vis goto :ts_winvista set tempid= if /i %tsmethod%==KMS4k (set keytype=ks) else (set keytype=zero) -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -4676,7 +4676,7 @@ goto :ts_esu ) set resetstuff=1 -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';. ([scriptblock]::Create($f[1]))" set resetstuff= if !errorlevel!==3 ( set error=1 @@ -5160,10 +5160,10 @@ if %winbuild% GEQ 10586 ( for %%# in ("%SysPath%\spp\tokens\skus\%tsedition%\*CSVLK*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") else (set "_arr="%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") ) -if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'" %nul% +if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'" %nul% ) -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -5357,7 +5357,7 @@ echo Processing Reset of Rearm / Timers / Tamper / Lock... echo: set resetstuff=1 -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';. ([scriptblock]::Create($f[1]))" if %errorlevel%==3 ( call :dk_color %Red% "Reset Failed." @@ -5405,7 +5405,7 @@ if %errorlevel%==1 exit /b echo: echo Fetching Supported Activation IDs list. Please wait... -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':listactids\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':listactids\:.*';. ([scriptblock]::Create($f[1]))" if %errorlevel%==3 ( call :dk_color %Gray% "No supported activation ID found, aborting..." goto :dk_done @@ -5554,7 +5554,7 @@ echo Writing TrustedStore data... if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (echo Depositing Zero Confirmation ID...) ) echo: -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';. ([scriptblock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot @@ -5748,7 +5748,7 @@ echo !_License! | find /i "Retail" %nul% && (set keytype=zero) || (set keytype=k set keytype=zero ) -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':offtsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':offtsid\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set _actid=%%a) ) set "_allactid=!tsids!" @@ -14774,7 +14774,7 @@ mode 100, 36 %psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=35;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" %nul% ) -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';. ([scriptblock]::Create($f[1]))" goto dk_done :sppmgr: @@ -16652,7 +16652,7 @@ call :_taskclear-cache %nul% reg query "HKLM\%SPPk%\%_wApp%" && ( echo Removing KMS38 protection... -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';. ([scriptblock]::Create($f[1]))" %nul% reg delete "HKLM\%SPPk%\%_wApp%" /f %nul% reg query "HKLM\%SPPk%\%_wApp%" && ( call :dk_color %Red% "Failed to remove KMS38 protection." @@ -16690,7 +16690,7 @@ echo Checking SPP permission related issues... call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!]" -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';& ([scriptblock]::Create($f[1]))" %nul% +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';. ([scriptblock]::Create($f[1]))" %nul% call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!] [Failed To Fix]" @@ -16760,8 +16760,8 @@ if defined _vis ( echo: echo Reinstalling system licenses... -%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( @@ -17380,7 +17380,7 @@ exit /b :regownstart -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regown\:.*';& ([scriptblock]::Create($f[1]));" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regown\:.*';. ([scriptblock]::Create($f[1]));" exit /b :: Below code takes ownership of a volatile registry key and deletes it @@ -17553,7 +17553,7 @@ set _ntarget= set _wtarget= if %winbuild% GEQ 10240 for /f "tokens=4" %%a in ('dism /online /english /Get-TargetEditions ^| findstr /i /c:"Target Edition : "') do (if defined _dtarget (set "_dtarget= !_dtarget! %%a ") else (set "_dtarget= %%a ")) -if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) +if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';. ([scriptblock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) if %winbuild% GEQ 10240 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( if %winbuild% GEQ 17063 call :ced_edilist @@ -17759,7 +17759,7 @@ echo: call :ced_prep if defined preperror goto dk_done -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':dismapi\:.*';. ([scriptblock]::Create($f[1])) %targetedition% %key%" call :ced_postprep ) %line% @@ -17797,7 +17797,7 @@ call :ced_prep if defined preperror goto dk_done if %_stg%==0 (set stage=) else (set stage=-StageCurrent) -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';. ([scriptblock]::Create($f[1])) -SetEdition %targetedition% %stage%" call :ced_postprep %line% @@ -18541,7 +18541,7 @@ goto :oe_edition cls call :ch_getinfo call :oe_tempcleanup -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getlist\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getlist\:.*';. ([scriptblock]::Create($f[1]))" :oe_editionchange @@ -18615,7 +18615,7 @@ cls set suites= echo %list% | find /i "Suites" %nul1% && ( set suites=1 -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getappnames\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getappnames\:.*';. ([scriptblock]::Create($f[1]))" if not exist %SystemRoot%\Temp\getAppIds.txt ( %eline% echo Failed to generate available apps list. @@ -19093,7 +19093,7 @@ if not defined terminal mode 105, 32 :: Get build number for the target FFN, using build number with OfficeC2RClient.exe command to trigger updates provides accurate results set build= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getbuild\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set build=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getbuild\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set build=%%a) echo "%build%" | find /i "16." %nul% || set build= echo: diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 621e381..ea5e989 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -237,7 +237,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -511,7 +511,7 @@ set notworking= call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f if defined allapps call :hwiddata key if not defined key ( -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getactivationid\:.*';& ([scriptblock]::Create($f[1]))"') do (set altapplist=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getactivationid\:.*';. ([scriptblock]::Create($f[1]))"') do (set altapplist=%%a) if defined altapplist call :hwiddata key ) @@ -925,7 +925,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';& ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';. ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1356,7 +1356,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1452,7 +1452,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Red% "Checking Rearm [System is Rearmed]" call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -1548,7 +1548,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 8afe342..1f76cb5 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -236,7 +236,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -976,7 +976,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';& ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';. ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -1450,7 +1450,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -1546,7 +1546,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Red% "Checking Rearm [System is Rearmed]" call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -1642,7 +1642,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 6ad1f49..6f55116 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -245,7 +245,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -1074,7 +1074,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -1586,8 +1586,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% ) exit /b @@ -2038,7 +2038,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -2134,7 +2134,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Red% "Checking Rearm [System is Rearmed]" call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -2230,7 +2230,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" @@ -2905,7 +2905,7 @@ exit /b :oh_extractdll set b= -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[System.IO.File]::ReadAllText('!_batp!') -split ':hexedit\:.*';& ([scriptblock]::Create($m[1]))" %nul2% | find /i "Error found" %nul1% && set hasherror=1 +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':%_hook%\:.*';$encoded = ($f[1]) -replace '-', 'A' -replace '_', 'a';$bytes = [Con%b%vert]::FromBas%b%e64String($encoded); $PePath='%1'; $offset='%2'; $m=[System.IO.File]::ReadAllText('!_batp!') -split ':hexedit\:.*';. ([scriptblock]::Create($m[1]))" %nul2% | find /i "Error found" %nul1% && set hasherror=1 exit /b :hexedit: diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 0c6f1c2..9eaa554 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -276,7 +276,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -1359,7 +1359,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -1564,8 +1564,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% ) exit /b @@ -2623,7 +2623,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';& ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';. ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -3094,7 +3094,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -3190,7 +3190,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Red% "Checking Rearm [System is Rearmed]" call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -3286,7 +3286,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index f9db886..89b668d 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -303,7 +303,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -747,7 +747,7 @@ if defined _vis goto :ts_winvista set tempid= if /i %tsmethod%==KMS4k (set keytype=ks) else (set keytype=zero) -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -1037,7 +1037,7 @@ goto :ts_esu ) set resetstuff=1 -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';. ([scriptblock]::Create($f[1]))" set resetstuff= if !errorlevel!==3 ( set error=1 @@ -1521,10 +1521,10 @@ if %winbuild% GEQ 10586 ( for %%# in ("%SysPath%\spp\tokens\skus\%tsedition%\*CSVLK*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") else (set "_arr="%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") ) -if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'" %nul% +if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'" %nul% ) -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wintsid\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a) ) @@ -1718,7 +1718,7 @@ echo Processing Reset of Rearm / Timers / Tamper / Lock... echo: set resetstuff=1 -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';. ([scriptblock]::Create($f[1]))" if %errorlevel%==3 ( call :dk_color %Red% "Reset Failed." @@ -1766,7 +1766,7 @@ if %errorlevel%==1 exit /b echo: echo Fetching Supported Activation IDs list. Please wait... -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':listactids\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':listactids\:.*';. ([scriptblock]::Create($f[1]))" if %errorlevel%==3 ( call :dk_color %Gray% "No supported activation ID found, aborting..." goto :dk_done @@ -1915,7 +1915,7 @@ echo Writing TrustedStore data... if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (echo Depositing Zero Confirmation ID...) ) echo: -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';. ([scriptblock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot @@ -2191,7 +2191,7 @@ echo !_License! | find /i "Retail" %nul% && (set keytype=zero) || (set keytype=k set keytype=zero ) -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':offtsid\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do ( +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':offtsid\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do ( echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set _actid=%%a) ) set "_allactid=!tsids!" @@ -2312,7 +2312,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do ( if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"") ) -%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% +%psc% "$sls = Get-WmiObject %sps%; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul% call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663 echo "!allapps!" | find /i "!_actid!" %nul1% || ( @@ -2517,8 +2517,8 @@ exit /b :oh_licrefresh if exist "%SysPath%\spp\store_test\2.0\tokens.dat" ( -%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% ) exit /b @@ -2673,7 +2673,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';& ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( +if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';. ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( set winsub=1 set osSKU=%regSKU% @@ -3101,7 +3101,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE set wpainfo= set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 @@ -3197,7 +3197,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is ReArmed]" +call :dk_color %Red% "Checking Rearm [System is Rearmed]" call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) @@ -3293,7 +3293,7 @@ set showfix=1 if not defined notwinact ( call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( set "_notfoundids=Key Not Installed / Act ID Not Found" diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 3f8afb6..9621b76 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -190,7 +190,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -551,7 +551,7 @@ goto :oe_edition cls call :ch_getinfo call :oe_tempcleanup -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getlist\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getlist\:.*';. ([scriptblock]::Create($f[1]))" :oe_editionchange @@ -625,7 +625,7 @@ cls set suites= echo %list% | find /i "Suites" %nul1% && ( set suites=1 -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getappnames\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getappnames\:.*';. ([scriptblock]::Create($f[1]))" if not exist %SystemRoot%\Temp\getAppIds.txt ( %eline% echo Failed to generate available apps list. @@ -1103,7 +1103,7 @@ if not defined terminal mode 105, 32 :: Get build number for the target FFN, using build number with OfficeC2RClient.exe command to trigger updates provides accurate results set build= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getbuild\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set build=%%a) +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getbuild\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set build=%%a) echo "%build%" | find /i "16." %nul% || set build= echo: diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 05fae97..19a478b 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -195,7 +195,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -451,7 +451,7 @@ set _ntarget= set _wtarget= if %winbuild% GEQ 10240 for /f "tokens=4" %%a in ('dism /online /english /Get-TargetEditions ^| findstr /i /c:"Target Edition : "') do (if defined _dtarget (set "_dtarget= !_dtarget! %%a ") else (set "_dtarget= %%a ")) -if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) +if %winbuild% LSS 10240 for /f "tokens=4" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';. ([scriptblock]::Create($f[1])) -GetTargetEditions;" ^| findstr /i /c:"Target Edition : "') do (if defined _ptarget (set "_ptarget= !_ptarget! %%a ") else (set "_ptarget= %%a ")) if %winbuild% GEQ 10240 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( if %winbuild% GEQ 17063 call :ced_edilist @@ -657,7 +657,7 @@ echo: call :ced_prep if defined preperror goto dk_done -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':dismapi\:.*';& ([ScriptBlock]::Create($f[1])) %targetedition% %key%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':dismapi\:.*';. ([scriptblock]::Create($f[1])) %targetedition% %key%" call :ced_postprep ) %line% @@ -695,7 +695,7 @@ call :ced_prep if defined preperror goto dk_done if %_stg%==0 (set stage=) else (set stage=-StageCurrent) -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';& ([ScriptBlock]::Create($f[1])) -SetEdition %targetedition% %stage%" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':cbsxml\:.*';. ([scriptblock]::Create($f[1])) -SetEdition %targetedition% %stage%" call :ced_postprep %line% diff --git a/MAS/Separate-Files-Version/Check_Activation_Status.cmd b/MAS/Separate-Files-Version/Check_Activation_Status.cmd index 0e865d9..83f64cc 100644 --- a/MAS/Separate-Files-Version/Check_Activation_Status.cmd +++ b/MAS/Separate-Files-Version/Check_Activation_Status.cmd @@ -39,7 +39,7 @@ goto :E_Exit set "_batf=%~f0" set "_batp=%_batf:'=''%" setlocal EnableDelayedExpansion -%_psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';& ([scriptblock]::Create($f[1]))" +%_psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sppmgr\:.*';. ([scriptblock]::Create($f[1]))" :E_Exit echo. diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index bcc3a78..f4c4230 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -206,7 +206,7 @@ goto done2 ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 3112fca..a819657 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -207,7 +207,7 @@ goto dk_done ::pstst $ExecutionContext.SessionState.LanguageMode :pstst -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) +for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) if /i not "%tstresult%"=="FullLanguage" ( %eline% @@ -703,7 +703,7 @@ call :_taskclear-cache %nul% reg query "HKLM\%SPPk%\%_wApp%" && ( echo Removing KMS38 protection... -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';. ([scriptblock]::Create($f[1]))" %nul% reg delete "HKLM\%SPPk%\%_wApp%" /f %nul% reg query "HKLM\%SPPk%\%_wApp%" && ( call :dk_color %Red% "Failed to remove KMS38 protection." @@ -741,7 +741,7 @@ echo Checking SPP permission related issues... call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!]" -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';& ([scriptblock]::Create($f[1]))" %nul% +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';. ([scriptblock]::Create($f[1]))" %nul% call :checkperms if defined permerror ( call :dk_color %Red% "[!permerror!] [Failed To Fix]" @@ -811,8 +811,8 @@ if defined _vis ( echo: echo Reinstalling system licenses... -%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';& ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( @@ -1511,7 +1511,7 @@ exit /b :regownstart -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regown\:.*';& ([scriptblock]::Create($f[1]));" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regown\:.*';. ([scriptblock]::Create($f[1]));" exit /b :: Below code takes ownership of a volatile registry key and deletes it From d78e262f5bea28fee8cff8644a6a7924bda19604 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 22 Jul 2025 05:16:41 +0530 Subject: [PATCH 049/117] Clarify the on/off status in add/remove Office apps option --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 5 ++++- MAS/Separate-Files-Version/Change_Office_Edition.cmd | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 96da6e5..ab8a411 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -18539,6 +18539,7 @@ goto :oe_edition :oe_editionchangepre cls +set editedition= call :ch_getinfo call :oe_tempcleanup %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getlist\:.*';. ([scriptblock]::Create($f[1]))" @@ -18657,7 +18658,8 @@ if not defined terminal mode 98, 32 %line% echo: call :dk_color %Gray% "Target edition: %targetedition%" -call :dk_color %Gray% "You can exclude the below apps from installation." +call :dk_color %Gray% "To exclude the apps listed below from installation, toggle them from On to Off." +if defined editedition call :dk_color %Gray% "Note: The On/Off status below does not reflect the current status of the installed apps." %line% if defined suites echo: if defined Access_st echo [A] Access : %Access_st% @@ -18858,6 +18860,7 @@ goto :oe_goback ) set change=0 +set editedition=1 call :ch_getinfo cls diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 9621b76..11887cb 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -549,6 +549,7 @@ goto :oe_edition :oe_editionchangepre cls +set editedition= call :ch_getinfo call :oe_tempcleanup %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getlist\:.*';. ([scriptblock]::Create($f[1]))" @@ -667,7 +668,8 @@ if not defined terminal mode 98, 32 %line% echo: call :dk_color %Gray% "Target edition: %targetedition%" -call :dk_color %Gray% "You can exclude the below apps from installation." +call :dk_color %Gray% "To exclude the apps listed below from installation, toggle them from On to Off." +if defined editedition call :dk_color %Gray% "Note: The On/Off status below does not reflect the current status of the installed apps." %line% if defined suites echo: if defined Access_st echo [A] Access : %Access_st% @@ -868,6 +870,7 @@ goto :oe_goback ) set change=0 +set editedition=1 call :ch_getinfo cls From 2dd41cc2c5bb2dfcbc35272be752839050c7ff93 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 23 Jul 2025 17:58:38 +0530 Subject: [PATCH 050/117] Evade detection --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 114 +++++++++--------- .../Activators/HWID_Activation.cmd | 4 +- .../Activators/KMS38_Activation.cmd | 2 +- .../Activators/Ohook_Activation_AIO.cmd | 8 +- .../Activators/Online_KMS_Activation.cmd | 8 +- .../Activators/TSforge_Activation.cmd | 4 +- .../Change_Office_Edition.cmd | 2 +- .../Change_Windows_Edition.cmd | 98 +++++++-------- .../Extract_OEM_Folder.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 2 +- 10 files changed, 122 insertions(+), 122 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index ab8a411..bbb398e 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -6,7 +6,7 @@ :: For command line switches, check mass<>grave<.>dev/command_line_switches -:: If you want to better understand script, read from MAS separate files version. +:: If you want to better understand script, read from separate files version. @@ -2063,7 +2063,7 @@ exit /b :: 2nd column = Generic Retail/OEM/MAK Key :: 3rd column = SKU ID :: 4th column = Key part number -:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass grave[.]dev/hwid#manual-activation to see how it's generated) +:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass<>grave<.>dev/hwid#manual-activation to see how it's generated) :: 6th column = 1 = activation is not working (at the time of writing this), 0 = activation is working :: 7th column = Key Type :: 8th column = WMI Edition ID (For reference only) @@ -2525,7 +2525,7 @@ call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Of ::======================================================================================================================================== -:: mass grave[.]dev/office-license-is-not-genuine +:: mass<>grave<.>dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear :: Script already is using MAK instead of GVLK so it won't appear anyway, but registry keys are added incase Office installs default GVLK grace key for volume products @@ -3830,13 +3830,13 @@ $MemoryStream.Close() :: :: The files are encoded in base64 to make AIO version. :: -:: mass grave[.]dev/ohook +:: mass<>grave<.>dev/ohook :: Here you can find the files source code and info on how to rebuild the identical sppc.dll files :: :: stackoverflow.com/a/35335273 :: Here you can check how to extract sppc.dll files from base64 :: -:: For any further question, feel free to contact us on mass grave[.]dev/contactus +:: For any further question, feel free to contact us on mass<>grave<.>dev/contactus :: ::======================================================================================================================================== :: @@ -5082,7 +5082,7 @@ call :ts_process ::======================================================================================================================================== -:: mass grave[.]dev/office-license-is-not-genuine +:: mass<>grave<.>dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" @@ -13098,7 +13098,7 @@ if %winbuild% GEQ 9200 ( for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath /reg:32" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" if defined _C16R ( -REM mass grave[.]dev/office-license-is-not-genuine +REM mass<>grave<.>dev/office-license-is-not-genuine set _server=10.0.0.10 call :_taskregserv echo Keeping the non-existent IP address 10.0.0.10 as %KS% Server. @@ -13436,7 +13436,7 @@ exit /b ::============================================================================ :: -:: Homepage: mass grave[.]dev +:: Homepage: mass<>grave<.>dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -14045,7 +14045,7 @@ echo ___________________________________________________________________________ echo: echo This Script is a part of MAS project. echo: -echo Homepage: mass grave[.]dev +echo Homepage: mass%w%grave%w%.dev echo Email: mas.help@outlook.com )>"%_dest%\Info.txt" exit /b @@ -18244,55 +18244,55 @@ if %winbuild% GEQ 22000 exit /b ) if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*CorEdition~*.mum" (set Cor=Cor) else (set Cor=) -set h= +set w= for %%# in ( -XGVPP-NMH47-7TTHJ-W3FW7-8HV%h%2C__OEM:NONSLP_Enterprise -D6RD9-D4N8T-RT9QX-YW6YT-FCW%h%WJ______Retail_Starter -3V6Q6-NQXCX-V8YXR-9QCYV-QPF%h%CT__Volume:MAK_EnterpriseN -3NFXW-2T27M-2BDW6-4GHRV-68X%h%RX______Retail_StarterN -VK7JG-NPHTM-C97JM-9MPGT-3V6%h%6T______Retail_Professional -2B87N-8KFHP-DKV6R-Y2C8J-PKC%h%KT______Retail_ProfessionalN -4CPRK-NM3K3-X6XXQ-RXX86-WXC%h%HW______Retail_CoreN -N2434-X9D7W-8PF6X-8DV9T-8TY%h%MD______Retail_CoreCountrySpecific -BT79Q-G7N6G-PGBYW-4YWX6-6F4%h%BT______Retail_CoreSingleLanguage -YTMG3-N6DKC-DKB77-7M9GH-8HV%h%X7______Retail_Core -XKCNC-J26Q9-KFHD2-FKTHY-KD7%h%2Y__OEM:NONSLP_PPIPro -YNMGQ-8RYV3-4PGQ3-C8XTP-7CF%h%BY______Retail_Education -84NGF-MHBT6-FXBX8-QWJK7-DRR%h%8H______Retail_EducationN -KCNVH-YKWX8-GJJB9-H9FDT-6F7%h%W2__Volume:MAK_EnterpriseS_VB -43TBQ-NH92J-XKTM7-KT3KK-P39%h%PB__OEM:NONSLP_EnterpriseS_RS5 -NK96Y-D9CD8-W44CQ-R8YTK-DYJ%h%WX__OEM:NONSLP_EnterpriseS_RS1 -FWN7H-PF93Q-4GGP8-M8RF3-MDW%h%WW__OEM:NONSLP_EnterpriseS_TH -RQFNW-9TPM3-JQ73T-QV4VQ-DV9%h%PT__Volume:MAK_EnterpriseSN_VB -M33WV-NHY3C-R7FPM-BQGPT-239%h%PG__Volume:MAK_EnterpriseSN_RS5 -2DBW3-N2PJG-MVHW3-G7TDK-9HK%h%R4__Volume:MAK_EnterpriseSN_RS1 -NTX6B-BRYC2-K6786-F6MVQ-M7V%h%2X__Volume:MAK_EnterpriseSN_TH -G3KNM-CHG6T-R36X3-9QDG6-8M8%h%K9______Retail_ProfessionalSingleLanguage -HNGCC-Y38KG-QVK8D-WMWRK-X86%h%VK______Retail_ProfessionalCountrySpecific -DXG7C-N36C4-C4HTG-X4T3X-2YV%h%77______Retail_ProfessionalWorkstation -WYPNQ-8C467-V2W6J-TX4WX-WT2%h%RQ______Retail_ProfessionalWorkstationN -8PTT6-RNW4C-6V7J2-C2D3X-MHB%h%PB______Retail_ProfessionalEducation -GJTYN-HDMQY-FRR76-HVGC7-QPF%h%8P______Retail_ProfessionalEducationN -C4NTJ-CX6Q2-VXDMR-XVKGM-F9D%h%JC__Volume:MAK_EnterpriseG -46PN6-R9BK9-CVHKB-HWQ9V-MBJ%h%Y8__Volume:MAK_EnterpriseGN -NJCF7-PW8QT-3324D-688JX-2YV%h%66______Retail_ServerRdsh -XQQYW-NFFMW-XJPBH-K8732-CKF%h%FD______OEM:DM_IoTEnterprise -QPM6N-7J2WJ-P88HH-P3YRH-YY7%h%4H__OEM:NONSLP_IoTEnterpriseS -K9VKN-3BGWV-Y624W-MCRMQ-BHD%h%CD______Retail_CloudEditionN -KY7PN-VR6RX-83W6Y-6DDYQ-T6R%h%4W______Retail_CloudEdition -V3WVW-N2PV2-CGWC3-34QGF-VMJ%h%2C______Retail_Cloud -NH9J3-68WK7-6FB93-4K3DF-DJ4%h%F6______Retail_CloudN -2HN6V-HGTM8-6C97C-RK67V-JQP%h%FD______Retail_CloudE -WC2BQ-8NRM3-FDDYY-2BFGV-KHK%h%QY_Volume:GVLK_ServerStandard%Cor%_RS1 -CB7KF-BWN84-R7R2Y-793K2-8XD%h%DG_Volume:GVLK_ServerDatacenter%Cor%_RS1 -JCKRF-N37P4-C2D82-9YXRT-4M6%h%3B_Volume:GVLK_ServerSolution_RS1 -QN4C6-GBJD2-FB422-GHWJK-GJG%h%2R_Volume:GVLK_ServerCloudStorage_RS1 -VP34G-4NPPG-79JTQ-864T4-R3M%h%QX_Volume:GVLK_ServerAzureCor_RS1 -9JQNQ-V8HQ6-PKB8H-GGHRY-R62%h%H6______Retail_ServerAzureNano_RS1 -VN8D3-PR82H-DB6BJ-J9P4M-92F%h%6J______Retail_ServerStorageStandard_RS1 -48TQX-NVK3R-D8QR3-GTHHM-8FH%h%XC______Retail_ServerStorageWorkgroup_RS1 -2HXDN-KRXHB-GPYC7-YCKFJ-7FV%h%DG_Volume:GVLK_ServerDatacenterACor_RS3 -PTXN8-JFHJM-4WC78-MPCBR-9W4%h%KR_Volume:GVLK_ServerStandardACor_RS3 +XGVPP-NMH47-7TTHJ-W3FW7-8HV%w%2C__OEM:NONSLP_Enterprise +D6RD9-D4N8T-RT9QX-YW6YT-FCW%w%WJ______Retail_Starter +3V6Q6-NQXCX-V8YXR-9QCYV-QPF%w%CT__Volume:MAK_EnterpriseN +3NFXW-2T27M-2BDW6-4GHRV-68X%w%RX______Retail_StarterN +VK7JG-NPHTM-C97JM-9MPGT-3V6%w%6T______Retail_Professional +2B87N-8KFHP-DKV6R-Y2C8J-PKC%w%KT______Retail_ProfessionalN +4CPRK-NM3K3-X6XXQ-RXX86-WXC%w%HW______Retail_CoreN +N2434-X9D7W-8PF6X-8DV9T-8TY%w%MD______Retail_CoreCountrySpecific +BT79Q-G7N6G-PGBYW-4YWX6-6F4%w%BT______Retail_CoreSingleLanguage +YTMG3-N6DKC-DKB77-7M9GH-8HV%w%X7______Retail_Core +XKCNC-J26Q9-KFHD2-FKTHY-KD7%w%2Y__OEM:NONSLP_PPIPro +YNMGQ-8RYV3-4PGQ3-C8XTP-7CF%w%BY______Retail_Education +84NGF-MHBT6-FXBX8-QWJK7-DRR%w%8H______Retail_EducationN +KCNVH-YKWX8-GJJB9-H9FDT-6F7%w%W2__Volume:MAK_EnterpriseS_VB +43TBQ-NH92J-XKTM7-KT3KK-P39%w%PB__OEM:NONSLP_EnterpriseS_RS5 +NK96Y-D9CD8-W44CQ-R8YTK-DYJ%w%WX__OEM:NONSLP_EnterpriseS_RS1 +FWN7H-PF93Q-4GGP8-M8RF3-MDW%w%WW__OEM:NONSLP_EnterpriseS_TH +RQFNW-9TPM3-JQ73T-QV4VQ-DV9%w%PT__Volume:MAK_EnterpriseSN_VB +M33WV-NHY3C-R7FPM-BQGPT-239%w%PG__Volume:MAK_EnterpriseSN_RS5 +2DBW3-N2PJG-MVHW3-G7TDK-9HK%w%R4__Volume:MAK_EnterpriseSN_RS1 +NTX6B-BRYC2-K6786-F6MVQ-M7V%w%2X__Volume:MAK_EnterpriseSN_TH +G3KNM-CHG6T-R36X3-9QDG6-8M8%w%K9______Retail_ProfessionalSingleLanguage +HNGCC-Y38KG-QVK8D-WMWRK-X86%w%VK______Retail_ProfessionalCountrySpecific +DXG7C-N36C4-C4HTG-X4T3X-2YV%w%77______Retail_ProfessionalWorkstation +WYPNQ-8C467-V2W6J-TX4WX-WT2%w%RQ______Retail_ProfessionalWorkstationN +8PTT6-RNW4C-6V7J2-C2D3X-MHB%w%PB______Retail_ProfessionalEducation +GJTYN-HDMQY-FRR76-HVGC7-QPF%w%8P______Retail_ProfessionalEducationN +C4NTJ-CX6Q2-VXDMR-XVKGM-F9D%w%JC__Volume:MAK_EnterpriseG +46PN6-R9BK9-CVHKB-HWQ9V-MBJ%w%Y8__Volume:MAK_EnterpriseGN +NJCF7-PW8QT-3324D-688JX-2YV%w%66______Retail_ServerRdsh +XQQYW-NFFMW-XJPBH-K8732-CKF%w%FD______OEM:DM_IoTEnterprise +QPM6N-7J2WJ-P88HH-P3YRH-YY7%w%4H__OEM:NONSLP_IoTEnterpriseS +K9VKN-3BGWV-Y624W-MCRMQ-BHD%w%CD______Retail_CloudEditionN +KY7PN-VR6RX-83W6Y-6DDYQ-T6R%w%4W______Retail_CloudEdition +V3WVW-N2PV2-CGWC3-34QGF-VMJ%w%2C______Retail_Cloud +NH9J3-68WK7-6FB93-4K3DF-DJ4%w%F6______Retail_CloudN +2HN6V-HGTM8-6C97C-RK67V-JQP%w%FD______Retail_CloudE +WC2BQ-8NRM3-FDDYY-2BFGV-KHK%w%QY_Volume:GVLK_ServerStandard%Cor%_RS1 +CB7KF-BWN84-R7R2Y-793K2-8XD%w%DG_Volume:GVLK_ServerDatacenter%Cor%_RS1 +JCKRF-N37P4-C2D82-9YXRT-4M6%w%3B_Volume:GVLK_ServerSolution_RS1 +QN4C6-GBJD2-FB422-GHWJK-GJG%w%2R_Volume:GVLK_ServerCloudStorage_RS1 +VP34G-4NPPG-79JTQ-864T4-R3M%w%QX_Volume:GVLK_ServerAzureCor_RS1 +9JQNQ-V8HQ6-PKB8H-GGHRY-R62%w%H6______Retail_ServerAzureNano_RS1 +VN8D3-PR82H-DB6BJ-J9P4M-92F%w%6J______Retail_ServerStorageStandard_RS1 +48TQX-NVK3R-D8QR3-GTHHM-8FH%w%XC______Retail_ServerStorageWorkgroup_RS1 +2HXDN-KRXHB-GPYC7-YCKFJ-7FV%w%DG_Volume:GVLK_ServerDatacenterACor_RS3 +PTXN8-JFHJM-4WC78-MPCBR-9W4%w%KR_Volume:GVLK_ServerStandardACor_RS3 ) do ( for /f "tokens=1-4 delims=_" %%A in ("%%#") do if /i %targetedition%==%%C ( diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index ea5e989..0018094 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass grave[.]dev +:: Homepage: mass<>grave<.>dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -1747,7 +1747,7 @@ exit /b :: 2nd column = Generic Retail/OEM/MAK Key :: 3rd column = SKU ID :: 4th column = Key part number -:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass grave[.]dev/hwid#manual-activation to see how it's generated) +:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass<>grave<.>dev/hwid#manual-activation to see how it's generated) :: 6th column = 1 = activation is not working (at the time of writing this), 0 = activation is working :: 7th column = Key Type :: 8th column = WMI Edition ID (For reference only) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 1f76cb5..6968f28 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass grave[.]dev +:: Homepage: mass<>grave<.>dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 6f55116..e7bcb18 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass grave[.]dev +:: Homepage: mass<>grave<.>dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -701,7 +701,7 @@ call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Of ::======================================================================================================================================== -:: mass grave[.]dev/office-license-is-not-genuine +:: mass<>grave<.>dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear :: Script already is using MAK instead of GVLK so it won't appear anyway, but registry keys are added incase Office installs default GVLK grace key for volume products @@ -2988,13 +2988,13 @@ $MemoryStream.Close() :: :: The files are encoded in base64 to make AIO version. :: -:: mass grave[.]dev/ohook +:: mass<>grave<.>dev/ohook :: Here you can find the files source code and info on how to rebuild the identical sppc.dll files :: :: stackoverflow.com/a/35335273 :: Here you can check how to extract sppc.dll files from base64 :: -:: For any further question, feel free to contact us on mass grave[.]dev/contactus +:: For any further question, feel free to contact us on mass<>grave<.>dev/contactus :: ::======================================================================================================================================== :: diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 9eaa554..058915d 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass grave[.]dev +:: Homepage: mass<>grave<.>dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -1004,7 +1004,7 @@ if %winbuild% GEQ 9200 ( for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath /reg:32" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" if defined _C16R ( -REM mass grave[.]dev/office-license-is-not-genuine +REM mass<>grave<.>dev/office-license-is-not-genuine set _server=10.0.0.10 call :_taskregserv echo Keeping the non-existent IP address 10.0.0.10 as %KS% Server. @@ -1673,7 +1673,7 @@ exit /b ::============================================================================ :: -:: Homepage: mass grave[.]dev +:: Homepage: mass<>grave<.>dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -2282,7 +2282,7 @@ echo ___________________________________________________________________________ echo: echo This Script is a part of MAS project. echo: -echo Homepage: mass grave[.]dev +echo Homepage: mass%w%grave%w%.dev echo Email: mas.help@outlook.com )>"%_dest%\Info.txt" exit /b diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 89b668d..8de0dd8 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass grave[.]dev +:: Homepage: mass<>grave<.>dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -1443,7 +1443,7 @@ call :ts_process ::======================================================================================================================================== -:: mass grave[.]dev/office-license-is-not-genuine +:: mass<>grave<.>dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 11887cb..58ac14d 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass grave[.]dev +:: Homepage: mass<>grave<.>dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 19a478b..b0d0231 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass grave[.]dev +:: Homepage: mass<>grave<.>dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -1361,55 +1361,55 @@ if %winbuild% GEQ 22000 exit /b ) if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*CorEdition~*.mum" (set Cor=Cor) else (set Cor=) -set h= +set w= for %%# in ( -XGVPP-NMH47-7TTHJ-W3FW7-8HV%h%2C__OEM:NONSLP_Enterprise -D6RD9-D4N8T-RT9QX-YW6YT-FCW%h%WJ______Retail_Starter -3V6Q6-NQXCX-V8YXR-9QCYV-QPF%h%CT__Volume:MAK_EnterpriseN -3NFXW-2T27M-2BDW6-4GHRV-68X%h%RX______Retail_StarterN -VK7JG-NPHTM-C97JM-9MPGT-3V6%h%6T______Retail_Professional -2B87N-8KFHP-DKV6R-Y2C8J-PKC%h%KT______Retail_ProfessionalN -4CPRK-NM3K3-X6XXQ-RXX86-WXC%h%HW______Retail_CoreN -N2434-X9D7W-8PF6X-8DV9T-8TY%h%MD______Retail_CoreCountrySpecific -BT79Q-G7N6G-PGBYW-4YWX6-6F4%h%BT______Retail_CoreSingleLanguage -YTMG3-N6DKC-DKB77-7M9GH-8HV%h%X7______Retail_Core -XKCNC-J26Q9-KFHD2-FKTHY-KD7%h%2Y__OEM:NONSLP_PPIPro -YNMGQ-8RYV3-4PGQ3-C8XTP-7CF%h%BY______Retail_Education -84NGF-MHBT6-FXBX8-QWJK7-DRR%h%8H______Retail_EducationN -KCNVH-YKWX8-GJJB9-H9FDT-6F7%h%W2__Volume:MAK_EnterpriseS_VB -43TBQ-NH92J-XKTM7-KT3KK-P39%h%PB__OEM:NONSLP_EnterpriseS_RS5 -NK96Y-D9CD8-W44CQ-R8YTK-DYJ%h%WX__OEM:NONSLP_EnterpriseS_RS1 -FWN7H-PF93Q-4GGP8-M8RF3-MDW%h%WW__OEM:NONSLP_EnterpriseS_TH -RQFNW-9TPM3-JQ73T-QV4VQ-DV9%h%PT__Volume:MAK_EnterpriseSN_VB -M33WV-NHY3C-R7FPM-BQGPT-239%h%PG__Volume:MAK_EnterpriseSN_RS5 -2DBW3-N2PJG-MVHW3-G7TDK-9HK%h%R4__Volume:MAK_EnterpriseSN_RS1 -NTX6B-BRYC2-K6786-F6MVQ-M7V%h%2X__Volume:MAK_EnterpriseSN_TH -G3KNM-CHG6T-R36X3-9QDG6-8M8%h%K9______Retail_ProfessionalSingleLanguage -HNGCC-Y38KG-QVK8D-WMWRK-X86%h%VK______Retail_ProfessionalCountrySpecific -DXG7C-N36C4-C4HTG-X4T3X-2YV%h%77______Retail_ProfessionalWorkstation -WYPNQ-8C467-V2W6J-TX4WX-WT2%h%RQ______Retail_ProfessionalWorkstationN -8PTT6-RNW4C-6V7J2-C2D3X-MHB%h%PB______Retail_ProfessionalEducation -GJTYN-HDMQY-FRR76-HVGC7-QPF%h%8P______Retail_ProfessionalEducationN -C4NTJ-CX6Q2-VXDMR-XVKGM-F9D%h%JC__Volume:MAK_EnterpriseG -46PN6-R9BK9-CVHKB-HWQ9V-MBJ%h%Y8__Volume:MAK_EnterpriseGN -NJCF7-PW8QT-3324D-688JX-2YV%h%66______Retail_ServerRdsh -XQQYW-NFFMW-XJPBH-K8732-CKF%h%FD______OEM:DM_IoTEnterprise -QPM6N-7J2WJ-P88HH-P3YRH-YY7%h%4H__OEM:NONSLP_IoTEnterpriseS -K9VKN-3BGWV-Y624W-MCRMQ-BHD%h%CD______Retail_CloudEditionN -KY7PN-VR6RX-83W6Y-6DDYQ-T6R%h%4W______Retail_CloudEdition -V3WVW-N2PV2-CGWC3-34QGF-VMJ%h%2C______Retail_Cloud -NH9J3-68WK7-6FB93-4K3DF-DJ4%h%F6______Retail_CloudN -2HN6V-HGTM8-6C97C-RK67V-JQP%h%FD______Retail_CloudE -WC2BQ-8NRM3-FDDYY-2BFGV-KHK%h%QY_Volume:GVLK_ServerStandard%Cor%_RS1 -CB7KF-BWN84-R7R2Y-793K2-8XD%h%DG_Volume:GVLK_ServerDatacenter%Cor%_RS1 -JCKRF-N37P4-C2D82-9YXRT-4M6%h%3B_Volume:GVLK_ServerSolution_RS1 -QN4C6-GBJD2-FB422-GHWJK-GJG%h%2R_Volume:GVLK_ServerCloudStorage_RS1 -VP34G-4NPPG-79JTQ-864T4-R3M%h%QX_Volume:GVLK_ServerAzureCor_RS1 -9JQNQ-V8HQ6-PKB8H-GGHRY-R62%h%H6______Retail_ServerAzureNano_RS1 -VN8D3-PR82H-DB6BJ-J9P4M-92F%h%6J______Retail_ServerStorageStandard_RS1 -48TQX-NVK3R-D8QR3-GTHHM-8FH%h%XC______Retail_ServerStorageWorkgroup_RS1 -2HXDN-KRXHB-GPYC7-YCKFJ-7FV%h%DG_Volume:GVLK_ServerDatacenterACor_RS3 -PTXN8-JFHJM-4WC78-MPCBR-9W4%h%KR_Volume:GVLK_ServerStandardACor_RS3 +XGVPP-NMH47-7TTHJ-W3FW7-8HV%w%2C__OEM:NONSLP_Enterprise +D6RD9-D4N8T-RT9QX-YW6YT-FCW%w%WJ______Retail_Starter +3V6Q6-NQXCX-V8YXR-9QCYV-QPF%w%CT__Volume:MAK_EnterpriseN +3NFXW-2T27M-2BDW6-4GHRV-68X%w%RX______Retail_StarterN +VK7JG-NPHTM-C97JM-9MPGT-3V6%w%6T______Retail_Professional +2B87N-8KFHP-DKV6R-Y2C8J-PKC%w%KT______Retail_ProfessionalN +4CPRK-NM3K3-X6XXQ-RXX86-WXC%w%HW______Retail_CoreN +N2434-X9D7W-8PF6X-8DV9T-8TY%w%MD______Retail_CoreCountrySpecific +BT79Q-G7N6G-PGBYW-4YWX6-6F4%w%BT______Retail_CoreSingleLanguage +YTMG3-N6DKC-DKB77-7M9GH-8HV%w%X7______Retail_Core +XKCNC-J26Q9-KFHD2-FKTHY-KD7%w%2Y__OEM:NONSLP_PPIPro +YNMGQ-8RYV3-4PGQ3-C8XTP-7CF%w%BY______Retail_Education +84NGF-MHBT6-FXBX8-QWJK7-DRR%w%8H______Retail_EducationN +KCNVH-YKWX8-GJJB9-H9FDT-6F7%w%W2__Volume:MAK_EnterpriseS_VB +43TBQ-NH92J-XKTM7-KT3KK-P39%w%PB__OEM:NONSLP_EnterpriseS_RS5 +NK96Y-D9CD8-W44CQ-R8YTK-DYJ%w%WX__OEM:NONSLP_EnterpriseS_RS1 +FWN7H-PF93Q-4GGP8-M8RF3-MDW%w%WW__OEM:NONSLP_EnterpriseS_TH +RQFNW-9TPM3-JQ73T-QV4VQ-DV9%w%PT__Volume:MAK_EnterpriseSN_VB +M33WV-NHY3C-R7FPM-BQGPT-239%w%PG__Volume:MAK_EnterpriseSN_RS5 +2DBW3-N2PJG-MVHW3-G7TDK-9HK%w%R4__Volume:MAK_EnterpriseSN_RS1 +NTX6B-BRYC2-K6786-F6MVQ-M7V%w%2X__Volume:MAK_EnterpriseSN_TH +G3KNM-CHG6T-R36X3-9QDG6-8M8%w%K9______Retail_ProfessionalSingleLanguage +HNGCC-Y38KG-QVK8D-WMWRK-X86%w%VK______Retail_ProfessionalCountrySpecific +DXG7C-N36C4-C4HTG-X4T3X-2YV%w%77______Retail_ProfessionalWorkstation +WYPNQ-8C467-V2W6J-TX4WX-WT2%w%RQ______Retail_ProfessionalWorkstationN +8PTT6-RNW4C-6V7J2-C2D3X-MHB%w%PB______Retail_ProfessionalEducation +GJTYN-HDMQY-FRR76-HVGC7-QPF%w%8P______Retail_ProfessionalEducationN +C4NTJ-CX6Q2-VXDMR-XVKGM-F9D%w%JC__Volume:MAK_EnterpriseG +46PN6-R9BK9-CVHKB-HWQ9V-MBJ%w%Y8__Volume:MAK_EnterpriseGN +NJCF7-PW8QT-3324D-688JX-2YV%w%66______Retail_ServerRdsh +XQQYW-NFFMW-XJPBH-K8732-CKF%w%FD______OEM:DM_IoTEnterprise +QPM6N-7J2WJ-P88HH-P3YRH-YY7%w%4H__OEM:NONSLP_IoTEnterpriseS +K9VKN-3BGWV-Y624W-MCRMQ-BHD%w%CD______Retail_CloudEditionN +KY7PN-VR6RX-83W6Y-6DDYQ-T6R%w%4W______Retail_CloudEdition +V3WVW-N2PV2-CGWC3-34QGF-VMJ%w%2C______Retail_Cloud +NH9J3-68WK7-6FB93-4K3DF-DJ4%w%F6______Retail_CloudN +2HN6V-HGTM8-6C97C-RK67V-JQP%w%FD______Retail_CloudE +WC2BQ-8NRM3-FDDYY-2BFGV-KHK%w%QY_Volume:GVLK_ServerStandard%Cor%_RS1 +CB7KF-BWN84-R7R2Y-793K2-8XD%w%DG_Volume:GVLK_ServerDatacenter%Cor%_RS1 +JCKRF-N37P4-C2D82-9YXRT-4M6%w%3B_Volume:GVLK_ServerSolution_RS1 +QN4C6-GBJD2-FB422-GHWJK-GJG%w%2R_Volume:GVLK_ServerCloudStorage_RS1 +VP34G-4NPPG-79JTQ-864T4-R3M%w%QX_Volume:GVLK_ServerAzureCor_RS1 +9JQNQ-V8HQ6-PKB8H-GGHRY-R62%w%H6______Retail_ServerAzureNano_RS1 +VN8D3-PR82H-DB6BJ-J9P4M-92F%w%6J______Retail_ServerStorageStandard_RS1 +48TQX-NVK3R-D8QR3-GTHHM-8FH%w%XC______Retail_ServerStorageWorkgroup_RS1 +2HXDN-KRXHB-GPYC7-YCKFJ-7FV%w%DG_Volume:GVLK_ServerDatacenterACor_RS3 +PTXN8-JFHJM-4WC78-MPCBR-9W4%w%KR_Volume:GVLK_ServerStandardACor_RS3 ) do ( for /f "tokens=1-4 delims=_" %%A in ("%%#") do if /i %targetedition%==%%C ( diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index f4c4230..a007f6b 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass grave[.]dev +:: Homepage: mass<>grave<.>dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index a819657..ac66d6e 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass grave[.]dev +:: Homepage: mass<>grave<.>dev :: Email: mas.help@outlook.com :: ::============================================================================ From 0f38fa3cef8a3e61fd9d9b7fb9829867b391d724 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 2 Aug 2025 21:59:38 +0530 Subject: [PATCH 051/117] Streamline diagnostic tests --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 664 +++++++++++------- .../Activators/HWID_Activation.cmd | 664 +++++++++++------- .../Activators/KMS38_Activation.cmd | 664 +++++++++++------- .../Activators/Ohook_Activation_AIO.cmd | 664 +++++++++++------- .../Activators/Online_KMS_Activation.cmd | 664 +++++++++++------- .../Activators/TSforge_Activation.cmd | 664 +++++++++++------- 6 files changed, 2544 insertions(+), 1440 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index bbb398e..eb54941 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1527,40 +1527,118 @@ exit /b set showfix= call :dk_chkmal +::============================== + :: Check Sandboxing sc query Null %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]" +call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly]" +if not defined showfix ( +echo: call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." echo: ) +set error=1 +set showfix=1 +) -::======================================================================================================================================== +::============================== + +:: Check WinPE mode + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( + +call :dk_color %Red% "Checking WinPE [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Safe mode + +if defined safeboot_option ( +call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check ImageState +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states + +for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) + +if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( +call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" +echo "%imagestate%" | find /i "RESEAL" %nul% && ( +if not defined showfix ( +echo: +call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." +echo: +) +set error=1 +set showfix=1 +) +echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +) +) + +::============================== :: Check corrupt services set serv_cor= for %%# in (%_serv%) do ( +set _regcorr= set _corrupt= sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 -for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _corrupt ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || set _corrupt=1 +for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) ) -if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#") else (set "serv_cor=%%#")) +if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) ) if defined serv_cor ( -set error=1 -set showfix=1 call :dk_color %Red% "Checking Corrupt Services [%serv_cor%]" + +if not defined showfix ( +echo: +if /i "%serv_cor%"=="sppsvc-RegistryError" ( +set fixes=%fixes% %mas%fix_service +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" +) else ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check disabled services @@ -1595,11 +1673,26 @@ if defined serv_cste (set "serv_cste=!serv_cste! %%#") else (set "serv_cste=%%#" if defined serv_csts call :dk_color %Gray% "Enabling Disabled Services [Successful] [%serv_csts%]" if defined serv_cste ( -set error=1 call :dk_color %Red% "Enabling Disabled Services [Failed] [%serv_cste%]" + +if not defined showfix ( +echo: +echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( +echo A registry fix has been applied to enable the disabled service. +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +) || ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check if the services are able to run or not :: Workarounds are added to get correct status and error code because sc query doesn't output correct results in some conditions @@ -1621,119 +1714,25 @@ if defined checkerror if defined serv_e (set "serv_e=!serv_e!, %%#-!errorcode!") ) if defined serv_e ( -set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" -echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." + +if not defined showfix ( +set listwospp=%_serv:sppsvc=% +echo %serv_e% | findstr /i "!listwospp!" %nul% && ( set showfix=1 -) -echo %serv_e% | findstr /i "sppsvc-1060" %nul% && ( -set fixes=%fixes% %mas%fix_service -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" -set showfix=1 -) -) - -::======================================================================================================================================== - -:: Various error checks - -if defined safeboot_option ( -set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option%] " %Blue% "[Safe mode found. Run in normal mode.]" -) - - -:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states - -for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) - -if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( -call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" -echo "%imagestate%" | find /i "RESEAL" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." -) -echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: ) ) - - -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]" ) +::============================== -set wpainfo= -set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) -echo "%wpainfo%" | find /i "Error Found" %nul% && ( -set error=1 -set wpaerror=1 -call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" -) || ( -echo Checking WPA Registry Count [%wpainfo%] -) - - -if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( -call :dk_color %Red% "Checking Eval Packages [Non-Eval Licenses are installed in Eval Windows]" -set fixes=%fixes% %mas%evaluation_editions -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" -) -) - - -set osedition=0 -if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" -if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" -%chkedi% do if not errorlevel 1 (call set "osedition=%%a") - -if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" - -:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional - -if not %osedition%==0 ( -if "%osSKU%"=="164" set osedition=ProfessionalEducation -if "%osSKU%"=="165" set osedition=ProfessionalEducationN -) - -if not defined notwinact ( -if %osedition%==0 ( -call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" -) else ( - -if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( -set skunotfound=1 -call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" -) - -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( -call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" -) -) -) -) - - -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 ( -set error=1 -call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%" -) - +:: Check WMI set wmifailed= if %_wmic% EQU 1 wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% @@ -1741,168 +1740,94 @@ if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Objec if %errorlevel% NEQ 0 set wmifailed=1 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 ( -set error=1 call :dk_color %Red% "Checking WMI [Not Working]" -if not defined showfix call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." -set showfix=1 -) - -if not defined notwinact ( -if %winbuild% GEQ 10240 ( -%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" -set /a "sum/=3" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." +echo: ) -) else ( -%nul% set /a "sum=%slcSKU%+%wmiSKU%" -set /a "sum/=2" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" -) -) -) - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is Rearmed]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) +::============================== -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." -) - - -:: 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" ( -echo Checking Eval WLMS Service [Found] -) - - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %mas%in-place_repair_upgrade" -) - - -for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) -) -if defined _sppint ( -echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) || ( -echo Checking SPP In IFEO [%_sppint%] -) -) - - -if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( -reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% -call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" -%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" -) - +:: Check SPP Registry Key if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" +if not defined showfix ( +echo: set fixes=%fixes% %mas%issues_due_to_gaming_spoofers call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +echo: +) set error=1 set showfix=1 ) +::============================== + +:: Check TokenStore registry key set tokenstore= if %winbuild% GEQ 7600 ( for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v TokenStore %nul6%') do call set "tokenstore=%%b" if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform" + if %winbuild% GEQ 9200 if /i not "!tokenstore!"=="%SysPath%\spp\store" if /i not "!tokenstore!"=="%SysPath%\spp\store\2.0" if /i not "!tokenstore!"=="%SysPath%\spp\store_test\2.0" ( +call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set toerr=1 set error=1 set showfix=1 -call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) ) +::============================== + :: This code creates token folder only if it's missing and sets default permission for it if %winbuild% GEQ 7600 if not defined toerr if not exist "%tokenstore%\" ( + mkdir "%tokenstore%" %nul% + if %winbuild% LSS 9200 set "d=$sddl = 'O:NSG:NSD:AI(A;OICIID;FA;;;SY)(A;OICIID;FA;;;BA)(A;OICIID;FA;;;NS)';" if %winbuild% GEQ 9200 set "d=$sddl = 'O:BAG:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICIIO;GR;;;BU)(A;;FR;;;BU)(A;OICI;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)';" set "d=!d! $AclObject = New-Object System.Security.AccessControl.DirectorySecurity;" set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" %psc% "!d!" %nul% + if exist "%tokenstore%\" ( call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]" ) else ( call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set error=1 set showfix=1 ) ) - -if not defined notwinact ( -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -set "_notfoundids=Key Not Installed / Act ID Not Found" -call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined allapps ( -set error=1 -set "_notfoundids=Not found" -) -call :dk_color %Red% "Checking Activation IDs [!_notfoundids!]" -) -) -) - - -if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( -set error=1 -call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" -) - - -if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) -echo !taskinfo! | find /i "Ready" %nul% || ( -reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]" -if not defined error call :dk_color %Blue% "Reboot your machine using the restart option." -) -) -) - +::============================== :: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. set permerror= -if %winbuild% GEQ 9200 if not defined ps32onArm ( +if %winbuild% GEQ 9200 if not defined toerr if not defined ps32onArm if exist "%tokenstore%\" ( for %%# in ( "%tokenstore%+FullControl" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" @@ -1930,29 +1855,288 @@ if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP" ) if defined permerror ( -set error=1 call :dk_color %Red% "Checking SPP Permissions [!permerror!]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) -) - - -:: If required services are not disabled or corrupted + if there is any error + SoftwareLicensingService errorlevel is not Zero + no fix was shown before - -if not defined serv_cor if not defined serv_cste if defined error if /i not %error_code%==0 if not defined showfix ( -if not defined permerror if defined wpaerror (call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." & set showfix=1) if not defined showfix ( -set showfix=1 +echo: call :dk_color %Blue% "%_fixmsg%" -if not defined permerror call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 ) ) -if not defined showfix if defined wpaerror ( +::============================== + +:: Check WPA Registry Errors + +set chkalp= +set wpainfo=NotFound +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=0123456789" %%i in ("%wpainfo%") do set chkalp=%%i + +if defined chkalp ( +call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" +if not defined showfix ( +echo "%wpainfo%" | find /i "Error Found" %nul% && ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +set error=1 set showfix=1 -call :dk_color %Blue% "If activation fails then go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." ) +) +set wpainfo=a +) + +if not defined chkalp ( +if %wpainfo% GEQ 5000 ( +call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" +echo: +call :dk_color %Blue% "A large number of WPA registries have been found, which may cause high CPU usage." +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +) else ( +echo Checking WPA Registry Count [%wpainfo%] +) +) + +::============================== + +:: Check Rearm + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( +call :dk_color %Red% "Checking Rearm [System is Rearmed]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +set showfix=1 +) + + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +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 ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Activation IDs + +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps ( +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f +) + +if not defined apps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps if defined allapps if not defined notwinact ( +call :dk_color %Gray% "Checking Activation IDs [Key Not Installed or Act ID Not Found]" +) + +if not defined apps if not defined allapps ( +call :dk_color %Red% "Checking Activation IDs [Not found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( +call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" +) + +::============================== + +:: Check Eval Windows + +if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( +call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]" +if not defined showfix ( +echo: +call :dk_color %Blue% "License swapping is not the right way to upgrade to the full version. Learn the correct method at the link below." +set fixes=%fixes% %mas%evaluation_editions +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" +echo: +) +set error=1 +set showfix=1 +) +) + +::============================== + +:: Check HKU\S-1-5-20\Software registry, in some systems it's missing and that causes Windows activation problems + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( +call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check license and package files for the current edition + +set osedition=0 +if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" +if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" +%chkedi% do if not errorlevel 1 (call set "osedition=%%a") + +if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" + +:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional + +if not %osedition%==0 ( +if "%osSKU%"=="164" set osedition=ProfessionalEducation +if "%osSKU%"=="165" set osedition=ProfessionalEducationN +) + +if not defined notwinact ( +if %osedition%==0 ( +call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" +) else ( +if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( +set skunotfound=1 +call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" +) +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( +call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" +) +) +) +) + +::============================== + +:: Check SKU value to find if there is any difference + +if not defined notwinact ( +if %winbuild% GEQ 10240 ( +%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" +set /a "sum/=3" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +) +) else ( +%nul% set /a "sum=%slcSKU%+%wmiSKU%" +set /a "sum/=2" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" +) +) +) + +::============================== + +:: 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" ( +echo Checking Eval WLMS Service [Found] +) + +::============================== + +:: Check SPP interference in IFEO + +for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) +) +if defined _sppint ( +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: +) +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) +) + +::============================== + +:: Check and fix SkipRearm registry value + +if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% +call :dk_color %Gray% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" +%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" +) + +::============================== + +:: Check SvcRestartTask status, this task helps in making sure system remains activated + +if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( +for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) + +echo !taskinfo! | find /i "Ready" %nul% || ( +reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed +if "!taskinfo!"=="" set "taskinfo=Not Found" + +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +echo: +) +) +) +) + +::============================== exit /b diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 0018094..aa27890 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1211,40 +1211,118 @@ exit /b set showfix= call :dk_chkmal +::============================== + :: Check Sandboxing sc query Null %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]" +call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly]" +if not defined showfix ( +echo: call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." echo: ) +set error=1 +set showfix=1 +) -::======================================================================================================================================== +::============================== + +:: Check WinPE mode + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( + +call :dk_color %Red% "Checking WinPE [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Safe mode + +if defined safeboot_option ( +call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check ImageState +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states + +for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) + +if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( +call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" +echo "%imagestate%" | find /i "RESEAL" %nul% && ( +if not defined showfix ( +echo: +call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." +echo: +) +set error=1 +set showfix=1 +) +echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +) +) + +::============================== :: Check corrupt services set serv_cor= for %%# in (%_serv%) do ( +set _regcorr= set _corrupt= sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 -for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _corrupt ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || set _corrupt=1 +for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) ) -if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#") else (set "serv_cor=%%#")) +if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) ) if defined serv_cor ( -set error=1 -set showfix=1 call :dk_color %Red% "Checking Corrupt Services [%serv_cor%]" + +if not defined showfix ( +echo: +if /i "%serv_cor%"=="sppsvc-RegistryError" ( +set fixes=%fixes% %mas%fix_service +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" +) else ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check disabled services @@ -1279,11 +1357,26 @@ if defined serv_cste (set "serv_cste=!serv_cste! %%#") else (set "serv_cste=%%#" if defined serv_csts call :dk_color %Gray% "Enabling Disabled Services [Successful] [%serv_csts%]" if defined serv_cste ( -set error=1 call :dk_color %Red% "Enabling Disabled Services [Failed] [%serv_cste%]" + +if not defined showfix ( +echo: +echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( +echo A registry fix has been applied to enable the disabled service. +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +) || ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check if the services are able to run or not :: Workarounds are added to get correct status and error code because sc query doesn't output correct results in some conditions @@ -1305,119 +1398,25 @@ if defined checkerror if defined serv_e (set "serv_e=!serv_e!, %%#-!errorcode!") ) if defined serv_e ( -set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" -echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." + +if not defined showfix ( +set listwospp=%_serv:sppsvc=% +echo %serv_e% | findstr /i "!listwospp!" %nul% && ( set showfix=1 -) -echo %serv_e% | findstr /i "sppsvc-1060" %nul% && ( -set fixes=%fixes% %mas%fix_service -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" -set showfix=1 -) -) - -::======================================================================================================================================== - -:: Various error checks - -if defined safeboot_option ( -set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option%] " %Blue% "[Safe mode found. Run in normal mode.]" -) - - -:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states - -for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) - -if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( -call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" -echo "%imagestate%" | find /i "RESEAL" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." -) -echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: ) ) - - -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]" ) +::============================== -set wpainfo= -set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) -echo "%wpainfo%" | find /i "Error Found" %nul% && ( -set error=1 -set wpaerror=1 -call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" -) || ( -echo Checking WPA Registry Count [%wpainfo%] -) - - -if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( -call :dk_color %Red% "Checking Eval Packages [Non-Eval Licenses are installed in Eval Windows]" -set fixes=%fixes% %mas%evaluation_editions -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" -) -) - - -set osedition=0 -if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" -if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" -%chkedi% do if not errorlevel 1 (call set "osedition=%%a") - -if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" - -:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional - -if not %osedition%==0 ( -if "%osSKU%"=="164" set osedition=ProfessionalEducation -if "%osSKU%"=="165" set osedition=ProfessionalEducationN -) - -if not defined notwinact ( -if %osedition%==0 ( -call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" -) else ( - -if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( -set skunotfound=1 -call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" -) - -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( -call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" -) -) -) -) - - -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 ( -set error=1 -call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%" -) - +:: Check WMI set wmifailed= if %_wmic% EQU 1 wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% @@ -1425,168 +1424,94 @@ if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Objec if %errorlevel% NEQ 0 set wmifailed=1 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 ( -set error=1 call :dk_color %Red% "Checking WMI [Not Working]" -if not defined showfix call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." -set showfix=1 -) - -if not defined notwinact ( -if %winbuild% GEQ 10240 ( -%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" -set /a "sum/=3" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." +echo: ) -) else ( -%nul% set /a "sum=%slcSKU%+%wmiSKU%" -set /a "sum/=2" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" -) -) -) - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is Rearmed]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) +::============================== -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." -) - - -:: 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" ( -echo Checking Eval WLMS Service [Found] -) - - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %mas%in-place_repair_upgrade" -) - - -for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) -) -if defined _sppint ( -echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) || ( -echo Checking SPP In IFEO [%_sppint%] -) -) - - -if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( -reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% -call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" -%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" -) - +:: Check SPP Registry Key if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" +if not defined showfix ( +echo: set fixes=%fixes% %mas%issues_due_to_gaming_spoofers call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +echo: +) set error=1 set showfix=1 ) +::============================== + +:: Check TokenStore registry key set tokenstore= if %winbuild% GEQ 7600 ( for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v TokenStore %nul6%') do call set "tokenstore=%%b" if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform" + if %winbuild% GEQ 9200 if /i not "!tokenstore!"=="%SysPath%\spp\store" if /i not "!tokenstore!"=="%SysPath%\spp\store\2.0" if /i not "!tokenstore!"=="%SysPath%\spp\store_test\2.0" ( +call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set toerr=1 set error=1 set showfix=1 -call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) ) +::============================== + :: This code creates token folder only if it's missing and sets default permission for it if %winbuild% GEQ 7600 if not defined toerr if not exist "%tokenstore%\" ( + mkdir "%tokenstore%" %nul% + if %winbuild% LSS 9200 set "d=$sddl = 'O:NSG:NSD:AI(A;OICIID;FA;;;SY)(A;OICIID;FA;;;BA)(A;OICIID;FA;;;NS)';" if %winbuild% GEQ 9200 set "d=$sddl = 'O:BAG:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICIIO;GR;;;BU)(A;;FR;;;BU)(A;OICI;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)';" set "d=!d! $AclObject = New-Object System.Security.AccessControl.DirectorySecurity;" set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" %psc% "!d!" %nul% + if exist "%tokenstore%\" ( call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]" ) else ( call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set error=1 set showfix=1 ) ) - -if not defined notwinact ( -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -set "_notfoundids=Key Not Installed / Act ID Not Found" -call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined allapps ( -set error=1 -set "_notfoundids=Not found" -) -call :dk_color %Red% "Checking Activation IDs [!_notfoundids!]" -) -) -) - - -if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( -set error=1 -call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" -) - - -if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) -echo !taskinfo! | find /i "Ready" %nul% || ( -reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]" -if not defined error call :dk_color %Blue% "Reboot your machine using the restart option." -) -) -) - +::============================== :: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. set permerror= -if %winbuild% GEQ 9200 if not defined ps32onArm ( +if %winbuild% GEQ 9200 if not defined toerr if not defined ps32onArm if exist "%tokenstore%\" ( for %%# in ( "%tokenstore%+FullControl" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" @@ -1614,29 +1539,288 @@ if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP" ) if defined permerror ( -set error=1 call :dk_color %Red% "Checking SPP Permissions [!permerror!]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) -) - - -:: If required services are not disabled or corrupted + if there is any error + SoftwareLicensingService errorlevel is not Zero + no fix was shown before - -if not defined serv_cor if not defined serv_cste if defined error if /i not %error_code%==0 if not defined showfix ( -if not defined permerror if defined wpaerror (call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." & set showfix=1) if not defined showfix ( -set showfix=1 +echo: call :dk_color %Blue% "%_fixmsg%" -if not defined permerror call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 ) ) -if not defined showfix if defined wpaerror ( +::============================== + +:: Check WPA Registry Errors + +set chkalp= +set wpainfo=NotFound +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=0123456789" %%i in ("%wpainfo%") do set chkalp=%%i + +if defined chkalp ( +call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" +if not defined showfix ( +echo "%wpainfo%" | find /i "Error Found" %nul% && ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +set error=1 set showfix=1 -call :dk_color %Blue% "If activation fails then go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." ) +) +set wpainfo=a +) + +if not defined chkalp ( +if %wpainfo% GEQ 5000 ( +call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" +echo: +call :dk_color %Blue% "A large number of WPA registries have been found, which may cause high CPU usage." +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +) else ( +echo Checking WPA Registry Count [%wpainfo%] +) +) + +::============================== + +:: Check Rearm + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( +call :dk_color %Red% "Checking Rearm [System is Rearmed]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +set showfix=1 +) + + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +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 ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Activation IDs + +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps ( +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f +) + +if not defined apps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps if defined allapps if not defined notwinact ( +call :dk_color %Gray% "Checking Activation IDs [Key Not Installed or Act ID Not Found]" +) + +if not defined apps if not defined allapps ( +call :dk_color %Red% "Checking Activation IDs [Not found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( +call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" +) + +::============================== + +:: Check Eval Windows + +if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( +call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]" +if not defined showfix ( +echo: +call :dk_color %Blue% "License swapping is not the right way to upgrade to the full version. Learn the correct method at the link below." +set fixes=%fixes% %mas%evaluation_editions +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" +echo: +) +set error=1 +set showfix=1 +) +) + +::============================== + +:: Check HKU\S-1-5-20\Software registry, in some systems it's missing and that causes Windows activation problems + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( +call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check license and package files for the current edition + +set osedition=0 +if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" +if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" +%chkedi% do if not errorlevel 1 (call set "osedition=%%a") + +if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" + +:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional + +if not %osedition%==0 ( +if "%osSKU%"=="164" set osedition=ProfessionalEducation +if "%osSKU%"=="165" set osedition=ProfessionalEducationN +) + +if not defined notwinact ( +if %osedition%==0 ( +call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" +) else ( +if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( +set skunotfound=1 +call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" +) +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( +call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" +) +) +) +) + +::============================== + +:: Check SKU value to find if there is any difference + +if not defined notwinact ( +if %winbuild% GEQ 10240 ( +%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" +set /a "sum/=3" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +) +) else ( +%nul% set /a "sum=%slcSKU%+%wmiSKU%" +set /a "sum/=2" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" +) +) +) + +::============================== + +:: 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" ( +echo Checking Eval WLMS Service [Found] +) + +::============================== + +:: Check SPP interference in IFEO + +for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) +) +if defined _sppint ( +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: +) +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) +) + +::============================== + +:: Check and fix SkipRearm registry value + +if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% +call :dk_color %Gray% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" +%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" +) + +::============================== + +:: Check SvcRestartTask status, this task helps in making sure system remains activated + +if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( +for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) + +echo !taskinfo! | find /i "Ready" %nul% || ( +reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed +if "!taskinfo!"=="" set "taskinfo=Not Found" + +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +echo: +) +) +) +) + +::============================== exit /b diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 6968f28..667bad5 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1305,40 +1305,118 @@ exit /b set showfix= call :dk_chkmal +::============================== + :: Check Sandboxing sc query Null %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]" +call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly]" +if not defined showfix ( +echo: call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." echo: ) +set error=1 +set showfix=1 +) -::======================================================================================================================================== +::============================== + +:: Check WinPE mode + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( + +call :dk_color %Red% "Checking WinPE [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Safe mode + +if defined safeboot_option ( +call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check ImageState +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states + +for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) + +if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( +call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" +echo "%imagestate%" | find /i "RESEAL" %nul% && ( +if not defined showfix ( +echo: +call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." +echo: +) +set error=1 +set showfix=1 +) +echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +) +) + +::============================== :: Check corrupt services set serv_cor= for %%# in (%_serv%) do ( +set _regcorr= set _corrupt= sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 -for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _corrupt ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || set _corrupt=1 +for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) ) -if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#") else (set "serv_cor=%%#")) +if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) ) if defined serv_cor ( -set error=1 -set showfix=1 call :dk_color %Red% "Checking Corrupt Services [%serv_cor%]" + +if not defined showfix ( +echo: +if /i "%serv_cor%"=="sppsvc-RegistryError" ( +set fixes=%fixes% %mas%fix_service +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" +) else ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check disabled services @@ -1373,11 +1451,26 @@ if defined serv_cste (set "serv_cste=!serv_cste! %%#") else (set "serv_cste=%%#" if defined serv_csts call :dk_color %Gray% "Enabling Disabled Services [Successful] [%serv_csts%]" if defined serv_cste ( -set error=1 call :dk_color %Red% "Enabling Disabled Services [Failed] [%serv_cste%]" + +if not defined showfix ( +echo: +echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( +echo A registry fix has been applied to enable the disabled service. +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +) || ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check if the services are able to run or not :: Workarounds are added to get correct status and error code because sc query doesn't output correct results in some conditions @@ -1399,119 +1492,25 @@ if defined checkerror if defined serv_e (set "serv_e=!serv_e!, %%#-!errorcode!") ) if defined serv_e ( -set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" -echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." + +if not defined showfix ( +set listwospp=%_serv:sppsvc=% +echo %serv_e% | findstr /i "!listwospp!" %nul% && ( set showfix=1 -) -echo %serv_e% | findstr /i "sppsvc-1060" %nul% && ( -set fixes=%fixes% %mas%fix_service -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" -set showfix=1 -) -) - -::======================================================================================================================================== - -:: Various error checks - -if defined safeboot_option ( -set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option%] " %Blue% "[Safe mode found. Run in normal mode.]" -) - - -:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states - -for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) - -if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( -call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" -echo "%imagestate%" | find /i "RESEAL" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." -) -echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: ) ) - - -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]" ) +::============================== -set wpainfo= -set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) -echo "%wpainfo%" | find /i "Error Found" %nul% && ( -set error=1 -set wpaerror=1 -call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" -) || ( -echo Checking WPA Registry Count [%wpainfo%] -) - - -if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( -call :dk_color %Red% "Checking Eval Packages [Non-Eval Licenses are installed in Eval Windows]" -set fixes=%fixes% %mas%evaluation_editions -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" -) -) - - -set osedition=0 -if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" -if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" -%chkedi% do if not errorlevel 1 (call set "osedition=%%a") - -if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" - -:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional - -if not %osedition%==0 ( -if "%osSKU%"=="164" set osedition=ProfessionalEducation -if "%osSKU%"=="165" set osedition=ProfessionalEducationN -) - -if not defined notwinact ( -if %osedition%==0 ( -call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" -) else ( - -if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( -set skunotfound=1 -call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" -) - -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( -call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" -) -) -) -) - - -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 ( -set error=1 -call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%" -) - +:: Check WMI set wmifailed= if %_wmic% EQU 1 wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% @@ -1519,168 +1518,94 @@ if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Objec if %errorlevel% NEQ 0 set wmifailed=1 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 ( -set error=1 call :dk_color %Red% "Checking WMI [Not Working]" -if not defined showfix call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." -set showfix=1 -) - -if not defined notwinact ( -if %winbuild% GEQ 10240 ( -%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" -set /a "sum/=3" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." +echo: ) -) else ( -%nul% set /a "sum=%slcSKU%+%wmiSKU%" -set /a "sum/=2" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" -) -) -) - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is Rearmed]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) +::============================== -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." -) - - -:: 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" ( -echo Checking Eval WLMS Service [Found] -) - - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %mas%in-place_repair_upgrade" -) - - -for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) -) -if defined _sppint ( -echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) || ( -echo Checking SPP In IFEO [%_sppint%] -) -) - - -if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( -reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% -call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" -%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" -) - +:: Check SPP Registry Key if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" +if not defined showfix ( +echo: set fixes=%fixes% %mas%issues_due_to_gaming_spoofers call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +echo: +) set error=1 set showfix=1 ) +::============================== + +:: Check TokenStore registry key set tokenstore= if %winbuild% GEQ 7600 ( for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v TokenStore %nul6%') do call set "tokenstore=%%b" if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform" + if %winbuild% GEQ 9200 if /i not "!tokenstore!"=="%SysPath%\spp\store" if /i not "!tokenstore!"=="%SysPath%\spp\store\2.0" if /i not "!tokenstore!"=="%SysPath%\spp\store_test\2.0" ( +call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set toerr=1 set error=1 set showfix=1 -call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) ) +::============================== + :: This code creates token folder only if it's missing and sets default permission for it if %winbuild% GEQ 7600 if not defined toerr if not exist "%tokenstore%\" ( + mkdir "%tokenstore%" %nul% + if %winbuild% LSS 9200 set "d=$sddl = 'O:NSG:NSD:AI(A;OICIID;FA;;;SY)(A;OICIID;FA;;;BA)(A;OICIID;FA;;;NS)';" if %winbuild% GEQ 9200 set "d=$sddl = 'O:BAG:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICIIO;GR;;;BU)(A;;FR;;;BU)(A;OICI;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)';" set "d=!d! $AclObject = New-Object System.Security.AccessControl.DirectorySecurity;" set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" %psc% "!d!" %nul% + if exist "%tokenstore%\" ( call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]" ) else ( call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set error=1 set showfix=1 ) ) - -if not defined notwinact ( -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -set "_notfoundids=Key Not Installed / Act ID Not Found" -call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined allapps ( -set error=1 -set "_notfoundids=Not found" -) -call :dk_color %Red% "Checking Activation IDs [!_notfoundids!]" -) -) -) - - -if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( -set error=1 -call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" -) - - -if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) -echo !taskinfo! | find /i "Ready" %nul% || ( -reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]" -if not defined error call :dk_color %Blue% "Reboot your machine using the restart option." -) -) -) - +::============================== :: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. set permerror= -if %winbuild% GEQ 9200 if not defined ps32onArm ( +if %winbuild% GEQ 9200 if not defined toerr if not defined ps32onArm if exist "%tokenstore%\" ( for %%# in ( "%tokenstore%+FullControl" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" @@ -1708,29 +1633,288 @@ if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP" ) if defined permerror ( -set error=1 call :dk_color %Red% "Checking SPP Permissions [!permerror!]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) -) - - -:: If required services are not disabled or corrupted + if there is any error + SoftwareLicensingService errorlevel is not Zero + no fix was shown before - -if not defined serv_cor if not defined serv_cste if defined error if /i not %error_code%==0 if not defined showfix ( -if not defined permerror if defined wpaerror (call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." & set showfix=1) if not defined showfix ( -set showfix=1 +echo: call :dk_color %Blue% "%_fixmsg%" -if not defined permerror call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 ) ) -if not defined showfix if defined wpaerror ( +::============================== + +:: Check WPA Registry Errors + +set chkalp= +set wpainfo=NotFound +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=0123456789" %%i in ("%wpainfo%") do set chkalp=%%i + +if defined chkalp ( +call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" +if not defined showfix ( +echo "%wpainfo%" | find /i "Error Found" %nul% && ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +set error=1 set showfix=1 -call :dk_color %Blue% "If activation fails then go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." ) +) +set wpainfo=a +) + +if not defined chkalp ( +if %wpainfo% GEQ 5000 ( +call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" +echo: +call :dk_color %Blue% "A large number of WPA registries have been found, which may cause high CPU usage." +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +) else ( +echo Checking WPA Registry Count [%wpainfo%] +) +) + +::============================== + +:: Check Rearm + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( +call :dk_color %Red% "Checking Rearm [System is Rearmed]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +set showfix=1 +) + + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +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 ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Activation IDs + +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps ( +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f +) + +if not defined apps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps if defined allapps if not defined notwinact ( +call :dk_color %Gray% "Checking Activation IDs [Key Not Installed or Act ID Not Found]" +) + +if not defined apps if not defined allapps ( +call :dk_color %Red% "Checking Activation IDs [Not found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( +call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" +) + +::============================== + +:: Check Eval Windows + +if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( +call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]" +if not defined showfix ( +echo: +call :dk_color %Blue% "License swapping is not the right way to upgrade to the full version. Learn the correct method at the link below." +set fixes=%fixes% %mas%evaluation_editions +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" +echo: +) +set error=1 +set showfix=1 +) +) + +::============================== + +:: Check HKU\S-1-5-20\Software registry, in some systems it's missing and that causes Windows activation problems + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( +call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check license and package files for the current edition + +set osedition=0 +if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" +if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" +%chkedi% do if not errorlevel 1 (call set "osedition=%%a") + +if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" + +:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional + +if not %osedition%==0 ( +if "%osSKU%"=="164" set osedition=ProfessionalEducation +if "%osSKU%"=="165" set osedition=ProfessionalEducationN +) + +if not defined notwinact ( +if %osedition%==0 ( +call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" +) else ( +if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( +set skunotfound=1 +call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" +) +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( +call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" +) +) +) +) + +::============================== + +:: Check SKU value to find if there is any difference + +if not defined notwinact ( +if %winbuild% GEQ 10240 ( +%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" +set /a "sum/=3" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +) +) else ( +%nul% set /a "sum=%slcSKU%+%wmiSKU%" +set /a "sum/=2" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" +) +) +) + +::============================== + +:: 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" ( +echo Checking Eval WLMS Service [Found] +) + +::============================== + +:: Check SPP interference in IFEO + +for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) +) +if defined _sppint ( +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: +) +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) +) + +::============================== + +:: Check and fix SkipRearm registry value + +if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% +call :dk_color %Gray% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" +%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" +) + +::============================== + +:: Check SvcRestartTask status, this task helps in making sure system remains activated + +if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( +for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) + +echo !taskinfo! | find /i "Ready" %nul% || ( +reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed +if "!taskinfo!"=="" set "taskinfo=Not Found" + +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +echo: +) +) +) +) + +::============================== exit /b diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index e7bcb18..a102962 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1893,40 +1893,118 @@ exit /b set showfix= call :dk_chkmal +::============================== + :: Check Sandboxing sc query Null %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]" +call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly]" +if not defined showfix ( +echo: call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." echo: ) +set error=1 +set showfix=1 +) -::======================================================================================================================================== +::============================== + +:: Check WinPE mode + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( + +call :dk_color %Red% "Checking WinPE [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Safe mode + +if defined safeboot_option ( +call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check ImageState +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states + +for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) + +if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( +call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" +echo "%imagestate%" | find /i "RESEAL" %nul% && ( +if not defined showfix ( +echo: +call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." +echo: +) +set error=1 +set showfix=1 +) +echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +) +) + +::============================== :: Check corrupt services set serv_cor= for %%# in (%_serv%) do ( +set _regcorr= set _corrupt= sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 -for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _corrupt ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || set _corrupt=1 +for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) ) -if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#") else (set "serv_cor=%%#")) +if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) ) if defined serv_cor ( -set error=1 -set showfix=1 call :dk_color %Red% "Checking Corrupt Services [%serv_cor%]" + +if not defined showfix ( +echo: +if /i "%serv_cor%"=="sppsvc-RegistryError" ( +set fixes=%fixes% %mas%fix_service +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" +) else ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check disabled services @@ -1961,11 +2039,26 @@ if defined serv_cste (set "serv_cste=!serv_cste! %%#") else (set "serv_cste=%%#" if defined serv_csts call :dk_color %Gray% "Enabling Disabled Services [Successful] [%serv_csts%]" if defined serv_cste ( -set error=1 call :dk_color %Red% "Enabling Disabled Services [Failed] [%serv_cste%]" + +if not defined showfix ( +echo: +echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( +echo A registry fix has been applied to enable the disabled service. +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +) || ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check if the services are able to run or not :: Workarounds are added to get correct status and error code because sc query doesn't output correct results in some conditions @@ -1987,119 +2080,25 @@ if defined checkerror if defined serv_e (set "serv_e=!serv_e!, %%#-!errorcode!") ) if defined serv_e ( -set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" -echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." + +if not defined showfix ( +set listwospp=%_serv:sppsvc=% +echo %serv_e% | findstr /i "!listwospp!" %nul% && ( set showfix=1 -) -echo %serv_e% | findstr /i "sppsvc-1060" %nul% && ( -set fixes=%fixes% %mas%fix_service -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" -set showfix=1 -) -) - -::======================================================================================================================================== - -:: Various error checks - -if defined safeboot_option ( -set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option%] " %Blue% "[Safe mode found. Run in normal mode.]" -) - - -:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states - -for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) - -if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( -call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" -echo "%imagestate%" | find /i "RESEAL" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." -) -echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: ) ) - - -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]" ) +::============================== -set wpainfo= -set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) -echo "%wpainfo%" | find /i "Error Found" %nul% && ( -set error=1 -set wpaerror=1 -call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" -) || ( -echo Checking WPA Registry Count [%wpainfo%] -) - - -if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( -call :dk_color %Red% "Checking Eval Packages [Non-Eval Licenses are installed in Eval Windows]" -set fixes=%fixes% %mas%evaluation_editions -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" -) -) - - -set osedition=0 -if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" -if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" -%chkedi% do if not errorlevel 1 (call set "osedition=%%a") - -if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" - -:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional - -if not %osedition%==0 ( -if "%osSKU%"=="164" set osedition=ProfessionalEducation -if "%osSKU%"=="165" set osedition=ProfessionalEducationN -) - -if not defined notwinact ( -if %osedition%==0 ( -call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" -) else ( - -if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( -set skunotfound=1 -call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" -) - -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( -call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" -) -) -) -) - - -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 ( -set error=1 -call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%" -) - +:: Check WMI set wmifailed= if %_wmic% EQU 1 wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% @@ -2107,168 +2106,94 @@ if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Objec if %errorlevel% NEQ 0 set wmifailed=1 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 ( -set error=1 call :dk_color %Red% "Checking WMI [Not Working]" -if not defined showfix call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." -set showfix=1 -) - -if not defined notwinact ( -if %winbuild% GEQ 10240 ( -%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" -set /a "sum/=3" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." +echo: ) -) else ( -%nul% set /a "sum=%slcSKU%+%wmiSKU%" -set /a "sum/=2" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" -) -) -) - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is Rearmed]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) +::============================== -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." -) - - -:: 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" ( -echo Checking Eval WLMS Service [Found] -) - - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %mas%in-place_repair_upgrade" -) - - -for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) -) -if defined _sppint ( -echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) || ( -echo Checking SPP In IFEO [%_sppint%] -) -) - - -if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( -reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% -call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" -%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" -) - +:: Check SPP Registry Key if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" +if not defined showfix ( +echo: set fixes=%fixes% %mas%issues_due_to_gaming_spoofers call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +echo: +) set error=1 set showfix=1 ) +::============================== + +:: Check TokenStore registry key set tokenstore= if %winbuild% GEQ 7600 ( for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v TokenStore %nul6%') do call set "tokenstore=%%b" if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform" + if %winbuild% GEQ 9200 if /i not "!tokenstore!"=="%SysPath%\spp\store" if /i not "!tokenstore!"=="%SysPath%\spp\store\2.0" if /i not "!tokenstore!"=="%SysPath%\spp\store_test\2.0" ( +call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set toerr=1 set error=1 set showfix=1 -call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) ) +::============================== + :: This code creates token folder only if it's missing and sets default permission for it if %winbuild% GEQ 7600 if not defined toerr if not exist "%tokenstore%\" ( + mkdir "%tokenstore%" %nul% + if %winbuild% LSS 9200 set "d=$sddl = 'O:NSG:NSD:AI(A;OICIID;FA;;;SY)(A;OICIID;FA;;;BA)(A;OICIID;FA;;;NS)';" if %winbuild% GEQ 9200 set "d=$sddl = 'O:BAG:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICIIO;GR;;;BU)(A;;FR;;;BU)(A;OICI;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)';" set "d=!d! $AclObject = New-Object System.Security.AccessControl.DirectorySecurity;" set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" %psc% "!d!" %nul% + if exist "%tokenstore%\" ( call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]" ) else ( call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set error=1 set showfix=1 ) ) - -if not defined notwinact ( -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -set "_notfoundids=Key Not Installed / Act ID Not Found" -call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined allapps ( -set error=1 -set "_notfoundids=Not found" -) -call :dk_color %Red% "Checking Activation IDs [!_notfoundids!]" -) -) -) - - -if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( -set error=1 -call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" -) - - -if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) -echo !taskinfo! | find /i "Ready" %nul% || ( -reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]" -if not defined error call :dk_color %Blue% "Reboot your machine using the restart option." -) -) -) - +::============================== :: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. set permerror= -if %winbuild% GEQ 9200 if not defined ps32onArm ( +if %winbuild% GEQ 9200 if not defined toerr if not defined ps32onArm if exist "%tokenstore%\" ( for %%# in ( "%tokenstore%+FullControl" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" @@ -2296,29 +2221,288 @@ if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP" ) if defined permerror ( -set error=1 call :dk_color %Red% "Checking SPP Permissions [!permerror!]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) -) - - -:: If required services are not disabled or corrupted + if there is any error + SoftwareLicensingService errorlevel is not Zero + no fix was shown before - -if not defined serv_cor if not defined serv_cste if defined error if /i not %error_code%==0 if not defined showfix ( -if not defined permerror if defined wpaerror (call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." & set showfix=1) if not defined showfix ( -set showfix=1 +echo: call :dk_color %Blue% "%_fixmsg%" -if not defined permerror call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 ) ) -if not defined showfix if defined wpaerror ( +::============================== + +:: Check WPA Registry Errors + +set chkalp= +set wpainfo=NotFound +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=0123456789" %%i in ("%wpainfo%") do set chkalp=%%i + +if defined chkalp ( +call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" +if not defined showfix ( +echo "%wpainfo%" | find /i "Error Found" %nul% && ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +set error=1 set showfix=1 -call :dk_color %Blue% "If activation fails then go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." ) +) +set wpainfo=a +) + +if not defined chkalp ( +if %wpainfo% GEQ 5000 ( +call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" +echo: +call :dk_color %Blue% "A large number of WPA registries have been found, which may cause high CPU usage." +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +) else ( +echo Checking WPA Registry Count [%wpainfo%] +) +) + +::============================== + +:: Check Rearm + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( +call :dk_color %Red% "Checking Rearm [System is Rearmed]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +set showfix=1 +) + + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +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 ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Activation IDs + +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps ( +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f +) + +if not defined apps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps if defined allapps if not defined notwinact ( +call :dk_color %Gray% "Checking Activation IDs [Key Not Installed or Act ID Not Found]" +) + +if not defined apps if not defined allapps ( +call :dk_color %Red% "Checking Activation IDs [Not found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( +call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" +) + +::============================== + +:: Check Eval Windows + +if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( +call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]" +if not defined showfix ( +echo: +call :dk_color %Blue% "License swapping is not the right way to upgrade to the full version. Learn the correct method at the link below." +set fixes=%fixes% %mas%evaluation_editions +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" +echo: +) +set error=1 +set showfix=1 +) +) + +::============================== + +:: Check HKU\S-1-5-20\Software registry, in some systems it's missing and that causes Windows activation problems + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( +call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check license and package files for the current edition + +set osedition=0 +if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" +if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" +%chkedi% do if not errorlevel 1 (call set "osedition=%%a") + +if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" + +:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional + +if not %osedition%==0 ( +if "%osSKU%"=="164" set osedition=ProfessionalEducation +if "%osSKU%"=="165" set osedition=ProfessionalEducationN +) + +if not defined notwinact ( +if %osedition%==0 ( +call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" +) else ( +if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( +set skunotfound=1 +call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" +) +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( +call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" +) +) +) +) + +::============================== + +:: Check SKU value to find if there is any difference + +if not defined notwinact ( +if %winbuild% GEQ 10240 ( +%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" +set /a "sum/=3" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +) +) else ( +%nul% set /a "sum=%slcSKU%+%wmiSKU%" +set /a "sum/=2" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" +) +) +) + +::============================== + +:: 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" ( +echo Checking Eval WLMS Service [Found] +) + +::============================== + +:: Check SPP interference in IFEO + +for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) +) +if defined _sppint ( +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: +) +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) +) + +::============================== + +:: Check and fix SkipRearm registry value + +if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% +call :dk_color %Gray% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" +%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" +) + +::============================== + +:: Check SvcRestartTask status, this task helps in making sure system remains activated + +if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( +for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) + +echo !taskinfo! | find /i "Ready" %nul% || ( +reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed +if "!taskinfo!"=="" set "taskinfo=Not Found" + +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +echo: +) +) +) +) + +::============================== exit /b diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 058915d..bc3994d 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -2949,40 +2949,118 @@ exit /b set showfix= call :dk_chkmal +::============================== + :: Check Sandboxing sc query Null %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]" +call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly]" +if not defined showfix ( +echo: call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." echo: ) +set error=1 +set showfix=1 +) -::======================================================================================================================================== +::============================== + +:: Check WinPE mode + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( + +call :dk_color %Red% "Checking WinPE [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Safe mode + +if defined safeboot_option ( +call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check ImageState +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states + +for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) + +if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( +call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" +echo "%imagestate%" | find /i "RESEAL" %nul% && ( +if not defined showfix ( +echo: +call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." +echo: +) +set error=1 +set showfix=1 +) +echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +) +) + +::============================== :: Check corrupt services set serv_cor= for %%# in (%_serv%) do ( +set _regcorr= set _corrupt= sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 -for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _corrupt ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || set _corrupt=1 +for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) ) -if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#") else (set "serv_cor=%%#")) +if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) ) if defined serv_cor ( -set error=1 -set showfix=1 call :dk_color %Red% "Checking Corrupt Services [%serv_cor%]" + +if not defined showfix ( +echo: +if /i "%serv_cor%"=="sppsvc-RegistryError" ( +set fixes=%fixes% %mas%fix_service +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" +) else ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check disabled services @@ -3017,11 +3095,26 @@ if defined serv_cste (set "serv_cste=!serv_cste! %%#") else (set "serv_cste=%%#" if defined serv_csts call :dk_color %Gray% "Enabling Disabled Services [Successful] [%serv_csts%]" if defined serv_cste ( -set error=1 call :dk_color %Red% "Enabling Disabled Services [Failed] [%serv_cste%]" + +if not defined showfix ( +echo: +echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( +echo A registry fix has been applied to enable the disabled service. +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +) || ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check if the services are able to run or not :: Workarounds are added to get correct status and error code because sc query doesn't output correct results in some conditions @@ -3043,119 +3136,25 @@ if defined checkerror if defined serv_e (set "serv_e=!serv_e!, %%#-!errorcode!") ) if defined serv_e ( -set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" -echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." + +if not defined showfix ( +set listwospp=%_serv:sppsvc=% +echo %serv_e% | findstr /i "!listwospp!" %nul% && ( set showfix=1 -) -echo %serv_e% | findstr /i "sppsvc-1060" %nul% && ( -set fixes=%fixes% %mas%fix_service -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" -set showfix=1 -) -) - -::======================================================================================================================================== - -:: Various error checks - -if defined safeboot_option ( -set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option%] " %Blue% "[Safe mode found. Run in normal mode.]" -) - - -:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states - -for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) - -if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( -call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" -echo "%imagestate%" | find /i "RESEAL" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." -) -echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: ) ) - - -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]" ) +::============================== -set wpainfo= -set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) -echo "%wpainfo%" | find /i "Error Found" %nul% && ( -set error=1 -set wpaerror=1 -call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" -) || ( -echo Checking WPA Registry Count [%wpainfo%] -) - - -if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( -call :dk_color %Red% "Checking Eval Packages [Non-Eval Licenses are installed in Eval Windows]" -set fixes=%fixes% %mas%evaluation_editions -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" -) -) - - -set osedition=0 -if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" -if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" -%chkedi% do if not errorlevel 1 (call set "osedition=%%a") - -if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" - -:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional - -if not %osedition%==0 ( -if "%osSKU%"=="164" set osedition=ProfessionalEducation -if "%osSKU%"=="165" set osedition=ProfessionalEducationN -) - -if not defined notwinact ( -if %osedition%==0 ( -call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" -) else ( - -if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( -set skunotfound=1 -call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" -) - -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( -call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" -) -) -) -) - - -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 ( -set error=1 -call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%" -) - +:: Check WMI set wmifailed= if %_wmic% EQU 1 wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% @@ -3163,168 +3162,94 @@ if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Objec if %errorlevel% NEQ 0 set wmifailed=1 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 ( -set error=1 call :dk_color %Red% "Checking WMI [Not Working]" -if not defined showfix call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." -set showfix=1 -) - -if not defined notwinact ( -if %winbuild% GEQ 10240 ( -%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" -set /a "sum/=3" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." +echo: ) -) else ( -%nul% set /a "sum=%slcSKU%+%wmiSKU%" -set /a "sum/=2" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" -) -) -) - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is Rearmed]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) +::============================== -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." -) - - -:: 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" ( -echo Checking Eval WLMS Service [Found] -) - - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %mas%in-place_repair_upgrade" -) - - -for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) -) -if defined _sppint ( -echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) || ( -echo Checking SPP In IFEO [%_sppint%] -) -) - - -if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( -reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% -call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" -%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" -) - +:: Check SPP Registry Key if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" +if not defined showfix ( +echo: set fixes=%fixes% %mas%issues_due_to_gaming_spoofers call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +echo: +) set error=1 set showfix=1 ) +::============================== + +:: Check TokenStore registry key set tokenstore= if %winbuild% GEQ 7600 ( for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v TokenStore %nul6%') do call set "tokenstore=%%b" if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform" + if %winbuild% GEQ 9200 if /i not "!tokenstore!"=="%SysPath%\spp\store" if /i not "!tokenstore!"=="%SysPath%\spp\store\2.0" if /i not "!tokenstore!"=="%SysPath%\spp\store_test\2.0" ( +call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set toerr=1 set error=1 set showfix=1 -call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) ) +::============================== + :: This code creates token folder only if it's missing and sets default permission for it if %winbuild% GEQ 7600 if not defined toerr if not exist "%tokenstore%\" ( + mkdir "%tokenstore%" %nul% + if %winbuild% LSS 9200 set "d=$sddl = 'O:NSG:NSD:AI(A;OICIID;FA;;;SY)(A;OICIID;FA;;;BA)(A;OICIID;FA;;;NS)';" if %winbuild% GEQ 9200 set "d=$sddl = 'O:BAG:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICIIO;GR;;;BU)(A;;FR;;;BU)(A;OICI;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)';" set "d=!d! $AclObject = New-Object System.Security.AccessControl.DirectorySecurity;" set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" %psc% "!d!" %nul% + if exist "%tokenstore%\" ( call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]" ) else ( call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set error=1 set showfix=1 ) ) - -if not defined notwinact ( -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -set "_notfoundids=Key Not Installed / Act ID Not Found" -call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined allapps ( -set error=1 -set "_notfoundids=Not found" -) -call :dk_color %Red% "Checking Activation IDs [!_notfoundids!]" -) -) -) - - -if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( -set error=1 -call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" -) - - -if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) -echo !taskinfo! | find /i "Ready" %nul% || ( -reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]" -if not defined error call :dk_color %Blue% "Reboot your machine using the restart option." -) -) -) - +::============================== :: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. set permerror= -if %winbuild% GEQ 9200 if not defined ps32onArm ( +if %winbuild% GEQ 9200 if not defined toerr if not defined ps32onArm if exist "%tokenstore%\" ( for %%# in ( "%tokenstore%+FullControl" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" @@ -3352,29 +3277,288 @@ if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP" ) if defined permerror ( -set error=1 call :dk_color %Red% "Checking SPP Permissions [!permerror!]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) -) - - -:: If required services are not disabled or corrupted + if there is any error + SoftwareLicensingService errorlevel is not Zero + no fix was shown before - -if not defined serv_cor if not defined serv_cste if defined error if /i not %error_code%==0 if not defined showfix ( -if not defined permerror if defined wpaerror (call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." & set showfix=1) if not defined showfix ( -set showfix=1 +echo: call :dk_color %Blue% "%_fixmsg%" -if not defined permerror call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 ) ) -if not defined showfix if defined wpaerror ( +::============================== + +:: Check WPA Registry Errors + +set chkalp= +set wpainfo=NotFound +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=0123456789" %%i in ("%wpainfo%") do set chkalp=%%i + +if defined chkalp ( +call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" +if not defined showfix ( +echo "%wpainfo%" | find /i "Error Found" %nul% && ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +set error=1 set showfix=1 -call :dk_color %Blue% "If activation fails then go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." ) +) +set wpainfo=a +) + +if not defined chkalp ( +if %wpainfo% GEQ 5000 ( +call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" +echo: +call :dk_color %Blue% "A large number of WPA registries have been found, which may cause high CPU usage." +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +) else ( +echo Checking WPA Registry Count [%wpainfo%] +) +) + +::============================== + +:: Check Rearm + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( +call :dk_color %Red% "Checking Rearm [System is Rearmed]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +set showfix=1 +) + + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +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 ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Activation IDs + +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps ( +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f +) + +if not defined apps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps if defined allapps if not defined notwinact ( +call :dk_color %Gray% "Checking Activation IDs [Key Not Installed or Act ID Not Found]" +) + +if not defined apps if not defined allapps ( +call :dk_color %Red% "Checking Activation IDs [Not found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( +call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" +) + +::============================== + +:: Check Eval Windows + +if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( +call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]" +if not defined showfix ( +echo: +call :dk_color %Blue% "License swapping is not the right way to upgrade to the full version. Learn the correct method at the link below." +set fixes=%fixes% %mas%evaluation_editions +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" +echo: +) +set error=1 +set showfix=1 +) +) + +::============================== + +:: Check HKU\S-1-5-20\Software registry, in some systems it's missing and that causes Windows activation problems + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( +call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check license and package files for the current edition + +set osedition=0 +if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" +if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" +%chkedi% do if not errorlevel 1 (call set "osedition=%%a") + +if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" + +:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional + +if not %osedition%==0 ( +if "%osSKU%"=="164" set osedition=ProfessionalEducation +if "%osSKU%"=="165" set osedition=ProfessionalEducationN +) + +if not defined notwinact ( +if %osedition%==0 ( +call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" +) else ( +if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( +set skunotfound=1 +call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" +) +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( +call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" +) +) +) +) + +::============================== + +:: Check SKU value to find if there is any difference + +if not defined notwinact ( +if %winbuild% GEQ 10240 ( +%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" +set /a "sum/=3" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +) +) else ( +%nul% set /a "sum=%slcSKU%+%wmiSKU%" +set /a "sum/=2" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" +) +) +) + +::============================== + +:: 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" ( +echo Checking Eval WLMS Service [Found] +) + +::============================== + +:: Check SPP interference in IFEO + +for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) +) +if defined _sppint ( +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: +) +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) +) + +::============================== + +:: Check and fix SkipRearm registry value + +if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% +call :dk_color %Gray% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" +%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" +) + +::============================== + +:: Check SvcRestartTask status, this task helps in making sure system remains activated + +if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( +for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) + +echo !taskinfo! | find /i "Ready" %nul% || ( +reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed +if "!taskinfo!"=="" set "taskinfo=Not Found" + +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +echo: +) +) +) +) + +::============================== exit /b diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 8de0dd8..266d94c 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -2956,40 +2956,118 @@ exit /b set showfix= call :dk_chkmal +::============================== + :: Check Sandboxing sc query Null %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]" +call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly]" +if not defined showfix ( +echo: call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." echo: ) +set error=1 +set showfix=1 +) -::======================================================================================================================================== +::============================== + +:: Check WinPE mode + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( + +call :dk_color %Red% "Checking WinPE [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Safe mode + +if defined safeboot_option ( +call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check ImageState +:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states + +for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) + +if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( +call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" +echo "%imagestate%" | find /i "RESEAL" %nul% && ( +if not defined showfix ( +echo: +call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." +echo: +) +set error=1 +set showfix=1 +) +echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +) +) + +::============================== :: Check corrupt services set serv_cor= for %%# in (%_serv%) do ( +set _regcorr= set _corrupt= sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 -for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _corrupt ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || set _corrupt=1 +for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) ) -if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#") else (set "serv_cor=%%#")) +if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) ) if defined serv_cor ( -set error=1 -set showfix=1 call :dk_color %Red% "Checking Corrupt Services [%serv_cor%]" + +if not defined showfix ( +echo: +if /i "%serv_cor%"=="sppsvc-RegistryError" ( +set fixes=%fixes% %mas%fix_service +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" +) else ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check disabled services @@ -3024,11 +3102,26 @@ if defined serv_cste (set "serv_cste=!serv_cste! %%#") else (set "serv_cste=%%#" if defined serv_csts call :dk_color %Gray% "Enabling Disabled Services [Successful] [%serv_csts%]" if defined serv_cste ( -set error=1 call :dk_color %Red% "Enabling Disabled Services [Failed] [%serv_cste%]" + +if not defined showfix ( +echo: +echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( +echo A registry fix has been applied to enable the disabled service. +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +) || ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) +echo: ) -::======================================================================================================================================== +set error=1 +set showfix=1 +) + +::============================== :: Check if the services are able to run or not :: Workarounds are added to get correct status and error code because sc query doesn't output correct results in some conditions @@ -3050,119 +3143,25 @@ if defined checkerror if defined serv_e (set "serv_e=!serv_e!, %%#-!errorcode!") ) if defined serv_e ( -set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" -echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." + +if not defined showfix ( +set listwospp=%_serv:sppsvc=% +echo %serv_e% | findstr /i "!listwospp!" %nul% && ( set showfix=1 -) -echo %serv_e% | findstr /i "sppsvc-1060" %nul% && ( -set fixes=%fixes% %mas%fix_service -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" -set showfix=1 -) -) - -::======================================================================================================================================== - -:: Various error checks - -if defined safeboot_option ( -set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option%] " %Blue% "[Safe mode found. Run in normal mode.]" -) - - -:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states - -for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) - -if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( -call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" -echo "%imagestate%" | find /i "RESEAL" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." -) -echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: ) ) - - -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( set error=1 -set showfix=1 -call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]" ) +::============================== -set wpainfo= -set wpaerror= -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) -echo "%wpainfo%" | find /i "Error Found" %nul% && ( -set error=1 -set wpaerror=1 -call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" -) || ( -echo Checking WPA Registry Count [%wpainfo%] -) - - -if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( -call :dk_color %Red% "Checking Eval Packages [Non-Eval Licenses are installed in Eval Windows]" -set fixes=%fixes% %mas%evaluation_editions -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" -) -) - - -set osedition=0 -if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" -if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" -%chkedi% do if not errorlevel 1 (call set "osedition=%%a") - -if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" - -:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional - -if not %osedition%==0 ( -if "%osSKU%"=="164" set osedition=ProfessionalEducation -if "%osSKU%"=="165" set osedition=ProfessionalEducationN -) - -if not defined notwinact ( -if %osedition%==0 ( -call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" -) else ( - -if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( -set skunotfound=1 -call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" -) - -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( -call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" -) -) -) -) - - -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 ( -set error=1 -call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%" -) - +:: Check WMI set wmifailed= if %_wmic% EQU 1 wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% @@ -3170,168 +3169,94 @@ if %_wmic% EQU 0 %psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Objec if %errorlevel% NEQ 0 set wmifailed=1 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 ( -set error=1 call :dk_color %Red% "Checking WMI [Not Working]" -if not defined showfix call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." -set showfix=1 -) - -if not defined notwinact ( -if %winbuild% GEQ 10240 ( -%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" -set /a "sum/=3" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." +echo: ) -) else ( -%nul% set /a "sum=%slcSKU%+%wmiSKU%" -set /a "sum/=2" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" -) -) -) - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Rearm [System is Rearmed]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." ) +::============================== -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." -) - - -:: 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" ( -echo Checking Eval WLMS Service [Found] -) - - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( -set error=1 -set showfix=1 -call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %mas%in-place_repair_upgrade" -) - - -for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) -) -if defined _sppint ( -echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) || ( -echo Checking SPP In IFEO [%_sppint%] -) -) - - -if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( -reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% -call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" -%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" -) - +:: Check SPP Registry Key if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" +if not defined showfix ( +echo: set fixes=%fixes% %mas%issues_due_to_gaming_spoofers call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +echo: +) set error=1 set showfix=1 ) +::============================== + +:: Check TokenStore registry key set tokenstore= if %winbuild% GEQ 7600 ( for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v TokenStore %nul6%') do call set "tokenstore=%%b" if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform" + if %winbuild% GEQ 9200 if /i not "!tokenstore!"=="%SysPath%\spp\store" if /i not "!tokenstore!"=="%SysPath%\spp\store\2.0" if /i not "!tokenstore!"=="%SysPath%\spp\store_test\2.0" ( +call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set toerr=1 set error=1 set showfix=1 -call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) ) +::============================== + :: This code creates token folder only if it's missing and sets default permission for it if %winbuild% GEQ 7600 if not defined toerr if not exist "%tokenstore%\" ( + mkdir "%tokenstore%" %nul% + if %winbuild% LSS 9200 set "d=$sddl = 'O:NSG:NSD:AI(A;OICIID;FA;;;SY)(A;OICIID;FA;;;BA)(A;OICIID;FA;;;NS)';" if %winbuild% GEQ 9200 set "d=$sddl = 'O:BAG:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICIIO;GR;;;BU)(A;;FR;;;BU)(A;OICI;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)';" set "d=!d! $AclObject = New-Object System.Security.AccessControl.DirectorySecurity;" set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" %psc% "!d!" %nul% + if exist "%tokenstore%\" ( call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]" ) else ( call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) set error=1 set showfix=1 ) ) - -if not defined notwinact ( -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined apps ( -set "_notfoundids=Key Not Installed / Act ID Not Found" -call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f -if not defined allapps ( -set error=1 -set "_notfoundids=Not found" -) -call :dk_color %Red% "Checking Activation IDs [!_notfoundids!]" -) -) -) - - -if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( -set error=1 -call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" -) - - -if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) -echo !taskinfo! | find /i "Ready" %nul% || ( -reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]" -if not defined error call :dk_color %Blue% "Reboot your machine using the restart option." -) -) -) - +::============================== :: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. set permerror= -if %winbuild% GEQ 9200 if not defined ps32onArm ( +if %winbuild% GEQ 9200 if not defined toerr if not defined ps32onArm if exist "%tokenstore%\" ( for %%# in ( "%tokenstore%+FullControl" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" @@ -3359,29 +3284,288 @@ if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP" ) if defined permerror ( -set error=1 call :dk_color %Red% "Checking SPP Permissions [!permerror!]" -if not defined showfix call :dk_color %Blue% "%_fixmsg%" -set showfix=1 -) -) - - -:: If required services are not disabled or corrupted + if there is any error + SoftwareLicensingService errorlevel is not Zero + no fix was shown before - -if not defined serv_cor if not defined serv_cste if defined error if /i not %error_code%==0 if not defined showfix ( -if not defined permerror if defined wpaerror (call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." & set showfix=1) if not defined showfix ( -set showfix=1 +echo: call :dk_color %Blue% "%_fixmsg%" -if not defined permerror call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 ) ) -if not defined showfix if defined wpaerror ( +::============================== + +:: Check WPA Registry Errors + +set chkalp= +set wpainfo=NotFound +for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) +for /f "delims=0123456789" %%i in ("%wpainfo%") do set chkalp=%%i + +if defined chkalp ( +call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" +if not defined showfix ( +echo "%wpainfo%" | find /i "Error Found" %nul% && ( +echo: +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +set error=1 set showfix=1 -call :dk_color %Blue% "If activation fails then go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." ) +) +set wpainfo=a +) + +if not defined chkalp ( +if %wpainfo% GEQ 5000 ( +call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" +echo: +call :dk_color %Blue% "A large number of WPA registries have been found, which may cause high CPU usage." +call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." +echo: +) else ( +echo Checking WPA Registry Count [%wpainfo%] +) +) + +::============================== + +:: Check Rearm + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( +call :dk_color %Red% "Checking Rearm [System is Rearmed]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +set showfix=1 +) + + +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( +call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." +echo: +) +set error=1 +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 ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check Activation IDs + +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps ( +%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f +) + +if not defined apps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f + +if not defined apps if defined allapps if not defined notwinact ( +call :dk_color %Gray% "Checking Activation IDs [Key Not Installed or Act ID Not Found]" +) + +if not defined apps if not defined allapps ( +call :dk_color %Red% "Checking Activation IDs [Not found]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) +set error=1 +set showfix=1 +) + +if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( +call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" +) + +::============================== + +:: Check Eval Windows + +if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( +call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]" +if not defined showfix ( +echo: +call :dk_color %Blue% "License swapping is not the right way to upgrade to the full version. Learn the correct method at the link below." +set fixes=%fixes% %mas%evaluation_editions +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" +echo: +) +set error=1 +set showfix=1 +) +) + +::============================== + +:: Check HKU\S-1-5-20\Software registry, in some systems it's missing and that causes Windows activation problems + +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( +call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" +if not defined showfix ( +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +echo: +) +set error=1 +set showfix=1 +) + +::============================== + +:: Check license and package files for the current edition + +set osedition=0 +if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" +if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" +%chkedi% do if not errorlevel 1 (call set "osedition=%%a") + +if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" + +:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional + +if not %osedition%==0 ( +if "%osSKU%"=="164" set osedition=ProfessionalEducation +if "%osSKU%"=="165" set osedition=ProfessionalEducationN +) + +if not defined notwinact ( +if %osedition%==0 ( +call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" +) else ( +if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( +set skunotfound=1 +call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" +) +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( +if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( +call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" +) +) +) +) + +::============================== + +:: Check SKU value to find if there is any difference + +if not defined notwinact ( +if %winbuild% GEQ 10240 ( +%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" +set /a "sum/=3" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" +) +) else ( +%nul% set /a "sum=%slcSKU%+%wmiSKU%" +set /a "sum/=2" +if not "!sum!"=="%slcSKU%" ( +call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" +) +) +) + +::============================== + +:: 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" ( +echo Checking Eval WLMS Service [Found] +) + +::============================== + +:: Check SPP interference in IFEO + +for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) +) +if defined _sppint ( +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: +) +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) +) + +::============================== + +:: Check and fix SkipRearm registry value + +if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% +call :dk_color %Gray% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" +%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" +) + +::============================== + +:: Check SvcRestartTask status, this task helps in making sure system remains activated + +if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( +%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( +for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) + +echo !taskinfo! | find /i "Ready" %nul% || ( +reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% +reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed +if "!taskinfo!"=="" set "taskinfo=Not Found" + +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +if not defined showfix ( +echo: +call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +echo: +) +) +) +) + +::============================== exit /b From dba7213a91d6ee8d206fe515a5e0a971a1e96de7 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 2 Aug 2025 22:06:03 +0530 Subject: [PATCH 052/117] Fix a typo --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/KMS38_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 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index eb54941..16276f3 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1613,7 +1613,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index aa27890..af45783 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1297,7 +1297,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 667bad5..91b6211 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1391,7 +1391,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index a102962..5e85e08 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1979,7 +1979,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index bc3994d..080b0eb 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -3035,7 +3035,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 266d94c..7f261e5 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -3042,7 +3042,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="sppsvc-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) From e476ac66a45db32b289179d7c016f2cd4ed4601a Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 3 Aug 2025 01:45:30 +0530 Subject: [PATCH 053/117] Detect Windows Sandbox --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 10 ++++++++++ .../Activators/HWID_Activation.cmd | 10 ++++++++++ .../Activators/KMS38_Activation.cmd | 10 ++++++++++ .../Activators/Ohook_Activation_AIO.cmd | 10 ++++++++++ .../Activators/Online_KMS_Activation.cmd | 10 ++++++++++ .../Activators/TSforge_Activation.cmd | 10 ++++++++++ MAS/Separate-Files-Version/Change_Office_Edition.cmd | 10 ++++++++++ MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 10 ++++++++++ MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 10 ++++++++++ MAS/Separate-Files-Version/Troubleshoot.cmd | 10 ++++++++++ 10 files changed, 100 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 16276f3..a64b2a6 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -143,6 +143,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) +if not exist "%SysPath%\logoff.exe" ( +sc query gcs | find /i "RUNNING" %nul% && ( +%eline% +echo Windows Sandbox detected; activation is not required. +echo The script cannot run due to missing licensing components. Aborting... +echo: +goto dk_done +) +) + if %winbuild% LSS 6001 ( %nceline% echo Unsupported OS version detected [%winbuild%]. diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index af45783..ff22690 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -173,6 +173,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) +if not exist "%SysPath%\logoff.exe" ( +sc query gcs | find /i "RUNNING" %nul% && ( +%eline% +echo Windows Sandbox detected; activation is not required. +echo The script cannot run due to missing licensing components. Aborting... +echo: +goto dk_done +) +) + if %winbuild% LSS 10240 ( %eline% echo Unsupported OS version detected [%winbuild%]. diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 91b6211..c27c2e3 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -175,6 +175,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) +if not exist "%SysPath%\logoff.exe" ( +sc query gcs | find /i "RUNNING" %nul% && ( +%eline% +echo Windows Sandbox detected; activation is not required. +echo The script cannot run due to missing licensing components. Aborting... +echo: +goto dk_done +) +) + if %winbuild% LSS 14393 ( %eline% echo Unsupported OS version detected [%winbuild%]. diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 5e85e08..0232316 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -173,6 +173,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) +if not exist "%SysPath%\logoff.exe" ( +sc query gcs | find /i "RUNNING" %nul% && ( +%eline% +echo Windows Sandbox detected; activation is not required. +echo The script cannot run due to missing licensing components. Aborting... +echo: +goto dk_done +) +) + if %winbuild% LSS 6001 ( %nceline% echo Unsupported OS version detected [%winbuild%]. diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 080b0eb..86571d2 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -204,6 +204,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) +if not exist "%SysPath%\logoff.exe" ( +sc query gcs | find /i "RUNNING" %nul% && ( +%eline% +echo Windows Sandbox detected; activation is not required. +echo The script cannot run due to missing licensing components. Aborting... +echo: +goto dk_done +) +) + if %winbuild% LSS 6001 ( %nceline% echo Unsupported OS version detected [%winbuild%]. diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 7f261e5..57939b5 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -219,6 +219,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) +if not exist "%SysPath%\logoff.exe" ( +sc query gcs | find /i "RUNNING" %nul% && ( +%eline% +echo Windows Sandbox detected; activation is not required. +echo The script cannot run due to missing licensing components. Aborting... +echo: +goto dk_done +) +) + if %winbuild% LSS 6001 ( %nceline% echo Unsupported OS version detected [%winbuild%]. diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 58ac14d..006c98d 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -135,6 +135,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) +if not exist "%SysPath%\logoff.exe" ( +sc query gcs | find /i "RUNNING" %nul% && ( +%eline% +echo Windows Sandbox detected; activation is not required. +echo The script cannot run due to missing licensing components. Aborting... +echo: +goto dk_done +) +) + if %winbuild% LSS 7600 ( %eline% echo Unsupported OS version detected [%winbuild%]. diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index b0d0231..cf6b408 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -140,6 +140,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) +if not exist "%SysPath%\logoff.exe" ( +sc query gcs | find /i "RUNNING" %nul% && ( +%eline% +echo Windows Sandbox detected; activation is not required. +echo The script cannot run due to missing licensing components. Aborting... +echo: +goto dk_done +) +) + if %winbuild% LSS 7600 ( %eline% echo Unsupported OS version detected [%winbuild%]. diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index a007f6b..26f6c72 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -134,6 +134,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto done2 ) +if not exist "%SysPath%\logoff.exe" ( +sc query gcs | find /i "RUNNING" %nul% && ( +%eline% +echo Windows Sandbox detected; activation is not required. +echo The script cannot run due to missing licensing components. Aborting... +echo: +goto done2 +) +) + if %winbuild% LSS 6001 ( %nceline% echo Unsupported OS version detected [%winbuild%]. diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index ac66d6e..8372a1b 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -135,6 +135,16 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) +if not exist "%SysPath%\logoff.exe" ( +sc query gcs | find /i "RUNNING" %nul% && ( +%eline% +echo Windows Sandbox detected; activation is not required. +echo The script cannot run due to missing licensing components. Aborting... +echo: +goto dk_done +) +) + if %winbuild% LSS 6001 ( %nceline% echo Unsupported OS version detected [%winbuild%]. From 9c09432b01c4094c987edf333d86b247891c2cda Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 3 Aug 2025 01:49:35 +0530 Subject: [PATCH 054/117] Update error message --- 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 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 006c98d..bf09be0 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -138,7 +138,7 @@ goto dk_done if not exist "%SysPath%\logoff.exe" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% -echo Windows Sandbox detected; activation is not required. +echo Windows Sandbox detected. echo The script cannot run due to missing licensing components. Aborting... echo: goto dk_done diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index cf6b408..677a34e 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -143,7 +143,7 @@ goto dk_done if not exist "%SysPath%\logoff.exe" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% -echo Windows Sandbox detected; activation is not required. +echo Windows Sandbox detected. echo The script cannot run due to missing licensing components. Aborting... echo: goto dk_done diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 26f6c72..2d56b73 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -137,7 +137,7 @@ goto done2 if not exist "%SysPath%\logoff.exe" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% -echo Windows Sandbox detected; activation is not required. +echo Windows Sandbox detected. echo The script cannot run due to missing licensing components. Aborting... echo: goto done2 diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 8372a1b..1aad724 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -138,7 +138,7 @@ goto dk_done if not exist "%SysPath%\logoff.exe" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% -echo Windows Sandbox detected; activation is not required. +echo Windows Sandbox detected. echo The script cannot run due to missing licensing components. Aborting... echo: goto dk_done From c619a2c3818784fbb645cf42859ea6af61f5063e Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 3 Aug 2025 03:28:06 +0530 Subject: [PATCH 055/117] Add a message about KMS renewal notification in 26200 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 12 +++++++++++- .../Activators/KMS38_Activation.cmd | 5 +++++ .../Activators/TSforge_Activation.cmd | 7 ++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index a64b2a6..e97fabb 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -4507,7 +4507,7 @@ echo Checking Internet Connection [Connected!ping_f!] ) else ( if /i %_actmethod%==Auto if not %_actman%==1 set tsmethod=KMS4k if /i !tsmethod!==KMS4k ( -call :dk_color %Gray% "Checking Internet Connection [Not Connected]" +call :dk_color %Red% "Checking Internet Connection [Not Connected]" call :dk_color %Blue% "Switching To KMS4k activation because Internet is needed for StaticCID method." ) else ( set error=1 @@ -5754,6 +5754,11 @@ if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) else ( +if /i %tsmethod%==KMS4k if %winbuild% GEQ 26200 ( +echo: +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." +) 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." ) @@ -12397,6 +12402,11 @@ echo Removing the Added Specific KMS Host [Successful] ) ) +if defined _k38 if %winbuild% GEQ 26200 ( +call :dk_color %Gray% "In Windows settings, you may see a renewal notification for activation that can be ignored." +call :dk_color %Gray% "To avoid this notification, please use the HWID or TSforge activation options in the main menu." +) + :: clipup.exe does not exist in server cor and acor editions by default, it was copied there with this script if defined a_cor if exist "%_clipup%" del /f /q "%_clipup%" %nul% diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index c27c2e3..03c7701 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -837,6 +837,11 @@ echo Removing the Added Specific KMS Host [Successful] ) ) +if defined _k38 if %winbuild% GEQ 26200 ( +call :dk_color %Gray% "In Windows settings, you may see a renewal notification for activation that can be ignored." +call :dk_color %Gray% "To avoid this notification, please use the HWID or TSforge activation options in the main menu." +) + :: clipup.exe does not exist in server cor and acor editions by default, it was copied there with this script if defined a_cor if exist "%_clipup%" del /f /q "%_clipup%" %nul% diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 57939b5..a77ea5b 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -684,7 +684,7 @@ echo Checking Internet Connection [Connected!ping_f!] ) else ( if /i %_actmethod%==Auto if not %_actman%==1 set tsmethod=KMS4k if /i !tsmethod!==KMS4k ( -call :dk_color %Gray% "Checking Internet Connection [Not Connected]" +call :dk_color %Red% "Checking Internet Connection [Not Connected]" call :dk_color %Blue% "Switching To KMS4k activation because Internet is needed for StaticCID method." ) else ( set error=1 @@ -1931,6 +1931,11 @@ if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) else ( +if /i %tsmethod%==KMS4k if %winbuild% GEQ 26200 ( +echo: +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." +) 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." ) From 5e2cc4f5cf79d55f0302bffdb439544480b24d88 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 3 Aug 2025 04:10:11 +0530 Subject: [PATCH 056/117] Update sandbox detection code --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 ++-- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 4 ++-- MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 2 +- .../Activators/Ohook_Activation_AIO.cmd | 2 +- .../Activators/Online_KMS_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 2 +- 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 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index e97fabb..43d13d6 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -143,10 +143,10 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) -if not exist "%SysPath%\logoff.exe" ( +if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% -echo Windows Sandbox detected; activation is not required. +echo Windows Sandbox detected; activation is not supported. echo The script cannot run due to missing licensing components. Aborting... echo: goto dk_done diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index ff22690..9847b18 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -173,10 +173,10 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) -if not exist "%SysPath%\logoff.exe" ( +if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% -echo Windows Sandbox detected; activation is not required. +echo Windows Sandbox detected; activation is not supported. echo The script cannot run due to missing licensing components. Aborting... echo: goto dk_done diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 03c7701..d22164f 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -175,7 +175,7 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) -if not exist "%SysPath%\logoff.exe" ( +if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% echo Windows Sandbox detected; activation is not required. diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 0232316..5e7f2c5 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -173,7 +173,7 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) -if not exist "%SysPath%\logoff.exe" ( +if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% echo Windows Sandbox detected; activation is not required. diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 86571d2..25bd54a 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -204,7 +204,7 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) -if not exist "%SysPath%\logoff.exe" ( +if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% echo Windows Sandbox detected; activation is not required. diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index a77ea5b..c75f1c7 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -219,7 +219,7 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) -if not exist "%SysPath%\logoff.exe" ( +if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% echo Windows Sandbox detected; activation is not required. diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index bf09be0..69d43df 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -135,7 +135,7 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) -if not exist "%SysPath%\logoff.exe" ( +if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% echo Windows Sandbox detected. diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 677a34e..1741b69 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -140,7 +140,7 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) -if not exist "%SysPath%\logoff.exe" ( +if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% echo Windows Sandbox detected. diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 2d56b73..555dd3f 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -134,7 +134,7 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto done2 ) -if not exist "%SysPath%\logoff.exe" ( +if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% echo Windows Sandbox detected. diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 1aad724..9ce97a2 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -135,7 +135,7 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%trouble goto dk_done ) -if not exist "%SysPath%\logoff.exe" ( +if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% echo Windows Sandbox detected. From 904e96d748045bec1c3f5bb4eba2373b47be5777 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 4 Aug 2025 02:05:13 +0530 Subject: [PATCH 057/117] Check .NET corruption --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 18 ++++++++++++++++- .../Activators/HWID_Activation.cmd | 18 ++++++++++++++++- .../Activators/KMS38_Activation.cmd | 20 +++++++++++++++++-- .../Activators/Ohook_Activation_AIO.cmd | 20 +++++++++++++++++-- .../Activators/Online_KMS_Activation.cmd | 20 +++++++++++++++++-- .../Activators/TSforge_Activation.cmd | 20 +++++++++++++++++-- .../Change_Office_Edition.cmd | 18 ++++++++++++++++- .../Change_Windows_Edition.cmd | 18 ++++++++++++++++- .../Extract_OEM_Folder.cmd | 18 ++++++++++++++++- MAS/Separate-Files-Version/Troubleshoot.cmd | 18 ++++++++++++++++- 10 files changed, 174 insertions(+), 14 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 43d13d6..4cec6f1 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -249,9 +249,25 @@ REM check Powershell core version cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" goto dk_done ) +REM check if .NET is working properly + +if /i "!tstresult2!"=="FullLanguage" ( +cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% +if !errorlevel!==3 ( +echo Windows Powershell failed to load .NET command. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +goto dk_done +) +) + REM check for Mal-ware that may cause issues with Powershell for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( @@ -269,7 +285,7 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: -echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo Your antivirus software might be blocking the script. echo: sc query sense | find /i "RUNNING" %nul% && ( echo Installed Antivirus - Microsoft Defender for Endpoint diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 9847b18..876f1ad 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -271,9 +271,25 @@ REM check Powershell core version cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" goto dk_done ) +REM check if .NET is working properly + +if /i "!tstresult2!"=="FullLanguage" ( +cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% +if !errorlevel!==3 ( +echo Windows Powershell failed to load .NET command. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +goto dk_done +) +) + REM check for Mal-ware that may cause issues with Powershell for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( @@ -291,7 +307,7 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: -echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo Your antivirus software might be blocking the script. echo: sc query sense | find /i "RUNNING" %nul% && ( echo Installed Antivirus - Microsoft Defender for Endpoint diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index d22164f..97d332c 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -178,7 +178,7 @@ goto dk_done if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% -echo Windows Sandbox detected; activation is not required. +echo Windows Sandbox detected; activation is not supported. echo The script cannot run due to missing licensing components. Aborting... echo: goto dk_done @@ -270,9 +270,25 @@ REM check Powershell core version cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" goto dk_done ) +REM check if .NET is working properly + +if /i "!tstresult2!"=="FullLanguage" ( +cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% +if !errorlevel!==3 ( +echo Windows Powershell failed to load .NET command. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +goto dk_done +) +) + REM check for Mal-ware that may cause issues with Powershell for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( @@ -290,7 +306,7 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: -echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo Your antivirus software might be blocking the script. echo: sc query sense | find /i "RUNNING" %nul% && ( echo Installed Antivirus - Microsoft Defender for Endpoint diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 5e7f2c5..910f218 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -176,7 +176,7 @@ goto dk_done if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% -echo Windows Sandbox detected; activation is not required. +echo Windows Sandbox detected; activation is not supported. echo The script cannot run due to missing licensing components. Aborting... echo: goto dk_done @@ -279,9 +279,25 @@ REM check Powershell core version cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" goto dk_done ) +REM check if .NET is working properly + +if /i "!tstresult2!"=="FullLanguage" ( +cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% +if !errorlevel!==3 ( +echo Windows Powershell failed to load .NET command. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +goto dk_done +) +) + REM check for Mal-ware that may cause issues with Powershell for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( @@ -299,7 +315,7 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: -echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo Your antivirus software might be blocking the script. echo: sc query sense | find /i "RUNNING" %nul% && ( echo Installed Antivirus - Microsoft Defender for Endpoint diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 25bd54a..fa782c2 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -207,7 +207,7 @@ goto dk_done if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% -echo Windows Sandbox detected; activation is not required. +echo Windows Sandbox detected; activation is not supported. echo The script cannot run due to missing licensing components. Aborting... echo: goto dk_done @@ -310,9 +310,25 @@ REM check Powershell core version cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" goto dk_done ) +REM check if .NET is working properly + +if /i "!tstresult2!"=="FullLanguage" ( +cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% +if !errorlevel!==3 ( +echo Windows Powershell failed to load .NET command. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +goto dk_done +) +) + REM check for Mal-ware that may cause issues with Powershell for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( @@ -330,7 +346,7 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: -echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo Your antivirus software might be blocking the script. echo: sc query sense | find /i "RUNNING" %nul% && ( echo Installed Antivirus - Microsoft Defender for Endpoint diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index c75f1c7..b6672f0 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -222,7 +222,7 @@ goto dk_done if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( sc query gcs | find /i "RUNNING" %nul% && ( %eline% -echo Windows Sandbox detected; activation is not required. +echo Windows Sandbox detected; activation is not supported. echo The script cannot run due to missing licensing components. Aborting... echo: goto dk_done @@ -337,9 +337,25 @@ REM check Powershell core version cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" goto dk_done ) +REM check if .NET is working properly + +if /i "!tstresult2!"=="FullLanguage" ( +cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% +if !errorlevel!==3 ( +echo Windows Powershell failed to load .NET command. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +goto dk_done +) +) + REM check for Mal-ware that may cause issues with Powershell for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( @@ -357,7 +373,7 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: -echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo Your antivirus software might be blocking the script. echo: sc query sense | find /i "RUNNING" %nul% && ( echo Installed Antivirus - Microsoft Defender for Endpoint diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 69d43df..a8b2cfa 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -224,9 +224,25 @@ REM check Powershell core version cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" goto dk_done ) +REM check if .NET is working properly + +if /i "!tstresult2!"=="FullLanguage" ( +cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% +if !errorlevel!==3 ( +echo Windows Powershell failed to load .NET command. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +goto dk_done +) +) + REM check for Mal-ware that may cause issues with Powershell for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( @@ -244,7 +260,7 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: -echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo Your antivirus software might be blocking the script. echo: sc query sense | find /i "RUNNING" %nul% && ( echo Installed Antivirus - Microsoft Defender for Endpoint diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 1741b69..a55ea3b 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -229,9 +229,25 @@ REM check Powershell core version cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" goto dk_done ) +REM check if .NET is working properly + +if /i "!tstresult2!"=="FullLanguage" ( +cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% +if !errorlevel!==3 ( +echo Windows Powershell failed to load .NET command. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +goto dk_done +) +) + REM check for Mal-ware that may cause issues with Powershell for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( @@ -249,7 +265,7 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: -echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo Your antivirus software might be blocking the script. echo: sc query sense | find /i "RUNNING" %nul% && ( echo Installed Antivirus - Microsoft Defender for Endpoint diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 555dd3f..852fc6e 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -240,9 +240,25 @@ REM check Powershell core version cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" goto done2 ) +REM check if .NET is working properly + +if /i "!tstresult2!"=="FullLanguage" ( +cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% +if !errorlevel!==3 ( +echo Windows Powershell failed to load .NET command. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +goto done2 +) +) + REM check for Mal-ware that may cause issues with Powershell for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( @@ -260,7 +276,7 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: -echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo Your antivirus software might be blocking the script. echo: sc query sense | find /i "RUNNING" %nul% && ( echo Installed Antivirus - Microsoft Defender for Endpoint diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 9ce97a2..6c29b5a 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -241,9 +241,25 @@ REM check Powershell core version cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" goto dk_done ) +REM check if .NET is working properly + +if /i "!tstresult2!"=="FullLanguage" ( +cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% +if !errorlevel!==3 ( +echo Windows Powershell failed to load .NET command. Aborting... +echo: +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +goto dk_done +) +) + REM check for Mal-ware that may cause issues with Powershell for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( @@ -261,7 +277,7 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" ( echo: -echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted. +echo Your antivirus software might be blocking the script. echo: sc query sense | find /i "RUNNING" %nul% && ( echo Installed Antivirus - Microsoft Defender for Endpoint From 31c47b9538c9eb19a3af01a6def548861334e55e Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 4 Aug 2025 21:03:49 +0530 Subject: [PATCH 058/117] Minor changes --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 49 +++++++++++++------ .../Activators/HWID_Activation.cmd | 43 +++++++++++----- .../Activators/KMS38_Activation.cmd | 33 +++++++------ .../Activators/Ohook_Activation_AIO.cmd | 27 +++++----- .../Activators/Online_KMS_Activation.cmd | 27 +++++----- .../Activators/TSforge_Activation.cmd | 27 +++++----- .../Change_Office_Edition.cmd | 22 ++++----- .../Change_Windows_Edition.cmd | 22 ++++----- .../Extract_OEM_Folder.cmd | 22 ++++----- MAS/Separate-Files-Version/Troubleshoot.cmd | 22 ++++----- 10 files changed, 174 insertions(+), 120 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 4cec6f1..53c3d59 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -255,6 +255,17 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-plac goto dk_done ) +REM check for Mal-ware that may cause issues with Powershell + +for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( +echo "%%f" +echo Mal%blank%ware found, PowerShell is not working properly. +echo: +set fixes=%fixes% %mas%remove_mal%w%ware +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +goto dk_done +) + REM check if .NET is working properly if /i "!tstresult2!"=="FullLanguage" ( @@ -268,17 +279,6 @@ goto dk_done ) ) -REM check for Mal-ware that may cause issues with Powershell - -for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( -echo "%%f" -echo Mal%blank%ware found, PowerShell is not working properly. -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -goto dk_done -) - REM check antivirus and other errors echo PowerShell is not working properly. Aborting... @@ -974,7 +974,9 @@ call :dk_color %Red% "Checking Ticket Migration [Failed]" if not defined altapplist if not defined showfix if defined rebuildinfo ( set showfix=1 +echo: call :dk_color %Blue% "%_fixmsg%" +echo: ) if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% @@ -1044,8 +1046,10 @@ licensing.mp.microsoft.com findstr /i "%%#" "%SysPath%\drivers\etc\hosts" %nul1% && set "hosfail= [%%# Blocked in Hosts]" ) call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]!hosfail!" +echo: set fixes=%fixes% %mas%licensing-servers-issue call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue" +echo: ) ::========================================================================================================================================== @@ -1058,13 +1062,17 @@ reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DisableWin reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DoNotConnectToWindowsUpdateInternetLocations %nul2% | find /i "0x1" %nul% && set wublock=1 if defined wublock ( call :dk_color %Red% "Checking Update Blocker In Registry [Found]" +echo: call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it." +echo: ) reg query "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v DisableStoreApps %nul2% | find /i "0x1" %nul% && ( set storeblock=1 call :dk_color %Red% "Checking Store Blocker In Registry [Found]" +echo: call :dk_color %Blue% "If you have used any tool to block Store, undo it." +echo: ) set wcount=0 @@ -1081,10 +1089,14 @@ set error=1 call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]" if !wcount! GTR 2 ( call :dk_color %Red% "Windows seems to be infected with Mal%w%ware." +echo: set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +echo: ) else ( +echo: call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it." +echo: ) ) else ( %psc% "Start-Job { Start-Service wuauserv } | Wait-Job -Timeout 20 | Out-Null" @@ -1093,7 +1105,9 @@ set error=1 set wuerror=1 sc start wuauserv %nul% call :dk_color %Red% "Starting Windows Update Service [Failed] [!errorlevel!]" +echo: call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it." +echo: ) ) ) @@ -1106,8 +1120,10 @@ if %keyerror% EQU 0 if not defined _perm if defined _int ( if not defined wucorrupt if not defined wublock if not defined wuerror if not defined storeblock if not defined resfail ( echo "%error_code%" | findstr /i "0x80072e 0x80072f 0x800704cf 0x87e10bcf 0x800705b4" %nul% && ( call :dk_color %Red% "Checking Internet Issues [Found] %error_code%" +echo: set fixes=%fixes% %mas%licensing-servers-issue call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue" +echo: ) ) ) @@ -1314,9 +1330,11 @@ if %sps%==SoftwareLicensingService call :dk_refresh echo %keyecho% %~1 [Successful] ) else ( call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" -if not defined error ( +if not defined showfix ( if defined altapplist call :dk_color %Red% "Activation ID not found for this key." +echo: call :dk_color %Blue% "%_fixmsg%" +echo: set showfix=1 ) set error=1 @@ -1533,6 +1551,7 @@ if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." if defined results (call :dk_color %Red% "%results%"&set showfix=1) +echo: set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: @@ -12260,9 +12279,9 @@ set k_error= %nul% reg add "HKLM\%specific_kms%\%app%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" || set k_error=1 if not defined k_error ( -echo Adding Specific KMS Host [LocalHost 127.0.0.2] [Successful] +echo Adding Specific KMS Host [LocalHost] [Successful] ) else ( -call :dk_color %Red% "Adding Specific KMS Host [LocalHost 127.0.0.2] [Failed]" +call :dk_color %Red% "Adding Specific KMS Host [LocalHost] [Failed]" ) ::======================================================================================================================================== @@ -12358,7 +12377,9 @@ call :dk_color %Red% "Checking Ticket Migration [Failed]" if not defined showfix if defined rebuildinfo ( set showfix=1 +echo: call :dk_color %Blue% "%_fixmsg%" +echo: ) if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 876f1ad..bfee7df 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -277,6 +277,17 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-plac goto dk_done ) +REM check for Mal-ware that may cause issues with Powershell + +for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( +echo "%%f" +echo Mal%blank%ware found, PowerShell is not working properly. +echo: +set fixes=%fixes% %mas%remove_mal%w%ware +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +goto dk_done +) + REM check if .NET is working properly if /i "!tstresult2!"=="FullLanguage" ( @@ -290,17 +301,6 @@ goto dk_done ) ) -REM check for Mal-ware that may cause issues with Powershell - -for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( -echo "%%f" -echo Mal%blank%ware found, PowerShell is not working properly. -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -goto dk_done -) - REM check antivirus and other errors echo PowerShell is not working properly. Aborting... @@ -674,7 +674,9 @@ call :dk_color %Red% "Checking Ticket Migration [Failed]" if not defined altapplist if not defined showfix if defined rebuildinfo ( set showfix=1 +echo: call :dk_color %Blue% "%_fixmsg%" +echo: ) if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% @@ -744,8 +746,10 @@ licensing.mp.microsoft.com findstr /i "%%#" "%SysPath%\drivers\etc\hosts" %nul1% && set "hosfail= [%%# Blocked in Hosts]" ) call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]!hosfail!" +echo: set fixes=%fixes% %mas%licensing-servers-issue call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue" +echo: ) ::========================================================================================================================================== @@ -758,13 +762,17 @@ reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DisableWin reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DoNotConnectToWindowsUpdateInternetLocations %nul2% | find /i "0x1" %nul% && set wublock=1 if defined wublock ( call :dk_color %Red% "Checking Update Blocker In Registry [Found]" +echo: call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it." +echo: ) reg query "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v DisableStoreApps %nul2% | find /i "0x1" %nul% && ( set storeblock=1 call :dk_color %Red% "Checking Store Blocker In Registry [Found]" +echo: call :dk_color %Blue% "If you have used any tool to block Store, undo it." +echo: ) set wcount=0 @@ -781,10 +789,14 @@ set error=1 call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]" if !wcount! GTR 2 ( call :dk_color %Red% "Windows seems to be infected with Mal%w%ware." +echo: set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +echo: ) else ( +echo: call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it." +echo: ) ) else ( %psc% "Start-Job { Start-Service wuauserv } | Wait-Job -Timeout 20 | Out-Null" @@ -793,7 +805,9 @@ set error=1 set wuerror=1 sc start wuauserv %nul% call :dk_color %Red% "Starting Windows Update Service [Failed] [!errorlevel!]" +echo: call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it." +echo: ) ) ) @@ -806,8 +820,10 @@ if %keyerror% EQU 0 if not defined _perm if defined _int ( if not defined wucorrupt if not defined wublock if not defined wuerror if not defined storeblock if not defined resfail ( echo "%error_code%" | findstr /i "0x80072e 0x80072f 0x800704cf 0x87e10bcf 0x800705b4" %nul% && ( call :dk_color %Red% "Checking Internet Issues [Found] %error_code%" +echo: set fixes=%fixes% %mas%licensing-servers-issue call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue" +echo: ) ) ) @@ -1014,9 +1030,11 @@ if %sps%==SoftwareLicensingService call :dk_refresh echo %keyecho% %~1 [Successful] ) else ( call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" -if not defined error ( +if not defined showfix ( if defined altapplist call :dk_color %Red% "Activation ID not found for this key." +echo: call :dk_color %Blue% "%_fixmsg%" +echo: set showfix=1 ) set error=1 @@ -1217,6 +1235,7 @@ if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." if defined results (call :dk_color %Red% "%results%"&set showfix=1) +echo: set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 97d332c..51c9913 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -276,6 +276,17 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-plac goto dk_done ) +REM check for Mal-ware that may cause issues with Powershell + +for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( +echo "%%f" +echo Mal%blank%ware found, PowerShell is not working properly. +echo: +set fixes=%fixes% %mas%remove_mal%w%ware +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +goto dk_done +) + REM check if .NET is working properly if /i "!tstresult2!"=="FullLanguage" ( @@ -289,17 +300,6 @@ goto dk_done ) ) -REM check for Mal-ware that may cause issues with Powershell - -for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( -echo "%%f" -echo Mal%blank%ware found, PowerShell is not working properly. -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -goto dk_done -) - REM check antivirus and other errors echo PowerShell is not working properly. Aborting... @@ -695,9 +695,9 @@ set k_error= %nul% reg add "HKLM\%specific_kms%\%app%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" || set k_error=1 if not defined k_error ( -echo Adding Specific KMS Host [LocalHost 127.0.0.2] [Successful] +echo Adding Specific KMS Host [LocalHost] [Successful] ) else ( -call :dk_color %Red% "Adding Specific KMS Host [LocalHost 127.0.0.2] [Failed]" +call :dk_color %Red% "Adding Specific KMS Host [LocalHost] [Failed]" ) ::======================================================================================================================================== @@ -793,7 +793,9 @@ call :dk_color %Red% "Checking Ticket Migration [Failed]" if not defined showfix if defined rebuildinfo ( set showfix=1 +echo: call :dk_color %Blue% "%_fixmsg%" +echo: ) if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% @@ -1089,9 +1091,11 @@ if %sps%==SoftwareLicensingService call :dk_refresh echo %keyecho% %~1 [Successful] ) else ( call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" -if not defined error ( +if not defined showfix ( if defined altapplist call :dk_color %Red% "Activation ID not found for this key." +echo: call :dk_color %Blue% "%_fixmsg%" +echo: set showfix=1 ) set error=1 @@ -1316,6 +1320,7 @@ if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." if defined results (call :dk_color %Red% "%results%"&set showfix=1) +echo: set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 910f218..211d28c 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -285,6 +285,17 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-plac goto dk_done ) +REM check for Mal-ware that may cause issues with Powershell + +for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( +echo "%%f" +echo Mal%blank%ware found, PowerShell is not working properly. +echo: +set fixes=%fixes% %mas%remove_mal%w%ware +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +goto dk_done +) + REM check if .NET is working properly if /i "!tstresult2!"=="FullLanguage" ( @@ -298,17 +309,6 @@ goto dk_done ) ) -REM check for Mal-ware that may cause issues with Powershell - -for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( -echo "%%f" -echo Mal%blank%ware found, PowerShell is not working properly. -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -goto dk_done -) - REM check antivirus and other errors echo PowerShell is not working properly. Aborting... @@ -1743,9 +1743,11 @@ if %sps%==SoftwareLicensingService call :dk_refresh echo %keyecho% %~1 [Successful] ) else ( call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" -if not defined error ( +if not defined showfix ( if defined altapplist call :dk_color %Red% "Activation ID not found for this key." +echo: call :dk_color %Blue% "%_fixmsg%" +echo: set showfix=1 ) set error=1 @@ -1899,6 +1901,7 @@ if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." if defined results (call :dk_color %Red% "%results%"&set showfix=1) +echo: set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index fa782c2..50217b4 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -316,6 +316,17 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-plac goto dk_done ) +REM check for Mal-ware that may cause issues with Powershell + +for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( +echo "%%f" +echo Mal%blank%ware found, PowerShell is not working properly. +echo: +set fixes=%fixes% %mas%remove_mal%w%ware +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +goto dk_done +) + REM check if .NET is working properly if /i "!tstresult2!"=="FullLanguage" ( @@ -329,17 +340,6 @@ goto dk_done ) ) -REM check for Mal-ware that may cause issues with Powershell - -for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( -echo "%%f" -echo Mal%blank%ware found, PowerShell is not working properly. -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -goto dk_done -) - REM check antivirus and other errors echo PowerShell is not working properly. Aborting... @@ -2712,9 +2712,11 @@ if %sps%==SoftwareLicensingService call :dk_refresh echo %keyecho% %~1 [Successful] ) else ( call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" -if not defined error ( +if not defined showfix ( if defined altapplist call :dk_color %Red% "Activation ID not found for this key." +echo: call :dk_color %Blue% "%_fixmsg%" +echo: set showfix=1 ) set error=1 @@ -2955,6 +2957,7 @@ if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." if defined results (call :dk_color %Red% "%results%"&set showfix=1) +echo: set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index b6672f0..7f367f6 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -343,6 +343,17 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-plac goto dk_done ) +REM check for Mal-ware that may cause issues with Powershell + +for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( +echo "%%f" +echo Mal%blank%ware found, PowerShell is not working properly. +echo: +set fixes=%fixes% %mas%remove_mal%w%ware +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +goto dk_done +) + REM check if .NET is working properly if /i "!tstresult2!"=="FullLanguage" ( @@ -356,17 +367,6 @@ goto dk_done ) ) -REM check for Mal-ware that may cause issues with Powershell - -for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( -echo "%%f" -echo Mal%blank%ware found, PowerShell is not working properly. -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -goto dk_done -) - REM check antivirus and other errors echo PowerShell is not working properly. Aborting... @@ -2766,9 +2766,11 @@ if %sps%==SoftwareLicensingService call :dk_refresh echo %keyecho% %~1 [Successful] ) else ( call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" -if not defined error ( +if not defined showfix ( if defined altapplist call :dk_color %Red% "Activation ID not found for this key." +echo: call :dk_color %Blue% "%_fixmsg%" +echo: set showfix=1 ) set error=1 @@ -2967,6 +2969,7 @@ if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." if defined results (call :dk_color %Red% "%results%"&set showfix=1) +echo: set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" echo: diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index a8b2cfa..b9c73d8 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -230,6 +230,17 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-plac goto dk_done ) +REM check for Mal-ware that may cause issues with Powershell + +for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( +echo "%%f" +echo Mal%blank%ware found, PowerShell is not working properly. +echo: +set fixes=%fixes% %mas%remove_mal%w%ware +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +goto dk_done +) + REM check if .NET is working properly if /i "!tstresult2!"=="FullLanguage" ( @@ -243,17 +254,6 @@ goto dk_done ) ) -REM check for Mal-ware that may cause issues with Powershell - -for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( -echo "%%f" -echo Mal%blank%ware found, PowerShell is not working properly. -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -goto dk_done -) - REM check antivirus and other errors echo PowerShell is not working properly. Aborting... diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index a55ea3b..20c6c22 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -235,6 +235,17 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-plac goto dk_done ) +REM check for Mal-ware that may cause issues with Powershell + +for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( +echo "%%f" +echo Mal%blank%ware found, PowerShell is not working properly. +echo: +set fixes=%fixes% %mas%remove_mal%w%ware +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +goto dk_done +) + REM check if .NET is working properly if /i "!tstresult2!"=="FullLanguage" ( @@ -248,17 +259,6 @@ goto dk_done ) ) -REM check for Mal-ware that may cause issues with Powershell - -for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( -echo "%%f" -echo Mal%blank%ware found, PowerShell is not working properly. -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -goto dk_done -) - REM check antivirus and other errors echo PowerShell is not working properly. Aborting... diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 852fc6e..f6999d0 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -246,6 +246,17 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-plac goto done2 ) +REM check for Mal-ware that may cause issues with Powershell + +for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( +echo "%%f" +echo Mal%blank%ware found, PowerShell is not working properly. +echo: +set fixes=%fixes% %mas%remove_mal%w%ware +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +goto done2 +) + REM check if .NET is working properly if /i "!tstresult2!"=="FullLanguage" ( @@ -259,17 +270,6 @@ goto done2 ) ) -REM check for Mal-ware that may cause issues with Powershell - -for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( -echo "%%f" -echo Mal%blank%ware found, PowerShell is not working properly. -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -goto done2 -) - REM check antivirus and other errors echo PowerShell is not working properly. Aborting... diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 6c29b5a..e5bd3a5 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -247,6 +247,17 @@ call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-plac goto dk_done ) +REM check for Mal-ware that may cause issues with Powershell + +for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( +echo "%%f" +echo Mal%blank%ware found, PowerShell is not working properly. +echo: +set fixes=%fixes% %mas%remove_mal%w%ware +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" +goto dk_done +) + REM check if .NET is working properly if /i "!tstresult2!"=="FullLanguage" ( @@ -260,17 +271,6 @@ goto dk_done ) ) -REM check for Mal-ware that may cause issues with Powershell - -for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( -echo "%%f" -echo Mal%blank%ware found, PowerShell is not working properly. -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -goto dk_done -) - REM check antivirus and other errors echo PowerShell is not working properly. Aborting... From e2c52b4ac812dc2adf17b3a037e4127562be3712 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 4 Aug 2025 21:30:05 +0530 Subject: [PATCH 059/117] Some more minor changes --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 20 +++++++++++++++++-- .../Activators/Ohook_Activation_AIO.cmd | 10 +++++++++- .../Activators/Online_KMS_Activation.cmd | 17 +++++++++++++++- .../Activators/TSforge_Activation.cmd | 13 ++++++++++-- 4 files changed, 54 insertions(+), 6 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 53c3d59..4d9766f 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -3628,7 +3628,15 @@ set upk_result=2 if defined ohookact if not %upk_result%==0 echo: if %upk_result%==1 echo Uninstalling Other/Grace Keys [Successful] -if %upk_result%==2 call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" +if %upk_result%==2 ( +call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: +set showfix=1 +) +) exit /b ::======================================================================================================================================== @@ -5769,6 +5777,7 @@ call :dk_color %Gray% "To activate, check your internet connection and ensure th ) else ( call :dk_color %Blue% "This Windows version is known to not activate due to MS Windows/Server issues." ) +if not defined showfix call :dk_color %Blue% "%_fixmsg%" set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) @@ -5785,7 +5794,7 @@ if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (ec echo: %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';. ([scriptblock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( -if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") +if %_actman%==0 (if not defined showfix call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) else ( @@ -13606,6 +13615,9 @@ call :ks_clearstuff set error_=9 echo Failed to completely clear %KS% Cache. reg query "HKLM\%SPPk%\%_wApp%" /s %nul2% | findstr /i "127.0.0.2" %nul1% && echo KMS38 activation is locked. +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: ) || ( echo Cleared %KS% Cache successfully. ) @@ -13621,6 +13633,10 @@ echo %uline% echo %uline% echo: call :dk_color %Green% "Online %KS% has been successfully uninstalled." +echo: +call :dk_color %Gray% "If you want to reset the activation status," +call :dk_color %Blue% "%_fixmsg%" +echo: echo %uline% ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 211d28c..e47fdf0 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1601,7 +1601,15 @@ set upk_result=2 if defined ohookact if not %upk_result%==0 echo: if %upk_result%==1 echo Uninstalling Other/Grace Keys [Successful] -if %upk_result%==2 call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" +if %upk_result%==2 ( +call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: +set showfix=1 +) +) exit /b ::======================================================================================================================================== diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 50217b4..5023fe3 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -1579,7 +1579,15 @@ set upk_result=2 if defined ohookact if not %upk_result%==0 echo: if %upk_result%==1 echo Uninstalling Other/Grace Keys [Successful] -if %upk_result%==2 call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" +if %upk_result%==2 ( +call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: +set showfix=1 +) +) exit /b ::======================================================================================================================================== @@ -1628,6 +1636,9 @@ call :ks_clearstuff set error_=9 echo Failed to completely clear %KS% Cache. reg query "HKLM\%SPPk%\%_wApp%" /s %nul2% | findstr /i "127.0.0.2" %nul1% && echo KMS38 activation is locked. +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: ) || ( echo Cleared %KS% Cache successfully. ) @@ -1643,6 +1654,10 @@ echo %uline% echo %uline% echo: call :dk_color %Green% "Online %KS% has been successfully uninstalled." +echo: +call :dk_color %Gray% "If you want to reset the activation status," +call :dk_color %Blue% "%_fixmsg%" +echo: echo %uline% ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 7f367f6..d061761 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1927,6 +1927,7 @@ call :dk_color %Gray% "To activate, check your internet connection and ensure th ) else ( call :dk_color %Blue% "This Windows version is known to not activate due to MS Windows/Server issues." ) +if not defined showfix call :dk_color %Blue% "%_fixmsg%" set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) @@ -1943,7 +1944,7 @@ if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (ec echo: %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':tsforge\:.*';. ([scriptblock]::Create($f[1])) %tsids%" if !errorlevel!==3 ( -if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%") +if %_actman%==0 (if not defined showfix call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) else ( @@ -2537,7 +2538,15 @@ set upk_result=2 if defined ohookact if not %upk_result%==0 echo: if %upk_result%==1 echo Uninstalling Other/Grace Keys [Successful] -if %upk_result%==2 call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" +if %upk_result%==2 ( +call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" +if not defined showfix ( +echo: +call :dk_color %Blue% "%_fixmsg%" +echo: +set showfix=1 +) +) exit /b ::======================================================================================================================================== From e6eaeaa682caa17d98f537638b2e3df96210bbfb Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 7 Aug 2025 01:50:09 +0530 Subject: [PATCH 060/117] Detect vnext license and show info --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 22 ++++++++++++++++++- .../Activators/HWID_Activation.cmd | 8 +++++++ .../Activators/KMS38_Activation.cmd | 8 +++++++ .../Activators/Ohook_Activation_AIO.cmd | 22 ++++++++++++++++++- .../Activators/Online_KMS_Activation.cmd | 20 +++++++++++++++++ .../Activators/TSforge_Activation.cmd | 20 +++++++++++++++++ 6 files changed, 98 insertions(+), 2 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 4d9766f..d6d8b5a 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -2003,6 +2003,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( %psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1 call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f ) @@ -2024,6 +2025,13 @@ set error=1 set showfix=1 ) +if not defined showfix if defined rlicfailed ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) + if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" ) @@ -2796,7 +2804,7 @@ if defined ohub call :dk_color %Gray% "Office apps such as Word, Excel are activ echo Help: %mas%troubleshoot ) else ( call :dk_color %Red% "Some errors were detected." -if not defined ierror if not defined showfix if not defined serv_cor if not defined serv_cste call :dk_color %Blue% "%_fixmsg%" +if not defined ierror if not defined showfix call :dk_color %Blue% "%_fixmsg%" echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" @@ -3501,10 +3509,12 @@ call :dk_color %Gray% "Checking Total User Accounts [%counter%]" :: Clear the vNext/shared/device license blocks which may prevent ohook activation +set vnextexist= rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul% for %%x in (15 16) do ( for %%# in (%_sidlist%) do ( +reg query HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1 reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul% for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do ( @@ -3527,6 +3537,7 @@ rmdir /s /q "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\L if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" ( set defname=DEFTEMP-%%# reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul% +reg query HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1 reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul% reg unload HKU\!defname! %nul% ) @@ -3534,6 +3545,15 @@ 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" +echo: +) + :: Clear SharedComputerLicensing for office :: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index bfee7df..456b06f 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1687,6 +1687,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( %psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1 call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f ) @@ -1708,6 +1709,13 @@ set error=1 set showfix=1 ) +if not defined showfix if defined rlicfailed ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) + if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" ) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 51c9913..816834d 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1772,6 +1772,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( %psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1 call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f ) @@ -1793,6 +1794,13 @@ set error=1 set showfix=1 ) +if not defined showfix if defined rlicfailed ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) + if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index e47fdf0..fda8cc7 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -769,7 +769,7 @@ if defined ohub call :dk_color %Gray% "Office apps such as Word, Excel are activ echo Help: %mas%troubleshoot ) else ( call :dk_color %Red% "Some errors were detected." -if not defined ierror if not defined showfix if not defined serv_cor if not defined serv_cste call :dk_color %Blue% "%_fixmsg%" +if not defined ierror if not defined showfix call :dk_color %Blue% "%_fixmsg%" echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" @@ -1474,10 +1474,12 @@ call :dk_color %Gray% "Checking Total User Accounts [%counter%]" :: Clear the vNext/shared/device license blocks which may prevent ohook activation +set vnextexist= rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul% for %%x in (15 16) do ( for %%# in (%_sidlist%) do ( +reg query HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1 reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul% for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do ( @@ -1500,6 +1502,7 @@ rmdir /s /q "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\L if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" ( set defname=DEFTEMP-%%# reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul% +reg query HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1 reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul% reg unload HKU\!defname! %nul% ) @@ -1507,6 +1510,15 @@ 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" +echo: +) + :: Clear SharedComputerLicensing for office :: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation @@ -2361,6 +2373,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( %psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1 call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f ) @@ -2382,6 +2395,13 @@ set error=1 set showfix=1 ) +if not defined showfix if defined rlicfailed ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) + if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 5023fe3..8f7845f 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -1452,10 +1452,12 @@ call :dk_color %Gray% "Checking Total User Accounts [%counter%]" :: Clear the vNext/shared/device license blocks which may prevent ohook activation +set vnextexist= rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul% for %%x in (15 16) do ( for %%# in (%_sidlist%) do ( +reg query HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1 reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul% for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do ( @@ -1478,6 +1480,7 @@ rmdir /s /q "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\L if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" ( set defname=DEFTEMP-%%# reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul% +reg query HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1 reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul% reg unload HKU\!defname! %nul% ) @@ -1485,6 +1488,15 @@ 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" +echo: +) + :: Clear SharedComputerLicensing for office :: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation @@ -3424,6 +3436,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( %psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1 call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f ) @@ -3445,6 +3458,13 @@ set error=1 set showfix=1 ) +if not defined showfix if defined rlicfailed ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) + if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index d061761..d64fc57 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -2411,10 +2411,12 @@ call :dk_color %Gray% "Checking Total User Accounts [%counter%]" :: Clear the vNext/shared/device license blocks which may prevent ohook activation +set vnextexist= rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul% for %%x in (15 16) do ( for %%# in (%_sidlist%) do ( +reg query HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1 reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul% for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do ( @@ -2437,6 +2439,7 @@ rmdir /s /q "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\L if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" ( set defname=DEFTEMP-%%# reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul% +reg query HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1 reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul% reg unload HKU\!defname! %nul% ) @@ -2444,6 +2447,15 @@ 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" +echo: +) + :: Clear SharedComputerLicensing for office :: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation @@ -3430,6 +3442,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( %psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% +if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1 call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f ) @@ -3451,6 +3464,13 @@ set error=1 set showfix=1 ) +if not defined showfix if defined rlicfailed ( +echo: +call :dk_color %Blue% "%_fixmsg%" +call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." +echo: +) + if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" ) From 3a99ea4eeb657b2bc1b04b1326722d4d490d8b0b Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 7 Aug 2025 02:43:05 +0530 Subject: [PATCH 061/117] Fix build version detection on XP and older --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 ++-- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 2 +- .../Activators/Ohook_Activation_AIO.cmd | 2 +- .../Activators/Online_KMS_Activation.cmd | 4 ++-- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 2 +- 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 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index d6d8b5a..e24ba91 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1178,7 +1178,7 @@ goto :dk_done set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe set psc=%ps% -nop -c set winbuild=1 -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set _slexe=sppsvc.exe& set _slser=sppsvc if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc) @@ -13754,7 +13754,7 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe set _tserror= set winbuild=1 set "nul=>nul 2>&1" -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set psc=powershell.exe -nop -c set _slexe=sppsvc.exe& set _slser=sppsvc diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 456b06f..bf64736 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -878,7 +878,7 @@ goto :dk_done set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe set psc=%ps% -nop -c set winbuild=1 -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set _slexe=sppsvc.exe& set _slser=sppsvc if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 816834d..9f4cc0f 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -920,7 +920,7 @@ goto :dk_done set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe set psc=%ps% -nop -c set winbuild=1 -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set _slexe=sppsvc.exe& set _slser=sppsvc if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index fda8cc7..5f061f7 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1674,7 +1674,7 @@ exit /b set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe set psc=%ps% -nop -c set winbuild=1 -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set _slexe=sppsvc.exe& set _slser=sppsvc if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 8f7845f..e928699 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -1767,7 +1767,7 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe set _tserror= set winbuild=1 set "nul=>nul 2>&1" -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set psc=powershell.exe -nop -c set _slexe=sppsvc.exe& set _slser=sppsvc @@ -2587,7 +2587,7 @@ exit /b set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe set psc=%ps% -nop -c set winbuild=1 -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set _slexe=sppsvc.exe& set _slser=sppsvc if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index d64fc57..3b6ea36 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -2636,7 +2636,7 @@ exit /b set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe set psc=%ps% -nop -c set winbuild=1 -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set _slexe=sppsvc.exe& set _slser=sppsvc if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc) diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index b9c73d8..bfa942b 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -1547,7 +1547,7 @@ if ($appIdsList.Count -gt 0) { set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe set psc=%ps% -nop -c set winbuild=1 -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set _slexe=sppsvc.exe& set _slser=sppsvc if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc) diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 20c6c22..59fc287 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -870,7 +870,7 @@ exit /b set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe set psc=%ps% -nop -c set winbuild=1 -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set _slexe=sppsvc.exe& set _slser=sppsvc if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc) diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index f6999d0..dcf9366 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -795,7 +795,7 @@ exit /b set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe set psc=%ps% -nop -c set winbuild=1 -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set _slexe=sppsvc.exe& set _slser=sppsvc if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc) diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index e5bd3a5..4bc20e8 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1655,7 +1655,7 @@ exit /b set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe set psc=%ps% -nop -c set winbuild=1 -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" set _slexe=sppsvc.exe& set _slser=sppsvc if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc) From 53a2747338e91837f5f1e44d0f281ce100ea094d Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 7 Aug 2025 17:43:26 +0530 Subject: [PATCH 062/117] Fix redirection issue on W10 ARM64 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 1 + MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 1 + 2 files changed, 2 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index e24ba91..c50413e 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -11215,6 +11215,7 @@ else { if ($env:_debug -eq '0') { [LibTSforge.Logger]::HideOutput = $true } +[void][LibTSforge.Utils]::Wow64EnableWow64FsRedirection($false) $ver = [LibTSforge.Utils]::DetectVersion() $prod = [LibTSforge.SPP.SPPUtils]::DetectCurrentKey() $tsactids = @($args) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 3b6ea36..8366bcc 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -8847,6 +8847,7 @@ else { if ($env:_debug -eq '0') { [LibTSforge.Logger]::HideOutput = $true } +[void][LibTSforge.Utils]::Wow64EnableWow64FsRedirection($false) $ver = [LibTSforge.Utils]::DetectVersion() $prod = [LibTSforge.SPP.SPPUtils]::DetectCurrentKey() $tsactids = @($args) From ffcb641f1712a5506632e207feb99cfcb3b87bc1 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 8 Aug 2025 22:14:21 +0530 Subject: [PATCH 063/117] Fix a typo --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/KMS38_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 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index c50413e..c5e1bcf 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1658,7 +1658,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index bf64736..a3a78f1 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1342,7 +1342,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 9f4cc0f..b0bede7 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1427,7 +1427,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 5f061f7..3b0e569 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -2028,7 +2028,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index e928699..89a6c4d 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -3091,7 +3091,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 8366bcc..db74494 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -3097,7 +3097,7 @@ sc start %%# %nul% if !errorlevel! EQU 1060 set _corrupt=1 sc query %%# %nul% || set _corrupt=1 for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" ) +reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError) ) if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) From a51ae623322996b94bbed959dbfa91f77e2c1f75 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 10 Aug 2025 17:22:28 +0530 Subject: [PATCH 064/117] Update README, don't relaunch if unattended mode found --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 3 +- .../Activators/HWID_Activation.cmd | 3 +- .../Activators/KMS38_Activation.cmd | 3 +- .../Activators/Ohook_Activation_AIO.cmd | 3 +- .../Activators/Online_KMS_Activation.cmd | 3 +- .../Activators/TSforge_Activation.cmd | 3 +- .../Change_Office_Edition.cmd | 1 + .../Change_Windows_Edition.cmd | 1 + .../Extract_OEM_Folder.cmd | 1 + MAS/Separate-Files-Version/Troubleshoot.cmd | 1 + README.md | 57 ++++++++++++------- 11 files changed, 52 insertions(+), 27 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index c5e1bcf..b889bcd 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -44,6 +44,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 +if "%%#"=="/" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows @@ -1984,7 +1985,7 @@ 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%" +call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" if not defined showfix ( echo: call :dk_color %Blue% "%_fixmsg%" diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index a3a78f1..a1aad27 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -50,6 +50,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 +if "%%#"=="/" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows @@ -1668,7 +1669,7 @@ 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%" +call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" if not defined showfix ( echo: call :dk_color %Blue% "%_fixmsg%" diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index b0bede7..f49fe4f 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -50,6 +50,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 +if "%%#"=="/" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows @@ -1753,7 +1754,7 @@ 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%" +call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" if not defined showfix ( echo: call :dk_color %Blue% "%_fixmsg%" diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 3b0e569..fd4cc38 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -50,6 +50,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 +if "%%#"=="/" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows @@ -2354,7 +2355,7 @@ 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%" +call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" if not defined showfix ( echo: call :dk_color %Blue% "%_fixmsg%" diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 89a6c4d..807d076 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -75,6 +75,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 +if "%%#"=="/" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows @@ -3417,7 +3418,7 @@ 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%" +call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" if not defined showfix ( echo: call :dk_color %Blue% "%_fixmsg%" diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index db74494..bbb0d82 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -84,6 +84,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 +if "%%#"=="/" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows @@ -3423,7 +3424,7 @@ 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%" +call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" if not defined showfix ( echo: call :dk_color %Blue% "%_fixmsg%" diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index bfa942b..1971226 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -37,6 +37,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 +if "%%#"=="/" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 59fc287..6a12bea 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -42,6 +42,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 +if "%%#"=="/" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index dcf9366..15a5159 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -37,6 +37,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 +if "%%#"=="/" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 4bc20e8..2b778f2 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -37,6 +37,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 +if "%%#"=="/" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/README.md b/README.md index 53a01b9..0f0dedc 100644 --- a/README.md +++ b/README.md @@ -6,25 +6,42 @@
-## How to Activate Windows / Office? +## How to Activate Windows / Office / Extended Updates (ESU)? -### Method 1 - PowerShell (Windows 8 and later) ❤️ +### Method 1 - PowerShell ❤️ -1. **Open PowerShell** - To do that, press the Windows key + X, then select PowerShell or Terminal. +1. **Open PowerShell** + Click the **Start Menu**, type `PowerShell`, then open it. -2. **Copy and paste the code below, then press enter.** -``` -irm https://get.activated.win | iex -``` -Alternatively, you can use the following (this will be deprecated in the future): -``` -irm https://massgrave.dev/get | iex -``` +2. **Copy and paste the code below, then press enter.** + - For **Windows 8, 10, 11**: 📌 + ``` + irm https://get.activated.win | iex + ``` + - For **Windows 7** and later: + ``` + iex ((New-Object Net.WebClient).DownloadString('https://get.activated.win')) + ``` -3. You will see the activation options. Choose the activation options highlighted in green. +
-4. That's all +Script not launching❓Click here for info. + +--- + +- If the above is blocked (by ISP/DNS), try this (needs **updated Windows 10 or 11**): + ``` + iex (curl.exe -s --doh-url https://1.1.1.1/dns-query https://get.activated.win | Out-String) + ``` +- If that fails or you have an older Windows, use the below-listed Method 2. + +--- + +
+ +3. The activation menu will appear. **Choose the green-highlighted options** to activate Windows or Office. + +4. **Done!** --- @@ -47,16 +64,14 @@ or --- -- To activate additional products such as **Office for macOS, Visual Studio, RDS CALs, and Windows XP**, check [here](https://massgrave.dev/unsupported_products_activation). -- To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches). +> [!TIP] +> - Some ISPs/DNS block access to our domains. You can bypass this by enabling [DNS-over-HTTPS (DoH)](https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/encrypted-dns-browsers/) in your browser. +> - **Having trouble**❓Visit our [troubleshooting page](https://massgrave.dev/troubleshoot) or raise an issue on [GitHub](https://github.com/massgravel/Microsoft-Activation-Scripts/issues). --- -### Not working ❓ - -- If you are **unable to launch MAS** using the PowerShell method, please refer to **Method 2** listed above. -- If MAS is launched and the script shows any errors, check for any troubleshooting steps mentioned in blue color and try to follow those. -- If you have any issues, please feel free to reach out to us [here](https://massgrave.dev/troubleshoot). +- To activate additional products such as **Office for macOS, Visual Studio, RDS CALs, and Windows XP**, check [here](https://massgrave.dev/unsupported_products_activation). +- To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches). --- From 28c2264d8956ebe9d60bfc2092275ca1e029f145 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 11 Aug 2025 01:39:53 +0530 Subject: [PATCH 065/117] Change arg to detect no relaunch to change process --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/KMS38_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 | 2 +- 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 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index b889bcd..5d403c0 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -44,7 +44,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="/" (set re1=1&set re2=1) +if "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index a1aad27..a3efb26 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -50,7 +50,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="/" (set re1=1&set re2=1) +if "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index f49fe4f..792dbfc 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -50,7 +50,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="/" (set re1=1&set re2=1) +if "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index fd4cc38..c0d27ba 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -50,7 +50,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="/" (set re1=1&set re2=1) +if "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 807d076..40d34f2 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -75,7 +75,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="/" (set re1=1&set re2=1) +if "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index bbb0d82..07deb60 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -84,7 +84,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="/" (set re1=1&set re2=1) +if "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 1971226..0b96565 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -37,7 +37,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="/" (set re1=1&set re2=1) +if "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 6a12bea..949ce10 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -42,7 +42,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="/" (set re1=1&set re2=1) +if "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 15a5159..1a9eb90 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -37,7 +37,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="/" (set re1=1&set re2=1) +if "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 2b778f2..76b8448 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -37,7 +37,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="/" (set re1=1&set re2=1) +if "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows From 3917497c826685ffc6f3d025397e5c8c4f7fa744 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 11 Aug 2025 02:29:59 +0530 Subject: [PATCH 066/117] 3.5 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 6 +++--- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 4 ++-- MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 4 ++-- .../Activators/Ohook_Activation_AIO.cmd | 4 ++-- .../Activators/Online_KMS_Activation.cmd | 4 ++-- .../Activators/TSforge_Activation.cmd | 4 ++-- MAS/Separate-Files-Version/Change_Office_Edition.cmd | 4 ++-- MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 4 ++-- MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 4 ++-- MAS/Separate-Files-Version/Troubleshoot.cmd | 4 ++-- README.md | 4 ++-- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 5d403c0..47cdc0b 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 @@ -@::yfh37fow-random -@set masver=3.4 +@::hr47hf7-random +@set masver=3.5 @setlocal DisableDelayedExpansion @echo off @@ -44,7 +44,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="-qedit" (set re1=1&set re2=1) +if /i "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index a3efb26..791996c 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.4 +@set masver=3.5 @echo off @@ -50,7 +50,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="-qedit" (set re1=1&set re2=1) +if /i "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 792dbfc..16f6347 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1,4 +1,4 @@ -@set masver=3.4 +@set masver=3.5 @echo off @@ -50,7 +50,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="-qedit" (set re1=1&set re2=1) +if /i "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index c0d27ba..b4d8c1c 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.4 +@set masver=3.5 @echo off @@ -50,7 +50,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="-qedit" (set re1=1&set re2=1) +if /i "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 40d34f2..9e7902f 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.4 +@set masver=3.5 @echo off @@ -75,7 +75,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="-qedit" (set re1=1&set re2=1) +if /i "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 07deb60..967e08c 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.4 +@set masver=3.5 @echo off @@ -84,7 +84,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="-qedit" (set re1=1&set re2=1) +if /i "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 0b96565..8c0b8c1 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.4 +@set masver=3.5 @echo off @@ -37,7 +37,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="-qedit" (set re1=1&set re2=1) +if /i "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 949ce10..651ba77 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.4 +@set masver=3.5 @echo off @@ -42,7 +42,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="-qedit" (set re1=1&set re2=1) +if /i "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 1a9eb90..6a77a28 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.4 +@set masver=3.5 @echo off @@ -37,7 +37,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="-qedit" (set re1=1&set re2=1) +if /i "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 76b8448..48ac811 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1,4 +1,4 @@ -@set masver=3.4 +@set masver=3.5 @echo off @@ -37,7 +37,7 @@ set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="re1" set re1=1 if /i "%%#"=="re2" set re2=1 -if "%%#"=="-qedit" (set re1=1&set re2=1) +if /i "%%#"=="-qedit" (set re1=1&set re2=1) ) :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows diff --git a/README.md b/README.md index 0f0dedc..56128bb 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,8 @@ or --- ``` -Latest Version: 3.4 -Release date: 3-June-2025 +Latest Version: 3.5 +Release date: 10-Aug-2025 ``` ### [Troubleshooting / Help](https://massgrave.dev/troubleshoot) From 793550725ada92fa9354b9e05a97b6e43d40a8e1 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 11 Aug 2025 02:36:40 +0530 Subject: [PATCH 067/117] export-ignore --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 8749e12..de5bd3d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -# MAS export-ignore -# LICENSE export-ignore -# README.md export-ignore +MAS export-ignore +LICENSE export-ignore +README.md export-ignore .gitattributes export-ignore From d5e382e763520ee393e53d7e716e91e9086f40f6 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 11 Aug 2025 02:48:26 +0530 Subject: [PATCH 068/117] Revert export-ignore --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index de5bd3d..8749e12 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -MAS export-ignore -LICENSE export-ignore -README.md export-ignore +# MAS export-ignore +# LICENSE export-ignore +# README.md export-ignore .gitattributes export-ignore From 564aad78b43445139657e0221e8ddc3c9dd00ad1 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 6 Sep 2025 02:34:53 +0530 Subject: [PATCH 069/117] Evade detection --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 20 +++++++++---------- .../Activators/HWID_Activation.cmd | 4 ++-- .../Activators/KMS38_Activation.cmd | 2 +- .../Activators/Ohook_Activation_AIO.cmd | 8 ++++---- .../Activators/Online_KMS_Activation.cmd | 6 +++--- .../Activators/TSforge_Activation.cmd | 4 ++-- .../Change_Office_Edition.cmd | 2 +- .../Change_Windows_Edition.cmd | 2 +- .../Extract_OEM_Folder.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 47cdc0b..d2da500 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1,18 +1,18 @@ -@::hr47hf7-random +@::r45f3r3-random @set masver=3.5 @setlocal DisableDelayedExpansion @echo off -:: For command line switches, check mass<>grave<.>dev/command_line_switches +:: For command line switches, check mass()grave(dot)dev/command_line_switches :: If you want to better understand script, read from separate files version. ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -2301,7 +2301,7 @@ exit /b :: 2nd column = Generic Retail/OEM/MAK Key :: 3rd column = SKU ID :: 4th column = Key part number -:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass<>grave<.>dev/hwid#manual-activation to see how it's generated) +:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass()grave(dot)dev/hwid#manual-activation to see how it's generated) :: 6th column = 1 = activation is not working (at the time of writing this), 0 = activation is working :: 7th column = Key Type :: 8th column = WMI Edition ID (For reference only) @@ -2763,7 +2763,7 @@ call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Of ::======================================================================================================================================== -:: mass<>grave<.>dev/office-license-is-not-genuine +:: mass()grave(dot)dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear :: Script already is using MAK instead of GVLK so it won't appear anyway, but registry keys are added incase Office installs default GVLK grace key for volume products @@ -4088,13 +4088,13 @@ $MemoryStream.Close() :: :: The files are encoded in base64 to make AIO version. :: -:: mass<>grave<.>dev/ohook +:: mass()grave(dot)dev/ohook :: Here you can find the files source code and info on how to rebuild the identical sppc.dll files :: :: stackoverflow.com/a/35335273 :: Here you can check how to extract sppc.dll files from base64 :: -:: For any further question, feel free to contact us on mass<>grave<.>dev/contactus +:: For any further question, feel free to contact us on mass()grave(dot)dev/contactus :: ::======================================================================================================================================== :: @@ -5340,7 +5340,7 @@ call :ts_process ::======================================================================================================================================== -:: mass<>grave<.>dev/office-license-is-not-genuine +:: mass()grave(dot)dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" @@ -13370,7 +13370,7 @@ if %winbuild% GEQ 9200 ( for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath /reg:32" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" if defined _C16R ( -REM mass<>grave<.>dev/office-license-is-not-genuine +REM mass()grave(dot)dev/office-license-is-not-genuine set _server=10.0.0.10 call :_taskregserv echo Keeping the non-existent IP address 10.0.0.10 as %KS% Server. @@ -13715,7 +13715,7 @@ exit /b ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 791996c..bd5efa0 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -1985,7 +1985,7 @@ exit /b :: 2nd column = Generic Retail/OEM/MAK Key :: 3rd column = SKU ID :: 4th column = Key part number -:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass<>grave<.>dev/hwid#manual-activation to see how it's generated) +:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass()grave(dot)dev/hwid#manual-activation to see how it's generated) :: 6th column = 1 = activation is not working (at the time of writing this), 0 = activation is working :: 7th column = Key Type :: 8th column = WMI Edition ID (For reference only) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 16f6347..a0c257c 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index b4d8c1c..eaef0d5 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -728,7 +728,7 @@ call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Of ::======================================================================================================================================== -:: mass<>grave<.>dev/office-license-is-not-genuine +:: mass()grave(dot)dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear :: Script already is using MAK instead of GVLK so it won't appear anyway, but registry keys are added incase Office installs default GVLK grace key for volume products @@ -3230,13 +3230,13 @@ $MemoryStream.Close() :: :: The files are encoded in base64 to make AIO version. :: -:: mass<>grave<.>dev/ohook +:: mass()grave(dot)dev/ohook :: Here you can find the files source code and info on how to rebuild the identical sppc.dll files :: :: stackoverflow.com/a/35335273 :: Here you can check how to extract sppc.dll files from base64 :: -:: For any further question, feel free to contact us on mass<>grave<.>dev/contactus +:: For any further question, feel free to contact us on mass()grave(dot)dev/contactus :: ::======================================================================================================================================== :: diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 9e7902f..6b9bbb3 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -1031,7 +1031,7 @@ if %winbuild% GEQ 9200 ( for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath /reg:32" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" if defined _C16R ( -REM mass<>grave<.>dev/office-license-is-not-genuine +REM mass()grave(dot)dev/office-license-is-not-genuine set _server=10.0.0.10 call :_taskregserv echo Keeping the non-existent IP address 10.0.0.10 as %KS% Server. @@ -1727,7 +1727,7 @@ exit /b ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 967e08c..c4306f3 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -1470,7 +1470,7 @@ call :ts_process ::======================================================================================================================================== -:: mass<>grave<.>dev/office-license-is-not-genuine +:: mass()grave(dot)dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 8c0b8c1..296929b 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 651ba77..8f1a714 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 6a77a28..f308fdc 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 48ac811..2453c6d 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass<>grave<.>dev +:: Homepage: mass()grave(dot)dev :: Email: mas.help@outlook.com :: ::============================================================================ From 4ea26906cddab4e4b9b9291d5f3cd8ddd0011a47 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 6 Sep 2025 03:09:24 +0530 Subject: [PATCH 070/117] Add Outlook 2010 Retail key, thanks to celestial_tiger_98134 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index d2da500..02deb80 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -3721,7 +3721,6 @@ exit /b 14_4eaff0d0-c6cb-4187-94f3-c7656d49a0aa_Retail________ExcelR_[HSExcelR] 14_7004b7f0-6407-4f45-8eac-966e5f868bde_Retail________GrooveR -14_fbf4ac36-31c8-4340-8666-79873129cf40_Retail________OutlookR 14_133c8359-4e93-4241-8118-30bb18737ea0_Retail________PowerPointR_[HSPowerPointR] 14_db3bbc9c-ce52-41d1-a46f-1a1d68059119_Retail________WordR_[HSWordR] 14_dbe3aee0-5183-4ff7-8142-66050173cb01_Retail________SmallBusBasicsR_[SmallBusBasicsMSDNR] @@ -3750,6 +3749,7 @@ for %%# in ( 14_85e22450-b741-430c-a172-a37962c938af_6GKT2-KMJPK-4RRBF-8VQKB-JB%f%6G6_MAK___________InfoPathVL 14_3f7aa693-9a7e-44fc-9309-bb3d8e604925_2TG3P-9DB76-4YT99-8RXGD-CW%f%XBP_Retail________OneNoteR_[HSOneNoteR] 14_6860b31f-6a67-48b8-84b9-e312b3485c4b_CV64P-F4VRH-BJ33D-PH6MR-X6%f%9RY_MAK___________OneNoteVL +14_fbf4ac36-31c8-4340-8666-79873129cf40_9D8FR-7GYBW-4YG8M-V36JK-VD%f%7CM_Retail________OutlookR 14_a9aeabd8-63b8-4079-a28e-f531807fd6b8_J8C9M-YXMH2-9CX44-2C3YG-V7%f%692_MAK___________OutlookVL 14_acb51361-c0db-4895-9497-1831c41f31a6_GMBWM-WVX26-7WHV4-DB43D-WV%f%DY2_Retail________PersonalR_[PersonalDemoR,PersonalPrepaidR] 14_38252940-718c-4aa6-81a4-135398e53851_HPBQP-RJHDR-Q3472-PT9Q6-PB%f%B72_MAK___________PowerPointVL diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index eaef0d5..79c14aa 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -2683,7 +2683,6 @@ exit /b 14_4eaff0d0-c6cb-4187-94f3-c7656d49a0aa_Retail________ExcelR_[HSExcelR] 14_7004b7f0-6407-4f45-8eac-966e5f868bde_Retail________GrooveR -14_fbf4ac36-31c8-4340-8666-79873129cf40_Retail________OutlookR 14_133c8359-4e93-4241-8118-30bb18737ea0_Retail________PowerPointR_[HSPowerPointR] 14_db3bbc9c-ce52-41d1-a46f-1a1d68059119_Retail________WordR_[HSWordR] 14_dbe3aee0-5183-4ff7-8142-66050173cb01_Retail________SmallBusBasicsR_[SmallBusBasicsMSDNR] @@ -2712,6 +2711,7 @@ for %%# in ( 14_85e22450-b741-430c-a172-a37962c938af_6GKT2-KMJPK-4RRBF-8VQKB-JB%f%6G6_MAK___________InfoPathVL 14_3f7aa693-9a7e-44fc-9309-bb3d8e604925_2TG3P-9DB76-4YT99-8RXGD-CW%f%XBP_Retail________OneNoteR_[HSOneNoteR] 14_6860b31f-6a67-48b8-84b9-e312b3485c4b_CV64P-F4VRH-BJ33D-PH6MR-X6%f%9RY_MAK___________OneNoteVL +14_fbf4ac36-31c8-4340-8666-79873129cf40_9D8FR-7GYBW-4YG8M-V36JK-VD%f%7CM_Retail________OutlookR 14_a9aeabd8-63b8-4079-a28e-f531807fd6b8_J8C9M-YXMH2-9CX44-2C3YG-V7%f%692_MAK___________OutlookVL 14_acb51361-c0db-4895-9497-1831c41f31a6_GMBWM-WVX26-7WHV4-DB43D-WV%f%DY2_Retail________PersonalR_[PersonalDemoR,PersonalPrepaidR] 14_38252940-718c-4aa6-81a4-135398e53851_HPBQP-RJHDR-Q3472-PT9Q6-PB%f%B72_MAK___________PowerPointVL From 6022b6de10ff1c0195b5ba1b558fee9afc0ea372 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 10 Sep 2025 00:33:30 +0530 Subject: [PATCH 071/117] Use ComObject instead of Get-ScheduledTask for more reliability, improve info --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 11 +++++++---- .../Activators/HWID_Activation.cmd | 11 +++++++---- .../Activators/KMS38_Activation.cmd | 11 +++++++---- .../Activators/Ohook_Activation_AIO.cmd | 11 +++++++---- .../Activators/Online_KMS_Activation.cmd | 11 +++++++---- .../Activators/TSforge_Activation.cmd | 11 +++++++---- 6 files changed, 42 insertions(+), 24 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 02deb80..48f40c3 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -2171,19 +2171,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( %psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) +for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a) echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" if not defined showfix ( echo: +echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) || ( call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +) echo: ) ) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index bd5efa0..0207dc3 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1855,19 +1855,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( %psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) +for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a) echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" if not defined showfix ( echo: +echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) || ( call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +) echo: ) ) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index a0c257c..3c58295 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1940,19 +1940,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( %psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) +for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a) echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" if not defined showfix ( echo: +echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) || ( call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +) echo: ) ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 79c14aa..760baab 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -2541,19 +2541,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( %psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) +for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a) echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" if not defined showfix ( echo: +echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) || ( call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +) echo: ) ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 6b9bbb3..28d45d4 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -3604,19 +3604,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( %psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) +for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a) echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" if not defined showfix ( echo: +echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) || ( call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +) echo: ) ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index c4306f3..25af94a 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -3610,19 +3610,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( %psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a) +for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a) echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed if "!taskinfo!"=="" set "taskinfo=Not Found" -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]" +call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" if not defined showfix ( echo: +echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( +set fixes=%fixes% %mas%in-place_repair_upgrade +call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" +) || ( call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" +) echo: ) ) From a8f6d051a67f17b5d8c590b4f5778d5014839da2 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 10 Sep 2025 00:57:04 +0530 Subject: [PATCH 072/117] Change TSforge to use StaticCID only on build 26100 and above --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 11 +++++------ .../Activators/TSforge_Activation.cmd | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 48f40c3..f1baa4a 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -4283,7 +4283,7 @@ set tsids= set _resall=0 :: Choose activation method: -:: In builds 19041 and later, the script will auto select StaticCID (requires internet). If no internet is detected, it will then auto select the KMS4k method. For builds lower than 19041, the script will auto select ZeroCID. +:: In builds 26100 and later, the script will auto select StaticCID (requires internet). If no internet is detected, it will then auto select the KMS4k method. For builds lower than 26100, the script will auto select ZeroCID. :: To change the activation method, run the script with the parameters "/Z-SCID", "/Z-ZCID", or "/Z-KMS4k", or modify the option from Auto to SCID, ZCID, or KMS4k in the line below. set _actmethod=Auto @@ -4418,8 +4418,8 @@ echo: echo ______________________________________________________________ echo: call :dk_color2 %_White% " [1] " %_Green% "Auto" -echo Builds ^>= 19041 - StaticCID (KMS4k if offline) -echo Builds ^< 19041 - ZeroCID +echo Builds ^>= 26100 - StaticCID (KMS4k if offline) +echo Builds ^< 26100 - ZeroCID echo __________________________________________________ echo: echo [2] StaticCID @@ -4428,8 +4428,7 @@ echo Not for Windows 7 or older echo __________________________________________________ echo: echo [3] ZeroCID -echo Works reliably on builds below 19041 -echo May break on builds between 19041-26100 +echo Works reliably on builds below 26100 echo Does not work on builds above 26100.4188 echo __________________________________________________ echo: @@ -4541,7 +4540,7 @@ if /i %_actmethod%==ZCID set tsmethod=ZeroCID if /i %_actmethod%==KMS4k set tsmethod=KMS4k if /i %_actmethod%==Auto ( -if %winbuild% GEQ 19041 ( +if %winbuild% GEQ 26100 ( set tsmethod=StaticCID ) else ( set tsmethod=ZeroCID diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 25af94a..33b885a 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -46,7 +46,7 @@ set tsids= set _resall=0 :: Choose activation method: -:: In builds 19041 and later, the script will auto select StaticCID (requires internet). If no internet is detected, it will then auto select the KMS4k method. For builds lower than 19041, the script will auto select ZeroCID. +:: In builds 26100 and later, the script will auto select StaticCID (requires internet). If no internet is detected, it will then auto select the KMS4k method. For builds lower than 26100, the script will auto select ZeroCID. :: To change the activation method, run the script with the parameters "/Z-SCID", "/Z-ZCID", or "/Z-KMS4k", or modify the option from Auto to SCID, ZCID, or KMS4k in the line below. set _actmethod=Auto @@ -545,8 +545,8 @@ echo: echo ______________________________________________________________ echo: call :dk_color2 %_White% " [1] " %_Green% "Auto" -echo Builds ^>= 19041 - StaticCID (KMS4k if offline) -echo Builds ^< 19041 - ZeroCID +echo Builds ^>= 26100 - StaticCID (KMS4k if offline) +echo Builds ^< 26100 - ZeroCID echo __________________________________________________ echo: echo [2] StaticCID @@ -555,8 +555,7 @@ echo Not for Windows 7 or older echo __________________________________________________ echo: echo [3] ZeroCID -echo Works reliably on builds below 19041 -echo May break on builds between 19041-26100 +echo Works reliably on builds below 26100 echo Does not work on builds above 26100.4188 echo __________________________________________________ echo: @@ -668,7 +667,7 @@ if /i %_actmethod%==ZCID set tsmethod=ZeroCID if /i %_actmethod%==KMS4k set tsmethod=KMS4k if /i %_actmethod%==Auto ( -if %winbuild% GEQ 19041 ( +if %winbuild% GEQ 26100 ( set tsmethod=StaticCID ) else ( set tsmethod=ZeroCID From caffa62abe6782e019a1b6599433b2a79c0b73c1 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 10 Sep 2025 01:44:23 +0530 Subject: [PATCH 073/117] Fixed an issue with TSforge caused by updated pkeyconfig on 22631.5840. Thanks to WitherOrNot for the fix. --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 71 +++++++++++-------- .../Activators/TSforge_Activation.cmd | 71 +++++++++++-------- 2 files changed, 80 insertions(+), 62 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index f1baa4a..36a807b 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -6322,7 +6322,7 @@ using System.Xml.Linq; } #endif -// Common.cs +// LibTSforge/Common.cs namespace LibTSforge { using System; @@ -6564,7 +6564,7 @@ namespace LibTSforge } -// SPP/PKeyConfig.cs +// LibTSforge/SPP/PKeyConfig.cs namespace LibTSforge.SPP { using System; @@ -6590,7 +6590,7 @@ namespace LibTSforge.SPP public bool Contains(int n) { - return Start <= n && End <= n; + return Start <= n && n <= End; } } @@ -6720,10 +6720,19 @@ namespace LibTSforge.SPP string refActIdStr = configNode.SelectSingleNode("./p:ActConfigId", nsmgr).InnerText; Guid refActId = new Guid(refActIdStr); int group = int.Parse(configNode.SelectSingleNode("./p:RefGroupId", nsmgr).InnerText); - List keyRanges = ranges[refActIdStr]; + List keyRanges; + ranges.TryGetValue(refActIdStr, out keyRanges); + + if (keyRanges == null) + { + continue; + } if (keyRanges.Count > 0 && !Products.ContainsKey(refActId)) { + PKeyAlgorithm algorithm; + algorithms.TryGetValue(group, out algorithm); + ProductConfig productConfig = new ProductConfig { GroupId = group, @@ -6731,7 +6740,7 @@ namespace LibTSforge.SPP Description = configNode.SelectSingleNode("./p:ProductDescription", nsmgr).InnerText, Channel = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText, Randomized = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText.ToLower() == "true", - Algorithm = algorithms[group], + Algorithm = algorithm, Ranges = keyRanges, ActivationId = refActId }; @@ -6781,7 +6790,7 @@ namespace LibTSforge.SPP } -// SPP/ProductKey.cs +// LibTSforge/SPP/ProductKey.cs namespace LibTSforge.SPP { using System; @@ -7097,7 +7106,7 @@ namespace LibTSforge.SPP } -// SPP/SLAPI.cs +// LibTSforge/SPP/SLAPI.cs namespace LibTSforge.SPP { using System; @@ -7510,7 +7519,7 @@ namespace LibTSforge.SPP } -// SPP/SPPUtils.cs +// LibTSforge/SPP/SPPUtils.cs namespace LibTSforge.SPP { using Microsoft.Win32; @@ -7847,7 +7856,7 @@ namespace LibTSforge.SPP } -// SPP/SPSys.cs +// LibTSforge/SPP/SPSys.cs namespace LibTSforge.SPP { using Microsoft.Win32.SafeHandles; @@ -7894,7 +7903,7 @@ namespace LibTSforge.SPP } -// Crypto/CryptoUtils.cs +// LibTSforge/Crypto/CryptoUtils.cs namespace LibTSforge.Crypto { using System; @@ -8029,7 +8038,7 @@ namespace LibTSforge.Crypto } -// Crypto/Keys.cs +// LibTSforge/Crypto/Keys.cs namespace LibTSforge.Crypto { public static class Keys @@ -8119,7 +8128,7 @@ namespace LibTSforge.Crypto } -// Crypto/PhysStoreCrypto.cs +// LibTSforge/Crypto/PhysStoreCrypto.cs namespace LibTSforge.Crypto { using System; @@ -8204,7 +8213,7 @@ namespace LibTSforge.Crypto } -// Modifiers/GenPKeyInstall.cs +// LibTSforge/Modifiers/GenPKeyInstall.cs namespace LibTSforge.Modifiers { using System; @@ -8415,7 +8424,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/GracePeriodReset.cs +// LibTSforge/Modifiers/GracePeriodReset.cs namespace LibTSforge.Modifiers { using System.Collections.Generic; @@ -8448,7 +8457,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/KeyChangeLockDelete.cs +// LibTSforge/Modifiers/KeyChangeLockDelete.cs namespace LibTSforge.Modifiers { using System.Collections.Generic; @@ -8488,7 +8497,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/KMSHostCharge.cs +// LibTSforge/Modifiers/KMSHostCharge.cs namespace LibTSforge.Modifiers { using System; @@ -8649,7 +8658,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/RearmReset.cs +// LibTSforge/Modifiers/RearmReset.cs namespace LibTSforge.Modifiers { using System.Collections.Generic; @@ -8705,7 +8714,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/SetIIDParams.cs +// LibTSforge/Modifiers/SetIIDParams.cs namespace LibTSforge.Modifiers { using PhysicalStore; @@ -8774,7 +8783,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/TamperedFlagsDelete.cs +// LibTSforge/Modifiers/TamperedFlagsDelete.cs namespace LibTSforge.Modifiers { using System.Linq; @@ -8824,7 +8833,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/UniqueIdDelete.cs +// LibTSforge/Modifiers/UniqueIdDelete.cs namespace LibTSforge.Modifiers { using System; @@ -8883,7 +8892,7 @@ namespace LibTSforge.Modifiers } -// Activators/KMS4K.cs +// LibTSforge/Activators/KMS4K.cs namespace LibTSforge.Activators { using System; @@ -9094,7 +9103,7 @@ namespace LibTSforge.Activators } -// Activators/ZeroCID.cs +// LibTSforge/Activators/ZeroCID.cs namespace LibTSforge.Activators { using System; @@ -9283,7 +9292,7 @@ namespace LibTSforge.Activators } -// TokenStore/Common.cs +// LibTSforge/TokenStore/Common.cs namespace LibTSforge.TokenStore { using System.Collections.Generic; @@ -9353,7 +9362,7 @@ namespace LibTSforge.TokenStore } -// TokenStore/ITokenStore.cs +// LibTSforge/TokenStore/ITokenStore.cs namespace LibTSforge.TokenStore { using System; @@ -9373,7 +9382,7 @@ namespace LibTSforge.TokenStore } -// TokenStore/TokenStoreModern.cs +// LibTSforge/TokenStore/TokenStoreModern.cs namespace LibTSforge.TokenStore { using System; @@ -9659,7 +9668,7 @@ namespace LibTSforge.TokenStore } -// PhysicalStore/Common.cs +// LibTSforge/PhysicalStore/Common.cs namespace LibTSforge.PhysicalStore { using System.Runtime.InteropServices; @@ -9690,7 +9699,7 @@ namespace LibTSforge.PhysicalStore } -// PhysicalStore/IPhysicalStore.cs +// LibTSforge/PhysicalStore/IPhysicalStore.cs namespace LibTSforge.PhysicalStore { using System; @@ -9785,7 +9794,7 @@ namespace LibTSforge.PhysicalStore } -// PhysicalStore/PhysicalStoreModern.cs +// LibTSforge/PhysicalStore/PhysicalStoreModern.cs namespace LibTSforge.PhysicalStore { using System; @@ -10203,7 +10212,7 @@ namespace LibTSforge.PhysicalStore } -// PhysicalStore/PhysicalStoreVista.cs +// LibTSforge/PhysicalStore/PhysicalStoreVista.cs namespace LibTSforge.PhysicalStore { using System; @@ -10562,7 +10571,7 @@ namespace LibTSforge.PhysicalStore } -// PhysicalStore/PhysicalStoreWin7.cs +// LibTSforge/PhysicalStore/PhysicalStoreWin7.cs namespace LibTSforge.PhysicalStore { using System; @@ -10939,7 +10948,7 @@ namespace LibTSforge.PhysicalStore } -// PhysicalStore/VariableBag.cs +// LibTSforge/PhysicalStore/VariableBag.cs namespace LibTSforge.PhysicalStore { using System; diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 33b885a..6220ade 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -3954,7 +3954,7 @@ using System.Xml.Linq; } #endif -// Common.cs +// LibTSforge/Common.cs namespace LibTSforge { using System; @@ -4196,7 +4196,7 @@ namespace LibTSforge } -// SPP/PKeyConfig.cs +// LibTSforge/SPP/PKeyConfig.cs namespace LibTSforge.SPP { using System; @@ -4222,7 +4222,7 @@ namespace LibTSforge.SPP public bool Contains(int n) { - return Start <= n && End <= n; + return Start <= n && n <= End; } } @@ -4352,10 +4352,19 @@ namespace LibTSforge.SPP string refActIdStr = configNode.SelectSingleNode("./p:ActConfigId", nsmgr).InnerText; Guid refActId = new Guid(refActIdStr); int group = int.Parse(configNode.SelectSingleNode("./p:RefGroupId", nsmgr).InnerText); - List keyRanges = ranges[refActIdStr]; + List keyRanges; + ranges.TryGetValue(refActIdStr, out keyRanges); + + if (keyRanges == null) + { + continue; + } if (keyRanges.Count > 0 && !Products.ContainsKey(refActId)) { + PKeyAlgorithm algorithm; + algorithms.TryGetValue(group, out algorithm); + ProductConfig productConfig = new ProductConfig { GroupId = group, @@ -4363,7 +4372,7 @@ namespace LibTSforge.SPP Description = configNode.SelectSingleNode("./p:ProductDescription", nsmgr).InnerText, Channel = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText, Randomized = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText.ToLower() == "true", - Algorithm = algorithms[group], + Algorithm = algorithm, Ranges = keyRanges, ActivationId = refActId }; @@ -4413,7 +4422,7 @@ namespace LibTSforge.SPP } -// SPP/ProductKey.cs +// LibTSforge/SPP/ProductKey.cs namespace LibTSforge.SPP { using System; @@ -4729,7 +4738,7 @@ namespace LibTSforge.SPP } -// SPP/SLAPI.cs +// LibTSforge/SPP/SLAPI.cs namespace LibTSforge.SPP { using System; @@ -5142,7 +5151,7 @@ namespace LibTSforge.SPP } -// SPP/SPPUtils.cs +// LibTSforge/SPP/SPPUtils.cs namespace LibTSforge.SPP { using Microsoft.Win32; @@ -5479,7 +5488,7 @@ namespace LibTSforge.SPP } -// SPP/SPSys.cs +// LibTSforge/SPP/SPSys.cs namespace LibTSforge.SPP { using Microsoft.Win32.SafeHandles; @@ -5526,7 +5535,7 @@ namespace LibTSforge.SPP } -// Crypto/CryptoUtils.cs +// LibTSforge/Crypto/CryptoUtils.cs namespace LibTSforge.Crypto { using System; @@ -5661,7 +5670,7 @@ namespace LibTSforge.Crypto } -// Crypto/Keys.cs +// LibTSforge/Crypto/Keys.cs namespace LibTSforge.Crypto { public static class Keys @@ -5751,7 +5760,7 @@ namespace LibTSforge.Crypto } -// Crypto/PhysStoreCrypto.cs +// LibTSforge/Crypto/PhysStoreCrypto.cs namespace LibTSforge.Crypto { using System; @@ -5836,7 +5845,7 @@ namespace LibTSforge.Crypto } -// Modifiers/GenPKeyInstall.cs +// LibTSforge/Modifiers/GenPKeyInstall.cs namespace LibTSforge.Modifiers { using System; @@ -6047,7 +6056,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/GracePeriodReset.cs +// LibTSforge/Modifiers/GracePeriodReset.cs namespace LibTSforge.Modifiers { using System.Collections.Generic; @@ -6080,7 +6089,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/KeyChangeLockDelete.cs +// LibTSforge/Modifiers/KeyChangeLockDelete.cs namespace LibTSforge.Modifiers { using System.Collections.Generic; @@ -6120,7 +6129,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/KMSHostCharge.cs +// LibTSforge/Modifiers/KMSHostCharge.cs namespace LibTSforge.Modifiers { using System; @@ -6281,7 +6290,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/RearmReset.cs +// LibTSforge/Modifiers/RearmReset.cs namespace LibTSforge.Modifiers { using System.Collections.Generic; @@ -6337,7 +6346,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/SetIIDParams.cs +// LibTSforge/Modifiers/SetIIDParams.cs namespace LibTSforge.Modifiers { using PhysicalStore; @@ -6406,7 +6415,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/TamperedFlagsDelete.cs +// LibTSforge/Modifiers/TamperedFlagsDelete.cs namespace LibTSforge.Modifiers { using System.Linq; @@ -6456,7 +6465,7 @@ namespace LibTSforge.Modifiers } -// Modifiers/UniqueIdDelete.cs +// LibTSforge/Modifiers/UniqueIdDelete.cs namespace LibTSforge.Modifiers { using System; @@ -6515,7 +6524,7 @@ namespace LibTSforge.Modifiers } -// Activators/KMS4K.cs +// LibTSforge/Activators/KMS4K.cs namespace LibTSforge.Activators { using System; @@ -6726,7 +6735,7 @@ namespace LibTSforge.Activators } -// Activators/ZeroCID.cs +// LibTSforge/Activators/ZeroCID.cs namespace LibTSforge.Activators { using System; @@ -6915,7 +6924,7 @@ namespace LibTSforge.Activators } -// TokenStore/Common.cs +// LibTSforge/TokenStore/Common.cs namespace LibTSforge.TokenStore { using System.Collections.Generic; @@ -6985,7 +6994,7 @@ namespace LibTSforge.TokenStore } -// TokenStore/ITokenStore.cs +// LibTSforge/TokenStore/ITokenStore.cs namespace LibTSforge.TokenStore { using System; @@ -7005,7 +7014,7 @@ namespace LibTSforge.TokenStore } -// TokenStore/TokenStoreModern.cs +// LibTSforge/TokenStore/TokenStoreModern.cs namespace LibTSforge.TokenStore { using System; @@ -7291,7 +7300,7 @@ namespace LibTSforge.TokenStore } -// PhysicalStore/Common.cs +// LibTSforge/PhysicalStore/Common.cs namespace LibTSforge.PhysicalStore { using System.Runtime.InteropServices; @@ -7322,7 +7331,7 @@ namespace LibTSforge.PhysicalStore } -// PhysicalStore/IPhysicalStore.cs +// LibTSforge/PhysicalStore/IPhysicalStore.cs namespace LibTSforge.PhysicalStore { using System; @@ -7417,7 +7426,7 @@ namespace LibTSforge.PhysicalStore } -// PhysicalStore/PhysicalStoreModern.cs +// LibTSforge/PhysicalStore/PhysicalStoreModern.cs namespace LibTSforge.PhysicalStore { using System; @@ -7835,7 +7844,7 @@ namespace LibTSforge.PhysicalStore } -// PhysicalStore/PhysicalStoreVista.cs +// LibTSforge/PhysicalStore/PhysicalStoreVista.cs namespace LibTSforge.PhysicalStore { using System; @@ -8194,7 +8203,7 @@ namespace LibTSforge.PhysicalStore } -// PhysicalStore/PhysicalStoreWin7.cs +// LibTSforge/PhysicalStore/PhysicalStoreWin7.cs namespace LibTSforge.PhysicalStore { using System; @@ -8571,7 +8580,7 @@ namespace LibTSforge.PhysicalStore } -// PhysicalStore/VariableBag.cs +// LibTSforge/PhysicalStore/VariableBag.cs namespace LibTSforge.PhysicalStore { using System; From 79012c7db06d5387df4a26e5daf0ebb4ff5c34ca Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 10 Sep 2025 04:16:01 +0530 Subject: [PATCH 074/117] 3.6 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 2 +- .../Activators/Ohook_Activation_AIO.cmd | 2 +- .../Activators/Online_KMS_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 2 +- 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 | 4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 36a807b..dbc54e6 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.5 +@set masver=3.6 @setlocal DisableDelayedExpansion @echo off diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 0207dc3..3cd75e9 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.5 +@set masver=3.6 @echo off diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 3c58295..acc7cfd 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1,4 +1,4 @@ -@set masver=3.5 +@set masver=3.6 @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 760baab..03f9c3f 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.5 +@set masver=3.6 @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 28d45d4..6422330 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.5 +@set masver=3.6 @echo off diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 6220ade..d439091 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.5 +@set masver=3.6 @echo off diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 296929b..517c441 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.5 +@set masver=3.6 @echo off diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 8f1a714..3ea1b6d 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.5 +@set masver=3.6 @echo off diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index f308fdc..3279924 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.5 +@set masver=3.6 @echo off diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 2453c6d..d258198 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1,4 +1,4 @@ -@set masver=3.5 +@set masver=3.6 @echo off diff --git a/README.md b/README.md index 56128bb..57825d1 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,8 @@ or --- ``` -Latest Version: 3.5 -Release date: 10-Aug-2025 +Latest Version: 3.6 +Release date: 9-Sep-2025 ``` ### [Troubleshooting / Help](https://massgrave.dev/troubleshoot) From a9c2f5874163d930aa448715ab0e0affc6fa7060 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 10 Sep 2025 04:18:00 +0530 Subject: [PATCH 075/117] export-ignore --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 8749e12..de5bd3d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -# MAS export-ignore -# LICENSE export-ignore -# README.md export-ignore +MAS export-ignore +LICENSE export-ignore +README.md export-ignore .gitattributes export-ignore From fd2cecb4ec7f1fc130051dcb85f3d03bfcefb2b8 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 10 Sep 2025 04:58:37 +0530 Subject: [PATCH 076/117] Revert export-ignore --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index de5bd3d..8749e12 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -MAS export-ignore -LICENSE export-ignore -README.md export-ignore +# MAS export-ignore +# LICENSE export-ignore +# README.md export-ignore .gitattributes export-ignore From 75a4d2e3a7a08abbfcfb80256c9bd63bb1486d3a Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 12 Sep 2025 05:26:24 +0530 Subject: [PATCH 077/117] Generate ticket by signing the ticket --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 164 ++++++++++++------ .../Activators/HWID_Activation.cmd | 155 ++++++++++++----- .../Activators/KMS38_Activation.cmd | 80 ++++++++- 3 files changed, 299 insertions(+), 100 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index dbc54e6..b46f2ad 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -2304,11 +2304,10 @@ exit /b :: 2nd column = Generic Retail/OEM/MAK Key :: 3rd column = SKU ID :: 4th column = Key part number -:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass()grave(dot)dev/hwid#manual-activation to see how it's generated) -:: 6th column = 1 = activation is not working (at the time of writing this), 0 = activation is working -:: 7th column = Key Type -:: 8th column = WMI Edition ID (For reference only) -:: 9th column = Version name incase same Edition ID is used in different OS versions with different key +:: 5th column = 1 = activation is not working (at the time of writing this), 0 = activation is working +:: 6th column = Key Type +:: 7th column = WMI Edition ID (For reference only) +:: 8th column = Version name incase same Edition ID is used in different OS versions with different key :: Separator = _ @@ -2316,39 +2315,39 @@ exit /b set f= for %%# in ( -8b351c9c-f398-4515-9900-09df49427262_XGVPP-NMH47-7TTHJ-W3FW7-8H%f%V2C___4_X19-99683_HGNKjkKcKQHO6n8srMUrDh/MElffBZarLqCMD9rWtgFKf3YzYOLDPEMGhuO/auNMKCeiU7ebFbQALS/MyZ7TvidMQ2dvzXeXXKzPBjfwQx549WJUU7qAQ9Txg9cR9SAT8b12Pry2iBk+nZWD9VtHK3kOnEYkvp5WTCTsrSi6Re4_0_OEM:NONSLP_Enterprise -c83cef07-6b72-4bbc-a28f-a00386872839_3V6Q6-NQXCX-V8YXR-9QCYV-QP%f%FCT__27_X19-98746_NHn2n0N1UfVf00CfaI5LCDMDsKdVAWpD/HAfUrcTAKsw9d2Sks4h5MhyH/WUx+B6dFi8ol7D3AHorR8y9dqVS1Bd2FdZNJl/tTR1PGwYn6KL88NS19aHmFNdX8s4438vaa+Ty8Qk8EDcwm/wscC8lQmi3/RgUKYdyGFvpbGSVlk_0_Volume:MAK_EnterpriseN -4de7cb65-cdf1-4de9-8ae8-e3cce27b9f2c_VK7JG-NPHTM-C97JM-9MPGT-3V%f%66T__48_X19-98841_Yl/jNfxJ1SnaIZCIZ4m6Pf3ySNoQXifNeqfltNaNctx+onwiivOx7qcSn8dFtURzgMzSOFnsRQzb5IrvuqHoxWWl1S3JIQn56FvKsvSx7aFXIX3+2Q98G1amPV/WEQ0uHA5d7Ya6An+g0Z0zRP7evGoomTs4YuweaWiZQjQzSpA_0_____Retail_Professional -9fbaf5d6-4d83-4422-870d-fdda6e5858aa_2B87N-8KFHP-DKV6R-Y2C8J-PK%f%CKT__49_X19-98859_Ge0mRQbW8ALk7T09V+1k1yg66qoS0lhkgPIROOIOgxKmWPAvsiLAYPKDqM4+neFCA/qf1dHFmdh0VUrwFBPYsK251UeWuElj4bZFVISL6gUt1eZwbGfv5eurQ0i+qZiFv+CcQOEFsd5DD4Up6xPLLQS3nAXODL5rSrn2sHRoCVY_0_____Retail_ProfessionalN -f742e4ff-909d-4fe9-aacb-3231d24a0c58_4CPRK-NM3K3-X6XXQ-RXX86-WX%f%CHW__98_X19-98877_vel4ytVtnE8FhvN87Cflz9sbh5QwHD1YGOeej9QP7hF3vlBR4EX2/S/09gRneeXVbQnjDOCd2KFMKRUWHLM7ZhFBk8AtlG+kvUawPZ+CIrwrD3mhi7NMv8UX/xkLK3HnBupMEuEwsMJgCUD8Pn6om1mEiQebHBAqu4cT7GN9Y0g_0_____Retail_CoreN -1d1bac85-7365-4fea-949a-96978ec91ae0_N2434-X9D7W-8PF6X-8DV9T-8T%f%YMD__99_X19-99652_Nv17eUTrr1TmUX6frlI7V69VR6yWb7alppCFJPcdjfI+xX4/Cf2np3zm7jmC+zxFb9nELUs477/ydw2KCCXFfM53bKpBQZKHE5+MdGJGxebOCcOtJ3hrkDJtwlVxTQmUgk5xnlmpk8PHg82M2uM5B7UsGLxGKK4d3hi0voSyKeI_0_____Retail_CoreCountrySpecific -3ae2cc14-ab2d-41f4-972f-5e20142771dc_BT79Q-G7N6G-PGBYW-4YWX6-6F%f%4BT_100_X19-99661_FV2Eao/R5v8sGrfQeOjQ4daokVlNOlqRCDZXuaC45bQd5PsNU3t1b4AwWeYM8TAwbHauzr4tPG0UlsUqUikCZHy0poROx35bBBMBym6Zbm9wDBVyi7nCzBtwS86eOonQ3cU6WfZxhZRze0POdR33G3QTNPrnVIM2gf6nZJYqDOA_0_____Retail_CoreSingleLanguage -2b1f36bb-c1cd-4306-bf5c-a0367c2d97d8_YTMG3-N6DKC-DKB77-7M9GH-8H%f%VX7_101_X19-98868_GH/jwFxIcdQhNxJIlFka8c1H48PF0y7TgJwaryAUzqSKXynONLw7MVciDJFVXTkCjbXSdxLSWpPIC50/xyy1rAf8aC7WuN/9cRNAvtFPC1IVAJaMeq1vf4mCqRrrxJQP6ZEcuAeHFzLe/LLovGWCd8rrs6BbBwJXCvAqXImvycQ_0_____Retail_Core -2a6137f3-75c0-4f26-8e3e-d83d802865a4_XKCNC-J26Q9-KFHD2-FKTHY-KD%f%72Y_119_X19-99606_hci78IRWDLBtdbnAIKLDgV9whYgtHc1uYyp9y6FszE9wZBD5Nc8CUD2pI2s2RRd3M04C4O7M3tisB3Ov/XVjpAbxlX3MWfUR5w4MH0AphbuQX0p5MuHEDYyfqlRgBBRzOKePF06qfYvPQMuEfDpKCKFwNojQxBV8O0Arf5zmrIw_0_OEM:NONSLP_PPIPro -e558417a-5123-4f6f-91e7-385c1c7ca9d4_YNMGQ-8RYV3-4PGQ3-C8XTP-7C%f%FBY_121_X19-98886_x9tPFDZmjZMf29zFeHV5SHbXj8Wd8YAcCn/0hbpLcId4D7OWqkQKXxXHIegRlwcWjtII0sZ6WYB0HQV2KH3LvYRnWKpJ5SxeOgdzBIJ6fhegYGGyiXsBv9sEb3/zidPU6ZK9LugVGAcRZ6HQOiXyOw+Yf5H35iM+2oDZXSpjvJw_0_____Retail_Education -c5198a66-e435-4432-89cf-ec777c9d0352_84NGF-MHBT6-FXBX8-QWJK7-DR%f%R8H_122_X19-98892_jkL4YZkmBCJtvL1fT30ZPBcjmzshBSxjwrE0Q00AZ1hYnhrH+npzo1MPCT6ZRHw19ZLTz7wzyBb0qqcBVbtEjZW0Xs2MYLxgriyoONkhnPE6KSUJBw7C0enFVLHEqnVu/nkaOFfockN3bc+Eouw6W2lmHjklPHc9c6Clo04jul0_0_____Retail_EducationN -f6e29426-a256-4316-88bf-cc5b0f95ec0c_PJB47-8PN2T-MCGDY-JTY3D-CB%f%CPV_125_X23-50331_OPGhsyx+Ctw7w/KLMRNrY+fNBmKPjUG0R9RqkWk4e8ez+ExSJxSLLex5WhO5QSNgXLmEra+cCsN6C638aLjIdH2/L7D+8z/C6EDgRvbHMmidHg1lX3/O8lv0JudHkGtHJYewjorn/xXGY++vOCTQdZNk6qzEgmYSvPehKfdg8js_1_Volume:MAK_EnterpriseS_Ge -cce9d2de-98ee-4ce2-8113-222620c64a27_KCNVH-YKWX8-GJJB9-H9FDT-6F%f%7W2_125_X22-66075_GCqWmJOsTVun9z4QkE9n2XqBvt3ZWSPl9QmIh9Q2mXMG/QVt2IE7S+ES/NWlyTSNjLVySr1D2sGjxgEzy9kLwn7VENQVJ736h1iOdMj/3rdqLMSpTa813+nPSQgKpqJ3uMuvIvRP0FdB7Y4qt8qf9kNKK25A1QknioD/6YubL/4_1_Volume:MAK_EnterpriseS_VB -d06934ee-5448-4fd1-964a-cd077618aa06_43TBQ-NH92J-XKTM7-KT3KK-P3%f%9PB_125_X21-83233_EpB6qOCo8pRgO5kL4vxEHck2J1vxyd9OqvxUenDnYO9AkcGWat/D74ZcFg5SFlIya1U8l5zv+tsvZ4wAvQ1IaFW1PwOKJLOaGgejqZ41TIMdFGGw+G+s1RHsEnrWr3UOakTodby1aIMUMoqf3NdaM5aWFo8fOmqWC5/LnCoighs_0_OEM:NONSLP_EnterpriseS_RS5 -706e0cfd-23f4-43bb-a9af-1a492b9f1302_NK96Y-D9CD8-W44CQ-R8YTK-DY%f%JWX_125_X21-05035_ntcKmazIvLpZOryft28gWBHu1nHSbR+Gp143f/BiVe+BD2UjHBZfSR1q405xmQZsygz6VRK6+zm8FPR++71pkmArgCLhodCQJ5I4m7rAJNw/YX99pILphi1yCRcvHsOTGa825GUVXgf530tHT6hr0HQ1lGeGgG1hPekpqqBbTlg_0_OEM:NONSLP_EnterpriseS_RS1 -faa57748-75c8-40a2-b851-71ce92aa8b45_FWN7H-PF93Q-4GGP8-M8RF3-MD%f%WWW_125_X19-99617_Fe9CDClilrAmwwT7Yhfx67GafWRQEpwyj8R+a4eaTqbpPcAt7d1hv1rx8Sa9AzopEGxIrb7IhiPoDZs0XaT1HN0/olJJ/MnD73CfBP4sdQdLTsSJE3dKMWYTQHpnjqRaS/pNBYRr8l9Mv8yfcP8uS2MjIQ1cRTqRmC7WMpShyCg_0_OEM:NONSLP_EnterpriseS_TH -3d1022d8-969f-4222-b54b-327f5a5af4c9_2DBW3-N2PJG-MVHW3-G7TDK-9H%f%KR4_126_X21-04921_zLPNvcl1iqOefy0VLg+WZgNtRNhuGpn8+BFKjMqjaNOSKiuDcR6GNDS5FF1Aqk6/e6shJ+ohKzuwrnmYq3iNQ3I2MBlYjM5kuNfKs8Vl9dCjSpQr//GBGps6HtF2xrG/2g/yhtYC7FbtGDIE16uOeNKFcVg+XMb0qHE/5Etyfd8_0_Volume:MAK_EnterpriseSN_RS1 -60c243e1-f90b-4a1b-ba89-387294948fb6_NTX6B-BRYC2-K6786-F6MVQ-M7%f%V2X_126_X19-98770_kbXfe0z9Vi1S0yfxMWzI5+UtWsJKzxs7wLGUDLjrckFDn1bDQb4MvvuCK1w+Qrq33lemiGpNDspa+ehXiYEeSPFcCvUBpoMlGBFfzurNCHWiv3o1k3jBoawJr/VoDoVZfxhkps0fVoubf9oy6C6AgrkZ7PjCaS58edMcaUWvYYg_0_Volume:MAK_EnterpriseSN_TH -01eb852c-424d-4060-94b8-c10d799d7364_3XP6D-CRND4-DRYM2-GM84D-4G%f%G8Y_139_X23-37869_PVW0XnRJnsWYjTqxb6StCi2tge/uUwegjdiFaFUiZpwdJ620RK+MIAsSq5S+egXXzIWNntoy2fB6BO8F1wBFmxP/mm/3rn5C33jtF5QrbNqY7X9HMbqSiC7zhs4v4u2Xa4oZQx8JQkwr8Q2c/NgHrOJKKRASsSckhunxZ+WVEuM_1_____Retail_ProfessionalCountrySpecific_Zn -eb6d346f-1c60-4643-b960-40ec31596c45_DXG7C-N36C4-C4HTG-X4T3X-2Y%f%V77_161_X21-43626_MaVqTkRrGnOqYizl15whCOKWzx01+BZTVAalvEuHXM+WV55jnIfhWmd/u1GqCd5OplqXdU959zmipK2Iwgu2nw/g91nW//sQiN/cUcvg1Lxo6pC3gAo1AjTpHmGIIf9XlZMYlD+Vl6gXsi/Auwh3yrSSFh5s7gOczZoDTqQwHXA_0_____Retail_ProfessionalWorkstation -89e87510-ba92-45f6-8329-3afa905e3e83_WYPNQ-8C467-V2W6J-TX4WX-WT%f%2RQ_162_X21-43644_JVGQowLiCcPtGY9ndbBDV+rTu/q5ljmQTwQWZgBIQsrAeQjLD8jLEk/qse7riZ7tMT6PKFVNXeWqF7PhLAmACbE8O3Lvp65XMd/Oml9Daynj5/4n7unsffFHIHH8TGyO5j7xb4dkFNqC5TX3P8/1gQEkTIdZEOTQQXFu0L2SP5c_0_____Retail_ProfessionalWorkstationN -62f0c100-9c53-4e02-b886-a3528ddfe7f6_8PTT6-RNW4C-6V7J2-C2D3X-MH%f%BPB_164_X21-04955_CEDgxI8f/fxMBiwmeXw5Of55DG32sbGALzHihXkdbYTDaE3pY37oAA4zwGHALzAFN/t254QImGPYR6hATgl+Cp804f7serJqiLeXY965Zy67I4CKIMBm49lzHLFJeDnVTjDB0wVyN29pvgO3+HLhZ22KYCpkRHFFMy2OKxS68Yc_0_____Retail_ProfessionalEducation -13a38698-4a49-4b9e-8e83-98fe51110953_GJTYN-HDMQY-FRR76-HVGC7-QP%f%F8P_165_X21-04956_r35zp9OfxKSBcTxKWon3zFtbOiCufAPo6xRGY5DJqCRFKdB0jgZalNQitvjmaZ/Rlez2vjRJnEart4LrvyW4d9rrukAjR3+c3UkeTKwoD3qBl9AdRJbXCa2BdsoXJs1WVS4w4LuVzpB/SZDuggZt0F2DlMB427F5aflook/n1pY_0_____Retail_ProfessionalEducationN -df96023b-dcd9-4be2-afa0-c6c871159ebe_NJCF7-PW8QT-3324D-688JX-2Y%f%V66_175_X21-41295_rVpetYUmiRB48YJfCvJHiaZapJ0bO8gQDRoql+rq5IobiSRu//efV1VXqVpBkwILQRKgKIVONSTUF5y2TSxlDLbDSPKp7UHfbz17g6vRKLwOameYEz0ZcK3NTbApN/cMljHvvF/mBag1+sHjWu+eoFzk8H89k9nw8LMeVOPJRDc_0_____Retail_ServerRdsh -d4ef7282-3d2c-4cf0-9976-8854e64a8d1e_V3WVW-N2PV2-CGWC3-34QGF-VM%f%J2C_178_X21-32983_Xzme9hDZR6H0Yx0deURVdE6LiTOkVqWng5W/OTbkxRc0rq+mSYpo/f/yqhtwYlrkBPWx16Yok5Bvcb34vbKHvEAtxfYp4te20uexLzVOtBcoeEozARv4W/6MhYfl+llZtR5efsktj4N4/G4sVbuGvZ9nzNfQO9TwV6NGgGEj2Ec_0_____Retail_Cloud -af5c9381-9240-417d-8d35-eb40cd03e484_NH9J3-68WK7-6FB93-4K3DF-DJ%f%4F6_179_X21-32987_QGRDZOU/VZhYLOSdp2xDnFs8HInNZctcQlWCIrORVnxTQr55IJwN4vK3PJHjkfRLQ/bgUrcEIhyFbANqZFUq8yD1YNubb2bjNORgI/m8u85O9V7nDGtxzO/viEBSWyEHnrzLKKWYqkRQKbbSW3ungaZR0Ti5O2mAUI4HzAFej50_0_____Retail_CloudN -8ab9bdd1-1f67-4997-82d9-8878520837d9_XQQYW-NFFMW-XJPBH-K8732-CK%f%FFD_188_X21-99378_djy0od0uuKd2rrIl+V1/2+MeRltNgW7FEeTNQsPMkVSL75NBphgoso4uS0JPv2D7Y1iEEvmVq6G842Kyt52QOwXgFWmP/IQ6Sq1dr+fHK/4Et7bEPrrGBEZoCfWqk0kdcZRPBij2KN6qCRWhrk1hX2g+U40smx/EYCLGh9HCi24_0_____OEM:DM_IoTEnterprise -ed655016-a9e8-4434-95d9-4345352c2552_QPM6N-7J2WJ-P88HH-P3YRH-YY%f%74H_191_X21-99682_qHs/PzfhYWdtSys2edzcz4h+Qs8aDqb8BIiQ/mJ/+0uyoJh1fitbRCIgiFh2WAGZXjdgB8hZeheNwHibd8ChXaXg4u+0XlOdFlaDTgTXblji8fjETzDBk9aGkeMCvyVXRuUYhTSdp83IqGHz7XuLwN2p/6AUArx9JZCoLGV8j3w_0_OEM:NONSLP_IoTEnterpriseS_VB -6c4de1b8-24bb-4c17-9a77-7b939414c298_CGK42-GYN6Y-VD22B-BX98W-J8%f%JXD_191_X23-12617_J/fpIRynsVQXbp4qZNKp6RvOgZ/P2klILUKQguMlcwrBZybwNkHg/kM5LNOF/aDzEktbPnLnX40GEvKkYT6/qP4cMhn/SOY0/hYOkIdR34ilzNlVNq5xP7CMjCjaUYJe+6ydHPK6FpOuEoWOYYP5BZENKNGyBy4w4shkMAw19mA_0_OEM:NONSLP_IoTEnterpriseS_Ge -d4bdc678-0a4b-4a32-a5b3-aaa24c3b0f24_K9VKN-3BGWV-Y624W-MCRMQ-BH%f%DCD_202_X22-53884_kyoNx2s93U6OUSklB1xn+GXcwCJO1QTEtACYnChi8aXSoxGQ6H2xHfUdHVCwUA1OR0UeNcRrMmOzZBOEUBtdoGWSYPg9AMjvxlxq9JOzYAH+G6lT0UbCWgMSGGrqdcIfmshyEak3aUmsZK6l+uIAFCCZZ/HbbCRkkHC5rWKstMI_0_____Retail_CloudEditionN -92fb8726-92a8-4ffc-94ce-f82e07444653_KY7PN-VR6RX-83W6Y-6DDYQ-T6%f%R4W_203_X22-53847_gD6HnT4jP4rcNu9u83gvDiQq1xs7QSujcDbo60Di5iSVa9/ihZ7nlhnA0eDEZfnoDXriRiPPqc09T6AhSnFxLYitAkOuPJqL5UMobIrab9dwTKlowqFolxoHhLOO4V92Hsvn/9JLy7rEzoiAWHhX/0cpMr3FCzVYPeUW1OyLT1A_0_____Retail_CloudEdition -5a85300a-bfce-474f-ac07-a30983e3fb90_N979K-XWD77-YW3GB-HBGH6-D3%f%2MH_205_X23-15042_blZopkUuayCTgZKH4bOFiisH9GTAHG5/js6UX/qcMWWc3sWNxKSX1OLp1k3h8Xx1cFuvfG/fNAw/I83ssEtPY+A0Gx1JF4QpRqsGOqJ5ruQ2tGW56CJcCVHkB+i46nJAD759gYmy3pEYMQbmpWbhLx3MJ6kvwxKfU+0VCio8k50_0_____OEM:DM_IoTEnterpriseSK -80083eae-7031-4394-9e88-4901973d56fe_P8Q7T-WNK7X-PMFXY-VXHBG-RR%f%K69_206_X23-62084_habUJ0hhAG0P8iIKaRQ74/wZQHyAdFlwHmrejNjOSRG08JeqilJlTM6V8G9UERLJ92/uMDVHIVOPXfN8Zdh8JuYO8oflPnqymIRmff/pU+Gpb871jV2JDA4Cft5gmn+ictKoN4VoSfEZRR+R5hzF2FsoCExDNNw6gLdjtiX94uA_0_____OEM:DM_IoTEnterpriseK +8b351c9c-f398-4515-9900-09df49427262_XGVPP-NMH47-7TTHJ-W3FW7-8H%f%V2C___4_X19-99683_0_OEM:NONSLP_Enterprise +c83cef07-6b72-4bbc-a28f-a00386872839_3V6Q6-NQXCX-V8YXR-9QCYV-QP%f%FCT__27_X19-98746_0_Volume:MAK_EnterpriseN +4de7cb65-cdf1-4de9-8ae8-e3cce27b9f2c_VK7JG-NPHTM-C97JM-9MPGT-3V%f%66T__48_X19-98841_0_____Retail_Professional +9fbaf5d6-4d83-4422-870d-fdda6e5858aa_2B87N-8KFHP-DKV6R-Y2C8J-PK%f%CKT__49_X19-98859_0_____Retail_ProfessionalN +f742e4ff-909d-4fe9-aacb-3231d24a0c58_4CPRK-NM3K3-X6XXQ-RXX86-WX%f%CHW__98_X19-98877_0_____Retail_CoreN +1d1bac85-7365-4fea-949a-96978ec91ae0_N2434-X9D7W-8PF6X-8DV9T-8T%f%YMD__99_X19-99652_0_____Retail_CoreCountrySpecific +3ae2cc14-ab2d-41f4-972f-5e20142771dc_BT79Q-G7N6G-PGBYW-4YWX6-6F%f%4BT_100_X19-99661_0_____Retail_CoreSingleLanguage +2b1f36bb-c1cd-4306-bf5c-a0367c2d97d8_YTMG3-N6DKC-DKB77-7M9GH-8H%f%VX7_101_X19-98868_0_____Retail_Core +2a6137f3-75c0-4f26-8e3e-d83d802865a4_XKCNC-J26Q9-KFHD2-FKTHY-KD%f%72Y_119_X19-99606_0_OEM:NONSLP_PPIPro +e558417a-5123-4f6f-91e7-385c1c7ca9d4_YNMGQ-8RYV3-4PGQ3-C8XTP-7C%f%FBY_121_X19-98886_0_____Retail_Education +c5198a66-e435-4432-89cf-ec777c9d0352_84NGF-MHBT6-FXBX8-QWJK7-DR%f%R8H_122_X19-98892_0_____Retail_EducationN +f6e29426-a256-4316-88bf-cc5b0f95ec0c_PJB47-8PN2T-MCGDY-JTY3D-CB%f%CPV_125_X23-50331_1_Volume:MAK_EnterpriseS_Ge +cce9d2de-98ee-4ce2-8113-222620c64a27_KCNVH-YKWX8-GJJB9-H9FDT-6F%f%7W2_125_X22-66075_1_Volume:MAK_EnterpriseS_VB +d06934ee-5448-4fd1-964a-cd077618aa06_43TBQ-NH92J-XKTM7-KT3KK-P3%f%9PB_125_X21-83233_0_OEM:NONSLP_EnterpriseS_RS5 +706e0cfd-23f4-43bb-a9af-1a492b9f1302_NK96Y-D9CD8-W44CQ-R8YTK-DY%f%JWX_125_X21-05035_0_OEM:NONSLP_EnterpriseS_RS1 +faa57748-75c8-40a2-b851-71ce92aa8b45_FWN7H-PF93Q-4GGP8-M8RF3-MD%f%WWW_125_X19-99617_0_OEM:NONSLP_EnterpriseS_TH +3d1022d8-969f-4222-b54b-327f5a5af4c9_2DBW3-N2PJG-MVHW3-G7TDK-9H%f%KR4_126_X21-04921_0_Volume:MAK_EnterpriseSN_RS1 +60c243e1-f90b-4a1b-ba89-387294948fb6_NTX6B-BRYC2-K6786-F6MVQ-M7%f%V2X_126_X19-98770_0_Volume:MAK_EnterpriseSN_TH +01eb852c-424d-4060-94b8-c10d799d7364_3XP6D-CRND4-DRYM2-GM84D-4G%f%G8Y_139_X23-37869_1_____Retail_ProfessionalCountrySpecific_Zn +eb6d346f-1c60-4643-b960-40ec31596c45_DXG7C-N36C4-C4HTG-X4T3X-2Y%f%V77_161_X21-43626_0_____Retail_ProfessionalWorkstation +89e87510-ba92-45f6-8329-3afa905e3e83_WYPNQ-8C467-V2W6J-TX4WX-WT%f%2RQ_162_X21-43644_0_____Retail_ProfessionalWorkstationN +62f0c100-9c53-4e02-b886-a3528ddfe7f6_8PTT6-RNW4C-6V7J2-C2D3X-MH%f%BPB_164_X21-04955_0_____Retail_ProfessionalEducation +13a38698-4a49-4b9e-8e83-98fe51110953_GJTYN-HDMQY-FRR76-HVGC7-QP%f%F8P_165_X21-04956_0_____Retail_ProfessionalEducationN +df96023b-dcd9-4be2-afa0-c6c871159ebe_NJCF7-PW8QT-3324D-688JX-2Y%f%V66_175_X21-41295_0_____Retail_ServerRdsh +d4ef7282-3d2c-4cf0-9976-8854e64a8d1e_V3WVW-N2PV2-CGWC3-34QGF-VM%f%J2C_178_X21-32983_0_____Retail_Cloud +af5c9381-9240-417d-8d35-eb40cd03e484_NH9J3-68WK7-6FB93-4K3DF-DJ%f%4F6_179_X21-32987_0_____Retail_CloudN +8ab9bdd1-1f67-4997-82d9-8878520837d9_XQQYW-NFFMW-XJPBH-K8732-CK%f%FFD_188_X21-99378_0_____OEM:DM_IoTEnterprise +ed655016-a9e8-4434-95d9-4345352c2552_QPM6N-7J2WJ-P88HH-P3YRH-YY%f%74H_191_X21-99682_0_OEM:NONSLP_IoTEnterpriseS_VB +6c4de1b8-24bb-4c17-9a77-7b939414c298_CGK42-GYN6Y-VD22B-BX98W-J8%f%JXD_191_X23-12617_0_OEM:NONSLP_IoTEnterpriseS_Ge +d4bdc678-0a4b-4a32-a5b3-aaa24c3b0f24_K9VKN-3BGWV-Y624W-MCRMQ-BH%f%DCD_202_X22-53884_0_____Retail_CloudEditionN +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 +80083eae-7031-4394-9e88-4901973d56fe_P8Q7T-WNK7X-PMFXY-VXHBG-RR%f%K69_206_X23-62084_0_____OEM:DM_IoTEnterpriseK ) do ( for /f "tokens=1-9 delims=_" %%A in ("%%#") do ( @@ -2356,7 +2355,7 @@ REM Detect key if %1==key if %osSKU%==%%C if not defined key ( echo "!allapps! !altapplist!" | find /i "%%A" %nul1% && ( -if %%F==1 set notworking=1 +if %%E==1 set notworking=1 set key=%%B ) ) @@ -2364,11 +2363,8 @@ set key=%%B REM Generate ticket if %1==ticket if "%key%"=="%%B" ( -set "string=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;Pfn=Microsoft.Windows.%%C.%%D_8wekyb3d8bbwe;PKeyIID=465145217131314304264339481117862266242033457260311819664735280;$([char]0)" -for /f "tokens=* delims=" %%i in ('%psc% [conv%f%ert]::ToBas%f%e64String([Text.En%f%coding]::Uni%f%code.GetBytes("""!string!"""^)^)') do set "encoded=%%i" -echo "!encoded!" | find "AAAA" %nul1% || exit /b - -1.0OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=!encoded!;TimeStampClient=2022-10-11T12:00:00Z%%E=" >"%tdir%\GenuineTicket" +set "SessionIdStr=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;Pfn=Microsoft.Windows.%%C.%%D_8wekyb3d8bbwe;PKeyIID=465145217131314304264339481117862266242033457260311819664735280;" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sign\:.*';. ([scriptblock]::Create($f[1]))" ) ) @@ -2377,6 +2373,77 @@ exit /b ::======================================================================================================================================== +:sign: +$ErrorActionPreference = "Stop" + +function SignProperties { + param ( + $Properties, + $rsa + ) + + $sha256 = [Security.Cryptography.SHA256]::Create() + $bytes = [Text.Encoding]::UTF8.GetBytes($Properties) + $hash = $sha256.ComputeHash($bytes) + + $signature = $rsa.SignHash($hash, [Security.Cryptography.HashAlgorithmName]::SHA256, [Security.Cryptography.RSASignaturePadding]::Pkcs1) + return [Convert]::ToBase64String($signature) + +} + +[byte[]] $key = 0x07,0x02,0x00,0x00,0x00,0xA4,0x00,0x00,0x52,0x53,0x41,0x32,0x00,0x04,0x00,0x00, + 0x01,0x00,0x01,0x00,0x29,0x87,0xBA,0x3F,0x52,0x90,0x57,0xD8,0x12,0x26,0x6B,0x38, + 0xB2,0x3B,0xF9,0x67,0x08,0x4F,0xDD,0x8B,0xF5,0xE3,0x11,0xB8,0x61,0x3A,0x33,0x42, + 0x51,0x65,0x05,0x86,0x1E,0x00,0x41,0xDE,0xC5,0xDD,0x44,0x60,0x56,0x3D,0x14,0x39, + 0xB7,0x43,0x65,0xE9,0xF7,0x2B,0xA5,0xF0,0xA3,0x65,0x68,0xE9,0xE4,0x8B,0x5C,0x03, + 0x2D,0x36,0xFE,0x28,0x4C,0xD1,0x3C,0x3D,0xC1,0x90,0x75,0xF9,0x6E,0x02,0xE0,0x58, + 0x97,0x6A,0xCA,0x80,0x02,0x42,0x3F,0x6C,0x15,0x85,0x4D,0x83,0x23,0x6A,0x95,0x9E, + 0x38,0x52,0x59,0x38,0x6A,0x99,0xF0,0xB5,0xCD,0x53,0x7E,0x08,0x7C,0xB5,0x51,0xD3, + 0x8F,0xA3,0x0D,0xA0,0xFA,0x8D,0x87,0x3C,0xFC,0x59,0x21,0xD8,0x2E,0xD9,0x97,0x8B, + 0x40,0x60,0xB1,0xD7,0x2B,0x0A,0x6E,0x60,0xB5,0x50,0xCC,0x3C,0xB1,0x57,0xE4,0xB7, + 0xDC,0x5A,0x4D,0xE1,0x5C,0xE0,0x94,0x4C,0x5E,0x28,0xFF,0xFA,0x80,0x6A,0x13,0x53, + 0x52,0xDB,0xF3,0x04,0x92,0x43,0x38,0xB9,0x1B,0xD9,0x85,0x54,0x7B,0x14,0xC7,0x89, + 0x16,0x8A,0x4B,0x82,0xA1,0x08,0x02,0x99,0x23,0x48,0xDD,0x75,0x9C,0xC8,0xC1,0xCE, + 0xB0,0xD7,0x1B,0xD8,0xFB,0x2D,0xA7,0x2E,0x47,0xA7,0x18,0x4B,0xF6,0x29,0x69,0x44, + 0x30,0x33,0xBA,0xA7,0x1F,0xCE,0x96,0x9E,0x40,0xE1,0x43,0xF0,0xE0,0x0D,0x0A,0x32, + 0xB4,0xEE,0xA1,0xC3,0x5E,0x9B,0xC7,0x7F,0xF5,0x9D,0xD8,0xF2,0x0F,0xD9,0x8F,0xAD, + 0x75,0x0A,0x00,0xD5,0x25,0x43,0xF7,0xAE,0x51,0x7F,0xB7,0xDE,0xB7,0xAD,0xFB,0xCE, + 0x83,0xE1,0x81,0xFF,0xDD,0xA2,0x77,0xFE,0xEB,0x27,0x1F,0x10,0xFA,0x82,0x37,0xF4, + 0x7E,0xCC,0xE2,0xA1,0x58,0xC8,0xAF,0x1D,0x1A,0x81,0x31,0x6E,0xF4,0x8B,0x63,0x34, + 0xF3,0x05,0x0F,0xE1,0xCC,0x15,0xDC,0xA4,0x28,0x7A,0x9E,0xEB,0x62,0xD8,0xD8,0x8C, + 0x85,0xD7,0x07,0x87,0x90,0x2F,0xF7,0x1C,0x56,0x85,0x2F,0xEF,0x32,0x37,0x07,0xAB, + 0xB0,0xE6,0xB5,0x02,0x19,0x35,0xAF,0xDB,0xD4,0xA2,0x9C,0x36,0x80,0xC6,0xDC,0x82, + 0x08,0xE0,0xC0,0x5F,0x3C,0x59,0xAA,0x4E,0x26,0x03,0x29,0xB3,0x62,0x58,0x41,0x59, + 0x3A,0x37,0x43,0x35,0xE3,0x9F,0x34,0xE2,0xA1,0x04,0x97,0x12,0x9D,0x8C,0xAD,0xF7, + 0xFB,0x8C,0xA1,0xA2,0xE9,0xE4,0xEF,0xD9,0xC5,0xE5,0xDF,0x0E,0xBF,0x4A,0xE0,0x7A, + 0x1E,0x10,0x50,0x58,0x63,0x51,0xE1,0xD4,0xFE,0x57,0xB0,0x9E,0xD7,0xDA,0x8C,0xED, + 0x7D,0x82,0xAC,0x2F,0x25,0x58,0x0A,0x58,0xE6,0xA4,0xF4,0x57,0x4B,0xA4,0x1B,0x65, + 0xB9,0x4A,0x87,0x46,0xEB,0x8C,0x0F,0x9A,0x48,0x90,0xF9,0x9F,0x76,0x69,0x03,0x72, + 0x77,0xEC,0xC1,0x42,0x4C,0x87,0xDB,0x0B,0x3C,0xD4,0x74,0xEF,0xE5,0x34,0xE0,0x32, + 0x45,0xB0,0xF8,0xAB,0xD5,0x26,0x21,0xD7,0xD2,0x98,0x54,0x8F,0x64,0x88,0x20,0x2B, + 0x14,0xE3,0x82,0xD5,0x2A,0x4B,0x8F,0x4E,0x35,0x20,0x82,0x7E,0x1B,0xFE,0xFA,0x2C, + 0x79,0x6C,0x6E,0x66,0x94,0xBB,0x0A,0xEB,0xBA,0xD9,0x70,0x61,0xE9,0x47,0xB5,0x82, + 0xFC,0x18,0x3C,0x66,0x3A,0x09,0x2E,0x1F,0x61,0x74,0xCA,0xCB,0xF6,0x7A,0x52,0x37, + 0x1D,0xAC,0x8D,0x63,0x69,0x84,0x8E,0xC7,0x70,0x59,0xDD,0x2D,0x91,0x1E,0xF7,0xB1, + 0x56,0xED,0x7A,0x06,0x9D,0x5B,0x33,0x15,0xDD,0x31,0xD0,0xE6,0x16,0x07,0x9B,0xA5, + 0x94,0x06,0x7D,0xC1,0xE9,0xD6,0xC8,0xAF,0xB4,0x1E,0x2D,0x88,0x06,0xA7,0x63,0xB8, + 0xCF,0xC8,0xA2,0x6E,0x84,0xB3,0x8D,0xE5,0x47,0xE6,0x13,0x63,0x8E,0xD1,0x7F,0xD4, + 0x81,0x44,0x38,0xBF + +$rsa = New-Object Security.Cryptography.RSACryptoServiceProvider +$rsa.ImportCspBlob($key) +$SessionId = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($env:SessionIdStr + [char]0)) +$PropertiesStr = "OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=$SessionId;TimeStampClient=2022-10-11T12:00:00Z" +$SignatureStr = SignProperties $PropertiesStr $rsa + +$xml = @" +1.0$PropertiesStr$SignatureStr +"@ +[System.IO.File]::WriteAllText("$env:ProgramData\Microsoft\Windows\ClipSVC\GenuineTicket\GenuineTicket", ($xml -join ""), [System.Text.Encoding]::ASCII) +:sign: + +::======================================================================================================================================== + :: Below code is used to get alternate edition name and key if current edition doesn't support HWID activation :: 1st column = Current SKU ID @@ -12358,13 +12425,10 @@ if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul% if exist "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" del /f /q "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" %nul% -:: Signature value is as it is, it's not encoded -:: Session ID is in Base64 encoded format. It's decoded value is "OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;GVLKExp=2038-01-19T03:14:07Z;DownlevelGenuineState=1;" -:: Check mass grave [.] dev/kms38#manual-activation to see how it's generated +:: Generate ticket -set "signature=C52iGEoH+1VqzI6kEAqOhUyrWuEObnivzaVjyef8WqItVYd/xGDTZZ3bkxAI9hTpobPFNJyJx6a3uriXq3HVd7mlXfSUK9ydeoUdG4eqMeLwkxeb6jQWJzLOz41rFVSMtBL0e+ycCATebTaXS4uvFYaDHDdPw2lKY8ADj3MLgsA=" -set "sessionId=TwBTAE0AYQBqAG8AcgBWAGUAcgBzAGkAbwBuAD0ANQA7AE8AUwBNAGkAbgBvAHIAVgBlAHIAcwBpAG8AbgA9ADEAOwBPAFMAUABsAGEAdABmAG8AcgBtAEkAZAA9ADIAOwBQAFAAPQAwADsARwBWAEwASwBFAHgAcAA9ADIAMAAzADgALQAwADEALQAxADkAVAAwADMAOgAxADQAOgAwADcAWgA7AEQAbwB3AG4AbABlAHYAZQBsAEcAZQBuAHUAaQBuAGUAUwB0AGEAdABlAD0AMQA7AAAA" -1.0OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=%sessionId%;TimeStampClient=2022-10-11T12:00:00Z%signature%" >"%tdir%\GenuineTicket" +set "SessionIdStr=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;GVLKExp=2038-01-19T03:14:07Z;DownlevelGenuineState=1;" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sign\:.*';. ([scriptblock]::Create($f[1]))" copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul% diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 3cd75e9..96b4a63 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1988,11 +1988,10 @@ exit /b :: 2nd column = Generic Retail/OEM/MAK Key :: 3rd column = SKU ID :: 4th column = Key part number -:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass()grave(dot)dev/hwid#manual-activation to see how it's generated) -:: 6th column = 1 = activation is not working (at the time of writing this), 0 = activation is working -:: 7th column = Key Type -:: 8th column = WMI Edition ID (For reference only) -:: 9th column = Version name incase same Edition ID is used in different OS versions with different key +:: 5th column = 1 = activation is not working (at the time of writing this), 0 = activation is working +:: 6th column = Key Type +:: 7th column = WMI Edition ID (For reference only) +:: 8th column = Version name incase same Edition ID is used in different OS versions with different key :: Separator = _ @@ -2000,39 +1999,39 @@ exit /b set f= for %%# in ( -8b351c9c-f398-4515-9900-09df49427262_XGVPP-NMH47-7TTHJ-W3FW7-8H%f%V2C___4_X19-99683_HGNKjkKcKQHO6n8srMUrDh/MElffBZarLqCMD9rWtgFKf3YzYOLDPEMGhuO/auNMKCeiU7ebFbQALS/MyZ7TvidMQ2dvzXeXXKzPBjfwQx549WJUU7qAQ9Txg9cR9SAT8b12Pry2iBk+nZWD9VtHK3kOnEYkvp5WTCTsrSi6Re4_0_OEM:NONSLP_Enterprise -c83cef07-6b72-4bbc-a28f-a00386872839_3V6Q6-NQXCX-V8YXR-9QCYV-QP%f%FCT__27_X19-98746_NHn2n0N1UfVf00CfaI5LCDMDsKdVAWpD/HAfUrcTAKsw9d2Sks4h5MhyH/WUx+B6dFi8ol7D3AHorR8y9dqVS1Bd2FdZNJl/tTR1PGwYn6KL88NS19aHmFNdX8s4438vaa+Ty8Qk8EDcwm/wscC8lQmi3/RgUKYdyGFvpbGSVlk_0_Volume:MAK_EnterpriseN -4de7cb65-cdf1-4de9-8ae8-e3cce27b9f2c_VK7JG-NPHTM-C97JM-9MPGT-3V%f%66T__48_X19-98841_Yl/jNfxJ1SnaIZCIZ4m6Pf3ySNoQXifNeqfltNaNctx+onwiivOx7qcSn8dFtURzgMzSOFnsRQzb5IrvuqHoxWWl1S3JIQn56FvKsvSx7aFXIX3+2Q98G1amPV/WEQ0uHA5d7Ya6An+g0Z0zRP7evGoomTs4YuweaWiZQjQzSpA_0_____Retail_Professional -9fbaf5d6-4d83-4422-870d-fdda6e5858aa_2B87N-8KFHP-DKV6R-Y2C8J-PK%f%CKT__49_X19-98859_Ge0mRQbW8ALk7T09V+1k1yg66qoS0lhkgPIROOIOgxKmWPAvsiLAYPKDqM4+neFCA/qf1dHFmdh0VUrwFBPYsK251UeWuElj4bZFVISL6gUt1eZwbGfv5eurQ0i+qZiFv+CcQOEFsd5DD4Up6xPLLQS3nAXODL5rSrn2sHRoCVY_0_____Retail_ProfessionalN -f742e4ff-909d-4fe9-aacb-3231d24a0c58_4CPRK-NM3K3-X6XXQ-RXX86-WX%f%CHW__98_X19-98877_vel4ytVtnE8FhvN87Cflz9sbh5QwHD1YGOeej9QP7hF3vlBR4EX2/S/09gRneeXVbQnjDOCd2KFMKRUWHLM7ZhFBk8AtlG+kvUawPZ+CIrwrD3mhi7NMv8UX/xkLK3HnBupMEuEwsMJgCUD8Pn6om1mEiQebHBAqu4cT7GN9Y0g_0_____Retail_CoreN -1d1bac85-7365-4fea-949a-96978ec91ae0_N2434-X9D7W-8PF6X-8DV9T-8T%f%YMD__99_X19-99652_Nv17eUTrr1TmUX6frlI7V69VR6yWb7alppCFJPcdjfI+xX4/Cf2np3zm7jmC+zxFb9nELUs477/ydw2KCCXFfM53bKpBQZKHE5+MdGJGxebOCcOtJ3hrkDJtwlVxTQmUgk5xnlmpk8PHg82M2uM5B7UsGLxGKK4d3hi0voSyKeI_0_____Retail_CoreCountrySpecific -3ae2cc14-ab2d-41f4-972f-5e20142771dc_BT79Q-G7N6G-PGBYW-4YWX6-6F%f%4BT_100_X19-99661_FV2Eao/R5v8sGrfQeOjQ4daokVlNOlqRCDZXuaC45bQd5PsNU3t1b4AwWeYM8TAwbHauzr4tPG0UlsUqUikCZHy0poROx35bBBMBym6Zbm9wDBVyi7nCzBtwS86eOonQ3cU6WfZxhZRze0POdR33G3QTNPrnVIM2gf6nZJYqDOA_0_____Retail_CoreSingleLanguage -2b1f36bb-c1cd-4306-bf5c-a0367c2d97d8_YTMG3-N6DKC-DKB77-7M9GH-8H%f%VX7_101_X19-98868_GH/jwFxIcdQhNxJIlFka8c1H48PF0y7TgJwaryAUzqSKXynONLw7MVciDJFVXTkCjbXSdxLSWpPIC50/xyy1rAf8aC7WuN/9cRNAvtFPC1IVAJaMeq1vf4mCqRrrxJQP6ZEcuAeHFzLe/LLovGWCd8rrs6BbBwJXCvAqXImvycQ_0_____Retail_Core -2a6137f3-75c0-4f26-8e3e-d83d802865a4_XKCNC-J26Q9-KFHD2-FKTHY-KD%f%72Y_119_X19-99606_hci78IRWDLBtdbnAIKLDgV9whYgtHc1uYyp9y6FszE9wZBD5Nc8CUD2pI2s2RRd3M04C4O7M3tisB3Ov/XVjpAbxlX3MWfUR5w4MH0AphbuQX0p5MuHEDYyfqlRgBBRzOKePF06qfYvPQMuEfDpKCKFwNojQxBV8O0Arf5zmrIw_0_OEM:NONSLP_PPIPro -e558417a-5123-4f6f-91e7-385c1c7ca9d4_YNMGQ-8RYV3-4PGQ3-C8XTP-7C%f%FBY_121_X19-98886_x9tPFDZmjZMf29zFeHV5SHbXj8Wd8YAcCn/0hbpLcId4D7OWqkQKXxXHIegRlwcWjtII0sZ6WYB0HQV2KH3LvYRnWKpJ5SxeOgdzBIJ6fhegYGGyiXsBv9sEb3/zidPU6ZK9LugVGAcRZ6HQOiXyOw+Yf5H35iM+2oDZXSpjvJw_0_____Retail_Education -c5198a66-e435-4432-89cf-ec777c9d0352_84NGF-MHBT6-FXBX8-QWJK7-DR%f%R8H_122_X19-98892_jkL4YZkmBCJtvL1fT30ZPBcjmzshBSxjwrE0Q00AZ1hYnhrH+npzo1MPCT6ZRHw19ZLTz7wzyBb0qqcBVbtEjZW0Xs2MYLxgriyoONkhnPE6KSUJBw7C0enFVLHEqnVu/nkaOFfockN3bc+Eouw6W2lmHjklPHc9c6Clo04jul0_0_____Retail_EducationN -f6e29426-a256-4316-88bf-cc5b0f95ec0c_PJB47-8PN2T-MCGDY-JTY3D-CB%f%CPV_125_X23-50331_OPGhsyx+Ctw7w/KLMRNrY+fNBmKPjUG0R9RqkWk4e8ez+ExSJxSLLex5WhO5QSNgXLmEra+cCsN6C638aLjIdH2/L7D+8z/C6EDgRvbHMmidHg1lX3/O8lv0JudHkGtHJYewjorn/xXGY++vOCTQdZNk6qzEgmYSvPehKfdg8js_1_Volume:MAK_EnterpriseS_Ge -cce9d2de-98ee-4ce2-8113-222620c64a27_KCNVH-YKWX8-GJJB9-H9FDT-6F%f%7W2_125_X22-66075_GCqWmJOsTVun9z4QkE9n2XqBvt3ZWSPl9QmIh9Q2mXMG/QVt2IE7S+ES/NWlyTSNjLVySr1D2sGjxgEzy9kLwn7VENQVJ736h1iOdMj/3rdqLMSpTa813+nPSQgKpqJ3uMuvIvRP0FdB7Y4qt8qf9kNKK25A1QknioD/6YubL/4_1_Volume:MAK_EnterpriseS_VB -d06934ee-5448-4fd1-964a-cd077618aa06_43TBQ-NH92J-XKTM7-KT3KK-P3%f%9PB_125_X21-83233_EpB6qOCo8pRgO5kL4vxEHck2J1vxyd9OqvxUenDnYO9AkcGWat/D74ZcFg5SFlIya1U8l5zv+tsvZ4wAvQ1IaFW1PwOKJLOaGgejqZ41TIMdFGGw+G+s1RHsEnrWr3UOakTodby1aIMUMoqf3NdaM5aWFo8fOmqWC5/LnCoighs_0_OEM:NONSLP_EnterpriseS_RS5 -706e0cfd-23f4-43bb-a9af-1a492b9f1302_NK96Y-D9CD8-W44CQ-R8YTK-DY%f%JWX_125_X21-05035_ntcKmazIvLpZOryft28gWBHu1nHSbR+Gp143f/BiVe+BD2UjHBZfSR1q405xmQZsygz6VRK6+zm8FPR++71pkmArgCLhodCQJ5I4m7rAJNw/YX99pILphi1yCRcvHsOTGa825GUVXgf530tHT6hr0HQ1lGeGgG1hPekpqqBbTlg_0_OEM:NONSLP_EnterpriseS_RS1 -faa57748-75c8-40a2-b851-71ce92aa8b45_FWN7H-PF93Q-4GGP8-M8RF3-MD%f%WWW_125_X19-99617_Fe9CDClilrAmwwT7Yhfx67GafWRQEpwyj8R+a4eaTqbpPcAt7d1hv1rx8Sa9AzopEGxIrb7IhiPoDZs0XaT1HN0/olJJ/MnD73CfBP4sdQdLTsSJE3dKMWYTQHpnjqRaS/pNBYRr8l9Mv8yfcP8uS2MjIQ1cRTqRmC7WMpShyCg_0_OEM:NONSLP_EnterpriseS_TH -3d1022d8-969f-4222-b54b-327f5a5af4c9_2DBW3-N2PJG-MVHW3-G7TDK-9H%f%KR4_126_X21-04921_zLPNvcl1iqOefy0VLg+WZgNtRNhuGpn8+BFKjMqjaNOSKiuDcR6GNDS5FF1Aqk6/e6shJ+ohKzuwrnmYq3iNQ3I2MBlYjM5kuNfKs8Vl9dCjSpQr//GBGps6HtF2xrG/2g/yhtYC7FbtGDIE16uOeNKFcVg+XMb0qHE/5Etyfd8_0_Volume:MAK_EnterpriseSN_RS1 -60c243e1-f90b-4a1b-ba89-387294948fb6_NTX6B-BRYC2-K6786-F6MVQ-M7%f%V2X_126_X19-98770_kbXfe0z9Vi1S0yfxMWzI5+UtWsJKzxs7wLGUDLjrckFDn1bDQb4MvvuCK1w+Qrq33lemiGpNDspa+ehXiYEeSPFcCvUBpoMlGBFfzurNCHWiv3o1k3jBoawJr/VoDoVZfxhkps0fVoubf9oy6C6AgrkZ7PjCaS58edMcaUWvYYg_0_Volume:MAK_EnterpriseSN_TH -01eb852c-424d-4060-94b8-c10d799d7364_3XP6D-CRND4-DRYM2-GM84D-4G%f%G8Y_139_X23-37869_PVW0XnRJnsWYjTqxb6StCi2tge/uUwegjdiFaFUiZpwdJ620RK+MIAsSq5S+egXXzIWNntoy2fB6BO8F1wBFmxP/mm/3rn5C33jtF5QrbNqY7X9HMbqSiC7zhs4v4u2Xa4oZQx8JQkwr8Q2c/NgHrOJKKRASsSckhunxZ+WVEuM_1_____Retail_ProfessionalCountrySpecific_Zn -eb6d346f-1c60-4643-b960-40ec31596c45_DXG7C-N36C4-C4HTG-X4T3X-2Y%f%V77_161_X21-43626_MaVqTkRrGnOqYizl15whCOKWzx01+BZTVAalvEuHXM+WV55jnIfhWmd/u1GqCd5OplqXdU959zmipK2Iwgu2nw/g91nW//sQiN/cUcvg1Lxo6pC3gAo1AjTpHmGIIf9XlZMYlD+Vl6gXsi/Auwh3yrSSFh5s7gOczZoDTqQwHXA_0_____Retail_ProfessionalWorkstation -89e87510-ba92-45f6-8329-3afa905e3e83_WYPNQ-8C467-V2W6J-TX4WX-WT%f%2RQ_162_X21-43644_JVGQowLiCcPtGY9ndbBDV+rTu/q5ljmQTwQWZgBIQsrAeQjLD8jLEk/qse7riZ7tMT6PKFVNXeWqF7PhLAmACbE8O3Lvp65XMd/Oml9Daynj5/4n7unsffFHIHH8TGyO5j7xb4dkFNqC5TX3P8/1gQEkTIdZEOTQQXFu0L2SP5c_0_____Retail_ProfessionalWorkstationN -62f0c100-9c53-4e02-b886-a3528ddfe7f6_8PTT6-RNW4C-6V7J2-C2D3X-MH%f%BPB_164_X21-04955_CEDgxI8f/fxMBiwmeXw5Of55DG32sbGALzHihXkdbYTDaE3pY37oAA4zwGHALzAFN/t254QImGPYR6hATgl+Cp804f7serJqiLeXY965Zy67I4CKIMBm49lzHLFJeDnVTjDB0wVyN29pvgO3+HLhZ22KYCpkRHFFMy2OKxS68Yc_0_____Retail_ProfessionalEducation -13a38698-4a49-4b9e-8e83-98fe51110953_GJTYN-HDMQY-FRR76-HVGC7-QP%f%F8P_165_X21-04956_r35zp9OfxKSBcTxKWon3zFtbOiCufAPo6xRGY5DJqCRFKdB0jgZalNQitvjmaZ/Rlez2vjRJnEart4LrvyW4d9rrukAjR3+c3UkeTKwoD3qBl9AdRJbXCa2BdsoXJs1WVS4w4LuVzpB/SZDuggZt0F2DlMB427F5aflook/n1pY_0_____Retail_ProfessionalEducationN -df96023b-dcd9-4be2-afa0-c6c871159ebe_NJCF7-PW8QT-3324D-688JX-2Y%f%V66_175_X21-41295_rVpetYUmiRB48YJfCvJHiaZapJ0bO8gQDRoql+rq5IobiSRu//efV1VXqVpBkwILQRKgKIVONSTUF5y2TSxlDLbDSPKp7UHfbz17g6vRKLwOameYEz0ZcK3NTbApN/cMljHvvF/mBag1+sHjWu+eoFzk8H89k9nw8LMeVOPJRDc_0_____Retail_ServerRdsh -d4ef7282-3d2c-4cf0-9976-8854e64a8d1e_V3WVW-N2PV2-CGWC3-34QGF-VM%f%J2C_178_X21-32983_Xzme9hDZR6H0Yx0deURVdE6LiTOkVqWng5W/OTbkxRc0rq+mSYpo/f/yqhtwYlrkBPWx16Yok5Bvcb34vbKHvEAtxfYp4te20uexLzVOtBcoeEozARv4W/6MhYfl+llZtR5efsktj4N4/G4sVbuGvZ9nzNfQO9TwV6NGgGEj2Ec_0_____Retail_Cloud -af5c9381-9240-417d-8d35-eb40cd03e484_NH9J3-68WK7-6FB93-4K3DF-DJ%f%4F6_179_X21-32987_QGRDZOU/VZhYLOSdp2xDnFs8HInNZctcQlWCIrORVnxTQr55IJwN4vK3PJHjkfRLQ/bgUrcEIhyFbANqZFUq8yD1YNubb2bjNORgI/m8u85O9V7nDGtxzO/viEBSWyEHnrzLKKWYqkRQKbbSW3ungaZR0Ti5O2mAUI4HzAFej50_0_____Retail_CloudN -8ab9bdd1-1f67-4997-82d9-8878520837d9_XQQYW-NFFMW-XJPBH-K8732-CK%f%FFD_188_X21-99378_djy0od0uuKd2rrIl+V1/2+MeRltNgW7FEeTNQsPMkVSL75NBphgoso4uS0JPv2D7Y1iEEvmVq6G842Kyt52QOwXgFWmP/IQ6Sq1dr+fHK/4Et7bEPrrGBEZoCfWqk0kdcZRPBij2KN6qCRWhrk1hX2g+U40smx/EYCLGh9HCi24_0_____OEM:DM_IoTEnterprise -ed655016-a9e8-4434-95d9-4345352c2552_QPM6N-7J2WJ-P88HH-P3YRH-YY%f%74H_191_X21-99682_qHs/PzfhYWdtSys2edzcz4h+Qs8aDqb8BIiQ/mJ/+0uyoJh1fitbRCIgiFh2WAGZXjdgB8hZeheNwHibd8ChXaXg4u+0XlOdFlaDTgTXblji8fjETzDBk9aGkeMCvyVXRuUYhTSdp83IqGHz7XuLwN2p/6AUArx9JZCoLGV8j3w_0_OEM:NONSLP_IoTEnterpriseS_VB -6c4de1b8-24bb-4c17-9a77-7b939414c298_CGK42-GYN6Y-VD22B-BX98W-J8%f%JXD_191_X23-12617_J/fpIRynsVQXbp4qZNKp6RvOgZ/P2klILUKQguMlcwrBZybwNkHg/kM5LNOF/aDzEktbPnLnX40GEvKkYT6/qP4cMhn/SOY0/hYOkIdR34ilzNlVNq5xP7CMjCjaUYJe+6ydHPK6FpOuEoWOYYP5BZENKNGyBy4w4shkMAw19mA_0_OEM:NONSLP_IoTEnterpriseS_Ge -d4bdc678-0a4b-4a32-a5b3-aaa24c3b0f24_K9VKN-3BGWV-Y624W-MCRMQ-BH%f%DCD_202_X22-53884_kyoNx2s93U6OUSklB1xn+GXcwCJO1QTEtACYnChi8aXSoxGQ6H2xHfUdHVCwUA1OR0UeNcRrMmOzZBOEUBtdoGWSYPg9AMjvxlxq9JOzYAH+G6lT0UbCWgMSGGrqdcIfmshyEak3aUmsZK6l+uIAFCCZZ/HbbCRkkHC5rWKstMI_0_____Retail_CloudEditionN -92fb8726-92a8-4ffc-94ce-f82e07444653_KY7PN-VR6RX-83W6Y-6DDYQ-T6%f%R4W_203_X22-53847_gD6HnT4jP4rcNu9u83gvDiQq1xs7QSujcDbo60Di5iSVa9/ihZ7nlhnA0eDEZfnoDXriRiPPqc09T6AhSnFxLYitAkOuPJqL5UMobIrab9dwTKlowqFolxoHhLOO4V92Hsvn/9JLy7rEzoiAWHhX/0cpMr3FCzVYPeUW1OyLT1A_0_____Retail_CloudEdition -5a85300a-bfce-474f-ac07-a30983e3fb90_N979K-XWD77-YW3GB-HBGH6-D3%f%2MH_205_X23-15042_blZopkUuayCTgZKH4bOFiisH9GTAHG5/js6UX/qcMWWc3sWNxKSX1OLp1k3h8Xx1cFuvfG/fNAw/I83ssEtPY+A0Gx1JF4QpRqsGOqJ5ruQ2tGW56CJcCVHkB+i46nJAD759gYmy3pEYMQbmpWbhLx3MJ6kvwxKfU+0VCio8k50_0_____OEM:DM_IoTEnterpriseSK -80083eae-7031-4394-9e88-4901973d56fe_P8Q7T-WNK7X-PMFXY-VXHBG-RR%f%K69_206_X23-62084_habUJ0hhAG0P8iIKaRQ74/wZQHyAdFlwHmrejNjOSRG08JeqilJlTM6V8G9UERLJ92/uMDVHIVOPXfN8Zdh8JuYO8oflPnqymIRmff/pU+Gpb871jV2JDA4Cft5gmn+ictKoN4VoSfEZRR+R5hzF2FsoCExDNNw6gLdjtiX94uA_0_____OEM:DM_IoTEnterpriseK +8b351c9c-f398-4515-9900-09df49427262_XGVPP-NMH47-7TTHJ-W3FW7-8H%f%V2C___4_X19-99683_0_OEM:NONSLP_Enterprise +c83cef07-6b72-4bbc-a28f-a00386872839_3V6Q6-NQXCX-V8YXR-9QCYV-QP%f%FCT__27_X19-98746_0_Volume:MAK_EnterpriseN +4de7cb65-cdf1-4de9-8ae8-e3cce27b9f2c_VK7JG-NPHTM-C97JM-9MPGT-3V%f%66T__48_X19-98841_0_____Retail_Professional +9fbaf5d6-4d83-4422-870d-fdda6e5858aa_2B87N-8KFHP-DKV6R-Y2C8J-PK%f%CKT__49_X19-98859_0_____Retail_ProfessionalN +f742e4ff-909d-4fe9-aacb-3231d24a0c58_4CPRK-NM3K3-X6XXQ-RXX86-WX%f%CHW__98_X19-98877_0_____Retail_CoreN +1d1bac85-7365-4fea-949a-96978ec91ae0_N2434-X9D7W-8PF6X-8DV9T-8T%f%YMD__99_X19-99652_0_____Retail_CoreCountrySpecific +3ae2cc14-ab2d-41f4-972f-5e20142771dc_BT79Q-G7N6G-PGBYW-4YWX6-6F%f%4BT_100_X19-99661_0_____Retail_CoreSingleLanguage +2b1f36bb-c1cd-4306-bf5c-a0367c2d97d8_YTMG3-N6DKC-DKB77-7M9GH-8H%f%VX7_101_X19-98868_0_____Retail_Core +2a6137f3-75c0-4f26-8e3e-d83d802865a4_XKCNC-J26Q9-KFHD2-FKTHY-KD%f%72Y_119_X19-99606_0_OEM:NONSLP_PPIPro +e558417a-5123-4f6f-91e7-385c1c7ca9d4_YNMGQ-8RYV3-4PGQ3-C8XTP-7C%f%FBY_121_X19-98886_0_____Retail_Education +c5198a66-e435-4432-89cf-ec777c9d0352_84NGF-MHBT6-FXBX8-QWJK7-DR%f%R8H_122_X19-98892_0_____Retail_EducationN +f6e29426-a256-4316-88bf-cc5b0f95ec0c_PJB47-8PN2T-MCGDY-JTY3D-CB%f%CPV_125_X23-50331_1_Volume:MAK_EnterpriseS_Ge +cce9d2de-98ee-4ce2-8113-222620c64a27_KCNVH-YKWX8-GJJB9-H9FDT-6F%f%7W2_125_X22-66075_1_Volume:MAK_EnterpriseS_VB +d06934ee-5448-4fd1-964a-cd077618aa06_43TBQ-NH92J-XKTM7-KT3KK-P3%f%9PB_125_X21-83233_0_OEM:NONSLP_EnterpriseS_RS5 +706e0cfd-23f4-43bb-a9af-1a492b9f1302_NK96Y-D9CD8-W44CQ-R8YTK-DY%f%JWX_125_X21-05035_0_OEM:NONSLP_EnterpriseS_RS1 +faa57748-75c8-40a2-b851-71ce92aa8b45_FWN7H-PF93Q-4GGP8-M8RF3-MD%f%WWW_125_X19-99617_0_OEM:NONSLP_EnterpriseS_TH +3d1022d8-969f-4222-b54b-327f5a5af4c9_2DBW3-N2PJG-MVHW3-G7TDK-9H%f%KR4_126_X21-04921_0_Volume:MAK_EnterpriseSN_RS1 +60c243e1-f90b-4a1b-ba89-387294948fb6_NTX6B-BRYC2-K6786-F6MVQ-M7%f%V2X_126_X19-98770_0_Volume:MAK_EnterpriseSN_TH +01eb852c-424d-4060-94b8-c10d799d7364_3XP6D-CRND4-DRYM2-GM84D-4G%f%G8Y_139_X23-37869_1_____Retail_ProfessionalCountrySpecific_Zn +eb6d346f-1c60-4643-b960-40ec31596c45_DXG7C-N36C4-C4HTG-X4T3X-2Y%f%V77_161_X21-43626_0_____Retail_ProfessionalWorkstation +89e87510-ba92-45f6-8329-3afa905e3e83_WYPNQ-8C467-V2W6J-TX4WX-WT%f%2RQ_162_X21-43644_0_____Retail_ProfessionalWorkstationN +62f0c100-9c53-4e02-b886-a3528ddfe7f6_8PTT6-RNW4C-6V7J2-C2D3X-MH%f%BPB_164_X21-04955_0_____Retail_ProfessionalEducation +13a38698-4a49-4b9e-8e83-98fe51110953_GJTYN-HDMQY-FRR76-HVGC7-QP%f%F8P_165_X21-04956_0_____Retail_ProfessionalEducationN +df96023b-dcd9-4be2-afa0-c6c871159ebe_NJCF7-PW8QT-3324D-688JX-2Y%f%V66_175_X21-41295_0_____Retail_ServerRdsh +d4ef7282-3d2c-4cf0-9976-8854e64a8d1e_V3WVW-N2PV2-CGWC3-34QGF-VM%f%J2C_178_X21-32983_0_____Retail_Cloud +af5c9381-9240-417d-8d35-eb40cd03e484_NH9J3-68WK7-6FB93-4K3DF-DJ%f%4F6_179_X21-32987_0_____Retail_CloudN +8ab9bdd1-1f67-4997-82d9-8878520837d9_XQQYW-NFFMW-XJPBH-K8732-CK%f%FFD_188_X21-99378_0_____OEM:DM_IoTEnterprise +ed655016-a9e8-4434-95d9-4345352c2552_QPM6N-7J2WJ-P88HH-P3YRH-YY%f%74H_191_X21-99682_0_OEM:NONSLP_IoTEnterpriseS_VB +6c4de1b8-24bb-4c17-9a77-7b939414c298_CGK42-GYN6Y-VD22B-BX98W-J8%f%JXD_191_X23-12617_0_OEM:NONSLP_IoTEnterpriseS_Ge +d4bdc678-0a4b-4a32-a5b3-aaa24c3b0f24_K9VKN-3BGWV-Y624W-MCRMQ-BH%f%DCD_202_X22-53884_0_____Retail_CloudEditionN +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 +80083eae-7031-4394-9e88-4901973d56fe_P8Q7T-WNK7X-PMFXY-VXHBG-RR%f%K69_206_X23-62084_0_____OEM:DM_IoTEnterpriseK ) do ( for /f "tokens=1-9 delims=_" %%A in ("%%#") do ( @@ -2040,7 +2039,7 @@ REM Detect key if %1==key if %osSKU%==%%C if not defined key ( echo "!allapps! !altapplist!" | find /i "%%A" %nul1% && ( -if %%F==1 set notworking=1 +if %%E==1 set notworking=1 set key=%%B ) ) @@ -2048,11 +2047,8 @@ set key=%%B REM Generate ticket if %1==ticket if "%key%"=="%%B" ( -set "string=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;Pfn=Microsoft.Windows.%%C.%%D_8wekyb3d8bbwe;PKeyIID=465145217131314304264339481117862266242033457260311819664735280;$([char]0)" -for /f "tokens=* delims=" %%i in ('%psc% [conv%f%ert]::ToBas%f%e64String([Text.En%f%coding]::Uni%f%code.GetBytes("""!string!"""^)^)') do set "encoded=%%i" -echo "!encoded!" | find "AAAA" %nul1% || exit /b - -1.0OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=!encoded!;TimeStampClient=2022-10-11T12:00:00Z%%E=" >"%tdir%\GenuineTicket" +set "SessionIdStr=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;Pfn=Microsoft.Windows.%%C.%%D_8wekyb3d8bbwe;PKeyIID=465145217131314304264339481117862266242033457260311819664735280;" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sign\:.*';. ([scriptblock]::Create($f[1]))" ) ) @@ -2061,6 +2057,77 @@ exit /b ::======================================================================================================================================== +:sign: +$ErrorActionPreference = "Stop" + +function SignProperties { + param ( + $Properties, + $rsa + ) + + $sha256 = [Security.Cryptography.SHA256]::Create() + $bytes = [Text.Encoding]::UTF8.GetBytes($Properties) + $hash = $sha256.ComputeHash($bytes) + + $signature = $rsa.SignHash($hash, [Security.Cryptography.HashAlgorithmName]::SHA256, [Security.Cryptography.RSASignaturePadding]::Pkcs1) + return [Convert]::ToBase64String($signature) + +} + +[byte[]] $key = 0x07,0x02,0x00,0x00,0x00,0xA4,0x00,0x00,0x52,0x53,0x41,0x32,0x00,0x04,0x00,0x00, + 0x01,0x00,0x01,0x00,0x29,0x87,0xBA,0x3F,0x52,0x90,0x57,0xD8,0x12,0x26,0x6B,0x38, + 0xB2,0x3B,0xF9,0x67,0x08,0x4F,0xDD,0x8B,0xF5,0xE3,0x11,0xB8,0x61,0x3A,0x33,0x42, + 0x51,0x65,0x05,0x86,0x1E,0x00,0x41,0xDE,0xC5,0xDD,0x44,0x60,0x56,0x3D,0x14,0x39, + 0xB7,0x43,0x65,0xE9,0xF7,0x2B,0xA5,0xF0,0xA3,0x65,0x68,0xE9,0xE4,0x8B,0x5C,0x03, + 0x2D,0x36,0xFE,0x28,0x4C,0xD1,0x3C,0x3D,0xC1,0x90,0x75,0xF9,0x6E,0x02,0xE0,0x58, + 0x97,0x6A,0xCA,0x80,0x02,0x42,0x3F,0x6C,0x15,0x85,0x4D,0x83,0x23,0x6A,0x95,0x9E, + 0x38,0x52,0x59,0x38,0x6A,0x99,0xF0,0xB5,0xCD,0x53,0x7E,0x08,0x7C,0xB5,0x51,0xD3, + 0x8F,0xA3,0x0D,0xA0,0xFA,0x8D,0x87,0x3C,0xFC,0x59,0x21,0xD8,0x2E,0xD9,0x97,0x8B, + 0x40,0x60,0xB1,0xD7,0x2B,0x0A,0x6E,0x60,0xB5,0x50,0xCC,0x3C,0xB1,0x57,0xE4,0xB7, + 0xDC,0x5A,0x4D,0xE1,0x5C,0xE0,0x94,0x4C,0x5E,0x28,0xFF,0xFA,0x80,0x6A,0x13,0x53, + 0x52,0xDB,0xF3,0x04,0x92,0x43,0x38,0xB9,0x1B,0xD9,0x85,0x54,0x7B,0x14,0xC7,0x89, + 0x16,0x8A,0x4B,0x82,0xA1,0x08,0x02,0x99,0x23,0x48,0xDD,0x75,0x9C,0xC8,0xC1,0xCE, + 0xB0,0xD7,0x1B,0xD8,0xFB,0x2D,0xA7,0x2E,0x47,0xA7,0x18,0x4B,0xF6,0x29,0x69,0x44, + 0x30,0x33,0xBA,0xA7,0x1F,0xCE,0x96,0x9E,0x40,0xE1,0x43,0xF0,0xE0,0x0D,0x0A,0x32, + 0xB4,0xEE,0xA1,0xC3,0x5E,0x9B,0xC7,0x7F,0xF5,0x9D,0xD8,0xF2,0x0F,0xD9,0x8F,0xAD, + 0x75,0x0A,0x00,0xD5,0x25,0x43,0xF7,0xAE,0x51,0x7F,0xB7,0xDE,0xB7,0xAD,0xFB,0xCE, + 0x83,0xE1,0x81,0xFF,0xDD,0xA2,0x77,0xFE,0xEB,0x27,0x1F,0x10,0xFA,0x82,0x37,0xF4, + 0x7E,0xCC,0xE2,0xA1,0x58,0xC8,0xAF,0x1D,0x1A,0x81,0x31,0x6E,0xF4,0x8B,0x63,0x34, + 0xF3,0x05,0x0F,0xE1,0xCC,0x15,0xDC,0xA4,0x28,0x7A,0x9E,0xEB,0x62,0xD8,0xD8,0x8C, + 0x85,0xD7,0x07,0x87,0x90,0x2F,0xF7,0x1C,0x56,0x85,0x2F,0xEF,0x32,0x37,0x07,0xAB, + 0xB0,0xE6,0xB5,0x02,0x19,0x35,0xAF,0xDB,0xD4,0xA2,0x9C,0x36,0x80,0xC6,0xDC,0x82, + 0x08,0xE0,0xC0,0x5F,0x3C,0x59,0xAA,0x4E,0x26,0x03,0x29,0xB3,0x62,0x58,0x41,0x59, + 0x3A,0x37,0x43,0x35,0xE3,0x9F,0x34,0xE2,0xA1,0x04,0x97,0x12,0x9D,0x8C,0xAD,0xF7, + 0xFB,0x8C,0xA1,0xA2,0xE9,0xE4,0xEF,0xD9,0xC5,0xE5,0xDF,0x0E,0xBF,0x4A,0xE0,0x7A, + 0x1E,0x10,0x50,0x58,0x63,0x51,0xE1,0xD4,0xFE,0x57,0xB0,0x9E,0xD7,0xDA,0x8C,0xED, + 0x7D,0x82,0xAC,0x2F,0x25,0x58,0x0A,0x58,0xE6,0xA4,0xF4,0x57,0x4B,0xA4,0x1B,0x65, + 0xB9,0x4A,0x87,0x46,0xEB,0x8C,0x0F,0x9A,0x48,0x90,0xF9,0x9F,0x76,0x69,0x03,0x72, + 0x77,0xEC,0xC1,0x42,0x4C,0x87,0xDB,0x0B,0x3C,0xD4,0x74,0xEF,0xE5,0x34,0xE0,0x32, + 0x45,0xB0,0xF8,0xAB,0xD5,0x26,0x21,0xD7,0xD2,0x98,0x54,0x8F,0x64,0x88,0x20,0x2B, + 0x14,0xE3,0x82,0xD5,0x2A,0x4B,0x8F,0x4E,0x35,0x20,0x82,0x7E,0x1B,0xFE,0xFA,0x2C, + 0x79,0x6C,0x6E,0x66,0x94,0xBB,0x0A,0xEB,0xBA,0xD9,0x70,0x61,0xE9,0x47,0xB5,0x82, + 0xFC,0x18,0x3C,0x66,0x3A,0x09,0x2E,0x1F,0x61,0x74,0xCA,0xCB,0xF6,0x7A,0x52,0x37, + 0x1D,0xAC,0x8D,0x63,0x69,0x84,0x8E,0xC7,0x70,0x59,0xDD,0x2D,0x91,0x1E,0xF7,0xB1, + 0x56,0xED,0x7A,0x06,0x9D,0x5B,0x33,0x15,0xDD,0x31,0xD0,0xE6,0x16,0x07,0x9B,0xA5, + 0x94,0x06,0x7D,0xC1,0xE9,0xD6,0xC8,0xAF,0xB4,0x1E,0x2D,0x88,0x06,0xA7,0x63,0xB8, + 0xCF,0xC8,0xA2,0x6E,0x84,0xB3,0x8D,0xE5,0x47,0xE6,0x13,0x63,0x8E,0xD1,0x7F,0xD4, + 0x81,0x44,0x38,0xBF + +$rsa = New-Object Security.Cryptography.RSACryptoServiceProvider +$rsa.ImportCspBlob($key) +$SessionId = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($env:SessionIdStr + [char]0)) +$PropertiesStr = "OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=$SessionId;TimeStampClient=2022-10-11T12:00:00Z" +$SignatureStr = SignProperties $PropertiesStr $rsa + +$xml = @" +1.0$PropertiesStr$SignatureStr +"@ +[System.IO.File]::WriteAllText("$env:ProgramData\Microsoft\Windows\ClipSVC\GenuineTicket\GenuineTicket", ($xml -join ""), [System.Text.Encoding]::ASCII) +:sign: + +::======================================================================================================================================== + :: Below code is used to get alternate edition name and key if current edition doesn't support HWID activation :: 1st column = Current SKU ID diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index acc7cfd..0c41115 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -733,13 +733,10 @@ if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul% if exist "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" del /f /q "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" %nul% -:: Signature value is as it is, it's not encoded -:: Session ID is in Base64 encoded format. It's decoded value is "OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;GVLKExp=2038-01-19T03:14:07Z;DownlevelGenuineState=1;" -:: Check mass grave [.] dev/kms38#manual-activation to see how it's generated +:: Generate ticket -set "signature=C52iGEoH+1VqzI6kEAqOhUyrWuEObnivzaVjyef8WqItVYd/xGDTZZ3bkxAI9hTpobPFNJyJx6a3uriXq3HVd7mlXfSUK9ydeoUdG4eqMeLwkxeb6jQWJzLOz41rFVSMtBL0e+ycCATebTaXS4uvFYaDHDdPw2lKY8ADj3MLgsA=" -set "sessionId=TwBTAE0AYQBqAG8AcgBWAGUAcgBzAGkAbwBuAD0ANQA7AE8AUwBNAGkAbgBvAHIAVgBlAHIAcwBpAG8AbgA9ADEAOwBPAFMAUABsAGEAdABmAG8AcgBtAEkAZAA9ADIAOwBQAFAAPQAwADsARwBWAEwASwBFAHgAcAA9ADIAMAAzADgALQAwADEALQAxADkAVAAwADMAOgAxADQAOgAwADcAWgA7AEQAbwB3AG4AbABlAHYAZQBsAEcAZQBuAHUAaQBuAGUAUwB0AGEAdABlAD0AMQA7AAAA" -1.0OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=%sessionId%;TimeStampClient=2022-10-11T12:00:00Z%signature%" >"%tdir%\GenuineTicket" +set "SessionIdStr=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;GVLKExp=2038-01-19T03:14:07Z;DownlevelGenuineState=1;" +%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sign\:.*';. ([scriptblock]::Create($f[1]))" copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul% @@ -2144,6 +2141,77 @@ exit /b ::======================================================================================================================================== +:sign: +$ErrorActionPreference = "Stop" + +function SignProperties { + param ( + $Properties, + $rsa + ) + + $sha256 = [Security.Cryptography.SHA256]::Create() + $bytes = [Text.Encoding]::UTF8.GetBytes($Properties) + $hash = $sha256.ComputeHash($bytes) + + $signature = $rsa.SignHash($hash, [Security.Cryptography.HashAlgorithmName]::SHA256, [Security.Cryptography.RSASignaturePadding]::Pkcs1) + return [Convert]::ToBase64String($signature) + +} + +[byte[]] $key = 0x07,0x02,0x00,0x00,0x00,0xA4,0x00,0x00,0x52,0x53,0x41,0x32,0x00,0x04,0x00,0x00, + 0x01,0x00,0x01,0x00,0x29,0x87,0xBA,0x3F,0x52,0x90,0x57,0xD8,0x12,0x26,0x6B,0x38, + 0xB2,0x3B,0xF9,0x67,0x08,0x4F,0xDD,0x8B,0xF5,0xE3,0x11,0xB8,0x61,0x3A,0x33,0x42, + 0x51,0x65,0x05,0x86,0x1E,0x00,0x41,0xDE,0xC5,0xDD,0x44,0x60,0x56,0x3D,0x14,0x39, + 0xB7,0x43,0x65,0xE9,0xF7,0x2B,0xA5,0xF0,0xA3,0x65,0x68,0xE9,0xE4,0x8B,0x5C,0x03, + 0x2D,0x36,0xFE,0x28,0x4C,0xD1,0x3C,0x3D,0xC1,0x90,0x75,0xF9,0x6E,0x02,0xE0,0x58, + 0x97,0x6A,0xCA,0x80,0x02,0x42,0x3F,0x6C,0x15,0x85,0x4D,0x83,0x23,0x6A,0x95,0x9E, + 0x38,0x52,0x59,0x38,0x6A,0x99,0xF0,0xB5,0xCD,0x53,0x7E,0x08,0x7C,0xB5,0x51,0xD3, + 0x8F,0xA3,0x0D,0xA0,0xFA,0x8D,0x87,0x3C,0xFC,0x59,0x21,0xD8,0x2E,0xD9,0x97,0x8B, + 0x40,0x60,0xB1,0xD7,0x2B,0x0A,0x6E,0x60,0xB5,0x50,0xCC,0x3C,0xB1,0x57,0xE4,0xB7, + 0xDC,0x5A,0x4D,0xE1,0x5C,0xE0,0x94,0x4C,0x5E,0x28,0xFF,0xFA,0x80,0x6A,0x13,0x53, + 0x52,0xDB,0xF3,0x04,0x92,0x43,0x38,0xB9,0x1B,0xD9,0x85,0x54,0x7B,0x14,0xC7,0x89, + 0x16,0x8A,0x4B,0x82,0xA1,0x08,0x02,0x99,0x23,0x48,0xDD,0x75,0x9C,0xC8,0xC1,0xCE, + 0xB0,0xD7,0x1B,0xD8,0xFB,0x2D,0xA7,0x2E,0x47,0xA7,0x18,0x4B,0xF6,0x29,0x69,0x44, + 0x30,0x33,0xBA,0xA7,0x1F,0xCE,0x96,0x9E,0x40,0xE1,0x43,0xF0,0xE0,0x0D,0x0A,0x32, + 0xB4,0xEE,0xA1,0xC3,0x5E,0x9B,0xC7,0x7F,0xF5,0x9D,0xD8,0xF2,0x0F,0xD9,0x8F,0xAD, + 0x75,0x0A,0x00,0xD5,0x25,0x43,0xF7,0xAE,0x51,0x7F,0xB7,0xDE,0xB7,0xAD,0xFB,0xCE, + 0x83,0xE1,0x81,0xFF,0xDD,0xA2,0x77,0xFE,0xEB,0x27,0x1F,0x10,0xFA,0x82,0x37,0xF4, + 0x7E,0xCC,0xE2,0xA1,0x58,0xC8,0xAF,0x1D,0x1A,0x81,0x31,0x6E,0xF4,0x8B,0x63,0x34, + 0xF3,0x05,0x0F,0xE1,0xCC,0x15,0xDC,0xA4,0x28,0x7A,0x9E,0xEB,0x62,0xD8,0xD8,0x8C, + 0x85,0xD7,0x07,0x87,0x90,0x2F,0xF7,0x1C,0x56,0x85,0x2F,0xEF,0x32,0x37,0x07,0xAB, + 0xB0,0xE6,0xB5,0x02,0x19,0x35,0xAF,0xDB,0xD4,0xA2,0x9C,0x36,0x80,0xC6,0xDC,0x82, + 0x08,0xE0,0xC0,0x5F,0x3C,0x59,0xAA,0x4E,0x26,0x03,0x29,0xB3,0x62,0x58,0x41,0x59, + 0x3A,0x37,0x43,0x35,0xE3,0x9F,0x34,0xE2,0xA1,0x04,0x97,0x12,0x9D,0x8C,0xAD,0xF7, + 0xFB,0x8C,0xA1,0xA2,0xE9,0xE4,0xEF,0xD9,0xC5,0xE5,0xDF,0x0E,0xBF,0x4A,0xE0,0x7A, + 0x1E,0x10,0x50,0x58,0x63,0x51,0xE1,0xD4,0xFE,0x57,0xB0,0x9E,0xD7,0xDA,0x8C,0xED, + 0x7D,0x82,0xAC,0x2F,0x25,0x58,0x0A,0x58,0xE6,0xA4,0xF4,0x57,0x4B,0xA4,0x1B,0x65, + 0xB9,0x4A,0x87,0x46,0xEB,0x8C,0x0F,0x9A,0x48,0x90,0xF9,0x9F,0x76,0x69,0x03,0x72, + 0x77,0xEC,0xC1,0x42,0x4C,0x87,0xDB,0x0B,0x3C,0xD4,0x74,0xEF,0xE5,0x34,0xE0,0x32, + 0x45,0xB0,0xF8,0xAB,0xD5,0x26,0x21,0xD7,0xD2,0x98,0x54,0x8F,0x64,0x88,0x20,0x2B, + 0x14,0xE3,0x82,0xD5,0x2A,0x4B,0x8F,0x4E,0x35,0x20,0x82,0x7E,0x1B,0xFE,0xFA,0x2C, + 0x79,0x6C,0x6E,0x66,0x94,0xBB,0x0A,0xEB,0xBA,0xD9,0x70,0x61,0xE9,0x47,0xB5,0x82, + 0xFC,0x18,0x3C,0x66,0x3A,0x09,0x2E,0x1F,0x61,0x74,0xCA,0xCB,0xF6,0x7A,0x52,0x37, + 0x1D,0xAC,0x8D,0x63,0x69,0x84,0x8E,0xC7,0x70,0x59,0xDD,0x2D,0x91,0x1E,0xF7,0xB1, + 0x56,0xED,0x7A,0x06,0x9D,0x5B,0x33,0x15,0xDD,0x31,0xD0,0xE6,0x16,0x07,0x9B,0xA5, + 0x94,0x06,0x7D,0xC1,0xE9,0xD6,0xC8,0xAF,0xB4,0x1E,0x2D,0x88,0x06,0xA7,0x63,0xB8, + 0xCF,0xC8,0xA2,0x6E,0x84,0xB3,0x8D,0xE5,0x47,0xE6,0x13,0x63,0x8E,0xD1,0x7F,0xD4, + 0x81,0x44,0x38,0xBF + +$rsa = New-Object Security.Cryptography.RSACryptoServiceProvider +$rsa.ImportCspBlob($key) +$SessionId = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($env:SessionIdStr + [char]0)) +$PropertiesStr = "OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=$SessionId;TimeStampClient=2022-10-11T12:00:00Z" +$SignatureStr = SignProperties $PropertiesStr $rsa + +$xml = @" +1.0$PropertiesStr$SignatureStr +"@ +[System.IO.File]::WriteAllText("$env:ProgramData\Microsoft\Windows\ClipSVC\GenuineTicket\GenuineTicket", ($xml -join ""), [System.Text.Encoding]::ASCII) +:sign: + +::======================================================================================================================================== + :: Below code is used to get alternate edition name and key if current edition doesn't support KMS38 activation :: 1st column = Current SKU ID From ab6b572af940fa0ea4255b327eb6f69a274d6725 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 12 Sep 2025 05:42:18 +0530 Subject: [PATCH 078/117] 3.7 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 2 +- .../Activators/Ohook_Activation_AIO.cmd | 2 +- .../Activators/Online_KMS_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 2 +- 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 | 4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index b46f2ad..a29aecc 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.6 +@set masver=3.7 @setlocal DisableDelayedExpansion @echo off diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 96b4a63..fb723cc 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.6 +@set masver=3.7 @echo off diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 0c41115..28bdd18 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1,4 +1,4 @@ -@set masver=3.6 +@set masver=3.7 @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 03f9c3f..58ee15a 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.6 +@set masver=3.7 @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 6422330..0408baa 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.6 +@set masver=3.7 @echo off diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index d439091..d4242bc 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.6 +@set masver=3.7 @echo off diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 517c441..c1d9114 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.6 +@set masver=3.7 @echo off diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 3ea1b6d..59cfa0b 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.6 +@set masver=3.7 @echo off diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 3279924..e831122 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.6 +@set masver=3.7 @echo off diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index d258198..a6e17f5 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1,4 +1,4 @@ -@set masver=3.6 +@set masver=3.7 @echo off diff --git a/README.md b/README.md index 57825d1..773293b 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,8 @@ or --- ``` -Latest Version: 3.6 -Release date: 9-Sep-2025 +Latest Version: 3.7 +Release date: 11-Sep-2025 ``` ### [Troubleshooting / Help](https://massgrave.dev/troubleshoot) From d940db1e604d804d5f7b786be32c047ec91e7470 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 12 Sep 2025 06:18:45 +0530 Subject: [PATCH 079/117] export-ignore --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 8749e12..de5bd3d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -# MAS export-ignore -# LICENSE export-ignore -# README.md export-ignore +MAS export-ignore +LICENSE export-ignore +README.md export-ignore .gitattributes export-ignore From b74d1155b980ea9beb49462f5d539d0dc61d2807 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 12 Sep 2025 06:22:26 +0530 Subject: [PATCH 080/117] Revert export-ignore --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index de5bd3d..8749e12 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -MAS export-ignore -LICENSE export-ignore -README.md export-ignore +# MAS export-ignore +# LICENSE export-ignore +# README.md export-ignore .gitattributes export-ignore From 4e06a401b5601f7290d7940798c3e74d29030153 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 25 Sep 2025 02:31:37 +0530 Subject: [PATCH 081/117] Highlight alternative methods in readme --- README.md | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 773293b..987e065 100644 --- a/README.md +++ b/README.md @@ -18,26 +18,15 @@ ``` irm https://get.activated.win | iex ``` + If the above is blocked (by ISP/DNS), try this (needs updated Windows 10 or 11): + ``` + iex (curl.exe -s --doh-url https://1.1.1.1/dns-query https://get.activated.win | Out-String) + ``` - For **Windows 7** and later: ``` iex ((New-Object Net.WebClient).DownloadString('https://get.activated.win')) ``` - -
- -Script not launching❓Click here for info. - ---- - -- If the above is blocked (by ISP/DNS), try this (needs **updated Windows 10 or 11**): - ``` - iex (curl.exe -s --doh-url https://1.1.1.1/dns-query https://get.activated.win | Out-String) - ``` -- If that fails or you have an older Windows, use the below-listed Method 2. - ---- - -
+ - **Script not launching❓Use the below-listed Method 2.** 3. The activation menu will appear. **Choose the green-highlighted options** to activate Windows or Office. @@ -47,9 +36,6 @@ ### Method 2 - Traditional (Windows Vista and later) -
- Click here to view - 1. Download the file using one of the links below: `https://github.com/massgravel/Microsoft-Activation-Scripts/archive/refs/heads/master.zip` or @@ -60,8 +46,6 @@ or 5. You will see the activation options. Follow the on-screen instructions. 6. That's all. -
- --- > [!TIP] From c37609eabe501a01b79f06f079a2e8f997bfc1a2 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 25 Sep 2025 02:33:41 +0530 Subject: [PATCH 082/117] export-ignore README.md --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 8749e12..42ba7d6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ # MAS export-ignore # LICENSE export-ignore -# README.md export-ignore +README.md export-ignore .gitattributes export-ignore From e5ed8c24876e97987260f23b2057a5f3ae10ba9f Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 25 Sep 2025 03:38:59 +0530 Subject: [PATCH 083/117] Update links --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 987e065..1e8c394 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,7 @@ ### Method 2 - Traditional (Windows Vista and later) -1. Download the file using one of the links below: -`https://github.com/massgravel/Microsoft-Activation-Scripts/archive/refs/heads/master.zip` -or -`https://git.activated.win/massgrave/Microsoft-Activation-Scripts/archive/master.zip` +1. Download the ZIP file from [GitHub](https://codeload.github.com/massgravel/Microsoft-Activation-Scripts/legacy.zip/master) or [Azure DevOps](http://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?$format=zip). 2. Right-click on the downloaded zip file and extract it. 3. In the extracted folder, find the folder named `All-In-One-Version`. 4. Run the file named `MAS_AIO.cmd`. From 07fd04ea10312a25bf426527e93eb8c287c24a22 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 25 Sep 2025 16:47:28 +0530 Subject: [PATCH 084/117] Reset export-ignore --- .gitattributes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 42ba7d6..4d21483 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ # MAS export-ignore # LICENSE export-ignore -README.md export-ignore -.gitattributes export-ignore +# README.md export-ignore +# .gitattributes export-ignore From b627d74f5acffe293b7ee222a9f1ab107aa5371b Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 25 Sep 2025 19:18:35 +0530 Subject: [PATCH 085/117] Update method 2 link --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1e8c394..dd7d424 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,8 @@ ### Method 2 - Traditional (Windows Vista and later) -1. Download the ZIP file from [GitHub](https://codeload.github.com/massgravel/Microsoft-Activation-Scripts/legacy.zip/master) or [Azure DevOps](http://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?$format=zip). -2. Right-click on the downloaded zip file and extract it. +1. Download the ZIP file from this [Azure DevOps](https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?$format=zip) link. +2. Right-click on the downloaded ZIP file and extract it. 3. In the extracted folder, find the folder named `All-In-One-Version`. 4. Run the file named `MAS_AIO.cmd`. 5. You will see the activation options. Follow the on-screen instructions. From 4953ed82b58473caf00fcd60258a31a650438038 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 30 Sep 2025 01:55:07 +0530 Subject: [PATCH 086/117] ESU support for PPIPro (added in 19045.6388), add build check for later added ESU editions --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 11 ++++++++--- .../Activators/TSforge_Activation.cmd | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index a29aecc..9aa1288 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -5052,12 +5052,17 @@ if exist "%SystemRoot%\Servicing\Packages\WinEmb-Branding-Embedded-Standard-Pack ) 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 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 ( -set w10EsuEditionsLaterAdded=Core-CoreN-CoreCountrySpecific-CoreSingleLanguage-IoTEnterprise- +if %winbuild% EQU 19045 if %minbuild% GTR 0 if %UBR% GEQ %minbuild% ( +set w10EsuEditionsLaterAdded=%tsedition%- ) if not defined isThinpc if not defined isltsc for %%# in ( diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index d4242bc..cfa1eef 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -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 -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 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 ( -set w10EsuEditionsLaterAdded=Core-CoreN-CoreCountrySpecific-CoreSingleLanguage-IoTEnterprise- +if %winbuild% EQU 19045 if %minbuild% GTR 0 if %UBR% GEQ %minbuild% ( +set w10EsuEditionsLaterAdded=%tsedition%- ) if not defined isThinpc if not defined isltsc for %%# in ( From 233c9d1b29fe03bd9fedf772954b328d2f5b5bc1 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 30 Sep 2025 02:12:44 +0530 Subject: [PATCH 087/117] Show info for sppsvc 1053 error code --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 5 +++++ MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 5 +++++ MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 5 +++++ .../Activators/Ohook_Activation_AIO.cmd | 5 +++++ .../Activators/Online_KMS_Activation.cmd | 5 +++++ MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 5 +++++ MAS/Separate-Files-Version/Change_Office_Edition.cmd | 5 +++++ MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 5 +++++ 8 files changed, 40 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 9aa1288..2fa1b79 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1474,6 +1474,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: diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index fb723cc..d6e5b4d 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1158,6 +1158,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: diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 28bdd18..8f6c718 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1195,6 +1195,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: diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 58ee15a..8fd4a28 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1859,6 +1859,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: diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 0408baa..a311a93 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -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: diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index cfa1eef..51431a0 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -2917,6 +2917,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: diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index c1d9114..bfb9435 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -1618,6 +1618,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: diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 59cfa0b..a1e9689 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -968,6 +968,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: From 8c440c5c481214cded7afb7b2a34aaadfd0d04dd Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 30 Sep 2025 02:23:57 +0530 Subject: [PATCH 088/117] Add not LTSC info for IoTEnterprise in change edition --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 ++++ MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 2fa1b79..8fe2fe2 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -17986,7 +17986,11 @@ echo: for %%A in (%_ntarget%) do ( set /a counter+=1 +if /i %%A==IoTEnterprise ( +echo [!counter!] %%A [GAC, not LTSC] +) else ( echo [!counter!] %%A +) set targetedition!counter!=%%A ) diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index a1e9689..a38ac4e 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -547,7 +547,11 @@ echo: for %%A in (%_ntarget%) do ( set /a counter+=1 +if /i %%A==IoTEnterprise ( +echo [!counter!] %%A [GAC, not LTSC] +) else ( echo [!counter!] %%A +) set targetedition!counter!=%%A ) From 0d4ab4b435bc1389db1817dca79dbe0fe96a59bb Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 30 Sep 2025 02:40:05 +0530 Subject: [PATCH 089/117] Fix WMI check regarding SPP --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 13 +++++++------ .../Activators/HWID_Activation.cmd | 13 +++++++------ .../Activators/KMS38_Activation.cmd | 13 +++++++------ .../Activators/Ohook_Activation_AIO.cmd | 13 +++++++------ .../Activators/Online_KMS_Activation.cmd | 13 +++++++------ .../Activators/TSforge_Activation.cmd | 13 +++++++------ 6 files changed, 42 insertions(+), 36 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 8fe2fe2..c648563 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1790,6 +1790,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 ( @@ -1983,12 +1990,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 ( diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index d6e5b4d..0bada26 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1474,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 %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 ( @@ -1667,12 +1674,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 ( diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 8f6c718..7b0025e 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1556,6 +1556,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 ( @@ -1749,12 +1756,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 ( diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 8fd4a28..ae3ae34 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -2160,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 %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 ( @@ -2353,12 +2360,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 ( diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index a311a93..2be8ae5 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -3223,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 ( @@ -3416,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 ( diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 51431a0..a2e8111 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -3233,6 +3233,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 ( @@ -3426,12 +3433,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 ( From c9789e9aa34145b6608204dba8d8f5f3e71c6d86 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 1 Oct 2025 03:43:27 +0530 Subject: [PATCH 090/117] Add direct link for AIO file --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index dd7d424..016f4ba 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,10 @@ ### Method 2 - Traditional (Windows Vista and later) -1. Download the ZIP file from this [Azure DevOps](https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?$format=zip) link. -2. Right-click on the downloaded ZIP file and extract it. -3. In the extracted folder, find the folder named `All-In-One-Version`. -4. Run the file named `MAS_AIO.cmd`. -5. You will see the activation options. Follow the on-screen instructions. -6. That's all. +1. Download the script: [**MAS_AIO.cmd**](https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?path=/MAS/All-In-One-Version-KL/MAS_AIO.cmd&download=true) or the [full ZIP](https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?$format=zip). +2. Run the file named `MAS_AIO.cmd`. +3. You will see the activation options. Follow the on-screen instructions. +4. That's all. --- From b064fc628a1e40738ac520f5e790895977817434 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 1 Oct 2025 03:43:27 +0530 Subject: [PATCH 091/117] Add direct link for AIO file --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index dd7d424..016f4ba 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,10 @@ ### Method 2 - Traditional (Windows Vista and later) -1. Download the ZIP file from this [Azure DevOps](https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?$format=zip) link. -2. Right-click on the downloaded ZIP file and extract it. -3. In the extracted folder, find the folder named `All-In-One-Version`. -4. Run the file named `MAS_AIO.cmd`. -5. You will see the activation options. Follow the on-screen instructions. -6. That's all. +1. Download the script: [**MAS_AIO.cmd**](https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?path=/MAS/All-In-One-Version-KL/MAS_AIO.cmd&download=true) or the [full ZIP](https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?$format=zip). +2. Run the file named `MAS_AIO.cmd`. +3. You will see the activation options. Follow the on-screen instructions. +4. That's all. --- From 470d3b900e6aebfba224fde3ea7957308dd61230 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 7 Nov 2025 01:25:30 +0530 Subject: [PATCH 092/117] R.I.P. KMS38 CLiP licenses for KMS have been deprecated from build 26100.7019 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 910 +------ .../Activators/KMS38_Activation.cmd | 2261 ----------------- .../Activators/Online_KMS_Activation.cmd | 4 +- .../Activators/_ReadMe.txt | 1 - .../Extract_OEM_Folder.cmd | 61 +- 5 files changed, 137 insertions(+), 3100 deletions(-) delete mode 100644 MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index c648563..0689192 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -391,7 +391,6 @@ set _elev= if defined _args echo "%_args%" | find /i "/S" %nul% && (set "_silent=%nul%") || (set _silent=) if defined _args echo "%_args%" | find /i "/" %nul% && ( echo "%_args%" | find /i "/HWID" %nul% && (setlocal & cls & (call :HWIDActivation %_args% %_silent%) & endlocal) -echo "%_args%" | find /i "/KMS38" %nul% && (setlocal & cls & (call :KMS38Activation %_args% %_silent%) & endlocal) echo "%_args%" | find /i "/Z-" %nul% && (setlocal & cls & (call :TSforgeActivation %_args% %_silent%) & endlocal) echo "%_args%" | find /i "/K-" %nul% && (setlocal & cls & (call :KMSActivation %_args% %_silent%) & endlocal) echo "%_args%" | find /i "/Ohook" %nul% && (setlocal & cls & (call :OhookActivation %_args% %_silent%) & endlocal) @@ -473,34 +472,32 @@ call :dk_color3 %_White% " [3] " %_Green% "TSforge" %_White% " ) else ( echo: [3] TSforge - Windows / Office / ESU ) -echo: [4] KMS38 - Windows -echo: [5] Online KMS - Windows / Office +echo: [4] Online KMS - Windows / Office echo: __________________________________________________ echo: -echo: [6] Check Activation Status -echo: [7] Change Windows Edition -echo: [8] Change Office Edition +echo: [5] Check Activation Status +echo: [6] Change Windows Edition +echo: [7] Change Office Edition echo: __________________________________________________ echo: -echo: [9] Troubleshoot +echo: [8] Troubleshoot echo: [E] Extras echo: [H] Help echo: [0] Exit echo: ______________________________________________________________ echo: call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,3...E,H,0] :" -choice /C:123456789EH0 /N +choice /C:12345678EH0 /N set _erl=%errorlevel% -if %_erl%==12 exit /b -if %_erl%==11 (start %selfgit% & start %github% & start %mas%troubleshoot & goto :MainMenu) -if %_erl%==10 goto :Extras -if %_erl%==9 setlocal & call :troubleshoot & cls & endlocal & goto :MainMenu -if %_erl%==8 setlocal & call :change_offedition & cls & endlocal & goto :MainMenu -if %_erl%==7 setlocal & call :change_winedition & cls & endlocal & goto :MainMenu -if %_erl%==6 setlocal & call :check_actstatus & cls & endlocal & goto :MainMenu -if %_erl%==5 setlocal & call :KMSActivation & cls & endlocal & goto :MainMenu -if %_erl%==4 setlocal & call :KMS38Activation & cls & endlocal & goto :MainMenu +if %_erl%==11 exit /b +if %_erl%==10 (start %selfgit% & start %github% & start %mas%troubleshoot & goto :MainMenu) +if %_erl%==9 goto :Extras +if %_erl%==8 setlocal & call :troubleshoot & cls & endlocal & goto :MainMenu +if %_erl%==7 setlocal & call :change_offedition & cls & endlocal & goto :MainMenu +if %_erl%==6 setlocal & call :change_winedition & cls & endlocal & goto :MainMenu +if %_erl%==5 setlocal & call :check_actstatus & cls & endlocal & goto :MainMenu +if %_erl%==4 setlocal & call :KMSActivation & cls & endlocal & goto :MainMenu if %_erl%==3 setlocal & call :TSforgeActivation & cls & endlocal & goto :MainMenu if %_erl%==2 setlocal & call :OhookActivation & cls & endlocal & goto :MainMenu if %_erl%==1 setlocal & call :HWIDActivation & cls & endlocal & goto :MainMenu @@ -579,28 +576,26 @@ echo: echo: [1] HWID [Windows] echo: [2] Ohook [Office] echo: [3] TSforge [Windows / ESU / Office] -echo: [4] KMS38 [Windows] -echo: [5] Online KMS [Windows / Office] +echo: [4] Online KMS [Windows / Office] echo: -echo: [6] HWID [Windows] ^+ Ohook [Office] -echo: [7] HWID [Windows] ^+ Ohook [Office] ^+ TSforge [ESU] -echo: [8] TSforge [Windows] ^+ Online KMS [Office] +echo: [5] HWID [Windows] ^+ Ohook [Office] +echo: [6] HWID [Windows] ^+ Ohook [Office] ^+ TSforge [ESU] +echo: [7] TSforge [Windows] ^+ Online KMS [Office] echo: call :dk_color2 %_White% " [R] " %_Green% "ReadMe" echo: [0] Go Back echo: ____________________________________________________________ echo: call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard :" -choice /C:12345678R0 /N +choice /C:1234567R0 /N set _erl=%errorlevel% -if %_erl%==10 goto:Extras -if %_erl%==9 start %mas%oem-folder &goto:Extract$OEM$2 -if %_erl%==8 (set "_oem=TSforge [Windows] + Online KMS [Office]" & set "para=/Z-Windows /K-Office" &goto:Extract$OEM$3) -if %_erl%==7 (set "_oem=HWID [Windows] + Ohook [Office] + TSforge [ESU]" & set "para=/HWID /Ohook /Z-ESU" &goto:Extract$OEM$3) -if %_erl%==6 (set "_oem=HWID [Windows] + Ohook [Office]" & set "para=/HWID /Ohook" &goto:Extract$OEM$3) -if %_erl%==5 (set "_oem=Online KMS" & set "para=/K-WindowsOffice" &goto:Extract$OEM$3) -if %_erl%==4 (set "_oem=KMS38" & set "para=/KMS38" &goto:Extract$OEM$3) +if %_erl%==9 goto:Extras +if %_erl%==8 start %mas%oem-folder &goto:Extract$OEM$2 +if %_erl%==7 (set "_oem=TSforge [Windows] + Online KMS [Office]" & set "para=/Z-Windows /K-Office" &goto:Extract$OEM$3) +if %_erl%==6 (set "_oem=HWID [Windows] + Ohook [Office] + TSforge [ESU]" & set "para=/HWID /Ohook /Z-ESU" &goto:Extract$OEM$3) +if %_erl%==5 (set "_oem=HWID [Windows] + Ohook [Office]" & set "para=/HWID /Ohook" &goto:Extract$OEM$3) +if %_erl%==4 (set "_oem=Online KMS" & set "para=/K-WindowsOffice" &goto:Extract$OEM$3) if %_erl%==3 (set "_oem=TSforge" & set "para=/Z-WindowsESUOffice" &goto:Extract$OEM$3) if %_erl%==2 (set "_oem=Ohook" & set "para=/Ohook" &goto:Extract$OEM$3) if %_erl%==1 (set "_oem=HWID" & set "para=/HWID" &goto:Extract$OEM$3) @@ -638,11 +633,6 @@ echo: call :dk_color %Blue% "%_oem%" call :dk_color %Green% "$OEM$ folder was successfully created on your Desktop." ) -echo "%_oem%" | find /i "KMS38" 1>nul && ( -echo: -echo To KMS38 activate Server Cor/Acor editions ^(No GUI Versions^), -echo Check this page %mas%oem-folder -) echo ___________________________________________________________________ echo: call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..." @@ -12055,756 +12045,6 @@ exit /b :+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -:KMS38Activation - -:: To activate, run the script with "/KMS38" parameter or change 0 to 1 in below line -set _act=0 - -:: To disable changing edition if current edition doesn't support KMS38 activation, change the value to 1 from 0 or run the script with "/KMS38-NoEditionChange" parameter -set _NoEditionChange=0 - -:: If value is changed in above lines or parameter is used then script will run in unattended mode - -::======================================================================================================================================== - -cls -color 07 -title KMS38 Activation %masver% - -set _args= -set _elev= -set _unattended=0 - -set _args=%* -if defined _args set _args=%_args:"=% -if defined _args ( -for %%A in (%_args%) do ( -if /i "%%A"=="/KMS38" set _act=1 -if /i "%%A"=="/KMS38-NoEditionChange" set _NoEditionChange=1 -if /i "%%A"=="-el" set _elev=1 -) -) - -for %%A in (%_act% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1) - -::======================================================================================================================================== - -set _k38= -call :dk_setvar -set "specific_kms=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f" - -if %winbuild% LSS 14393 ( -%eline% -echo Unsupported OS version detected [%winbuild%]. -echo KMS38 activation is only supported on Windows 10/11/Server, build 14393 and later. -echo: -if %winbuild% LSS 10240 ( -call :dk_color %Blue% "Use TSforge activation option from the main menu." -) else ( -call :dk_color %Blue% "Use HWID activation option from the main menu." -) -goto dk_done -) - -::======================================================================================================================================== - -:k_menu - -if %_unattended%==0 ( -cls -if not defined terminal mode 76, 25 -title KMS38 Activation %masver% - -echo: -echo: -echo: -echo: -echo: ______________________________________________________ -echo: -echo [1] KMS38 Activation -echo ____________________________________________ -echo: -echo [2] Remove KMS38 Activation -echo: -echo [0] %_exitmsg% -echo: ______________________________________________________ -echo: -call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,0]" -choice /C:120 /N -set _el=!errorlevel! -if !_el!==3 exit /b -if !_el!==2 goto :k_uninstall -if !_el!==1 goto :k_menu2 -goto :k_menu -) - -::======================================================================================================================================== - -:k_menu2 - -cls -if not defined terminal ( -mode 110, 34 -if exist "%SysPath%\spp\store_test\" mode 134, 34 -) -title KMS38 Activation %masver% - -echo: -echo Initializing... -call :dk_chkmal - -if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*CorEdition~*.mum" if not exist "%SysPath%\clipup.exe" set a_cor=1 -if not exist %SysPath%\sppsvc.exe (set _fmiss=sppsvc.exe) -if not exist %SysPath%\ClipUp.exe if not defined a_cor (set _fmiss=%_fmiss%ClipUp.exe) - -if defined _fmiss ( -%eline% -echo [%_fmiss%] file is missing, aborting... -echo: -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" -) -goto dk_done -) - -::======================================================================================================================================== - -set spp=SoftwareLicensingProduct -set sps=SoftwareLicensingService - -call :dk_ckeckwmic -call :dk_checksku -call :dk_product -call :dk_sppissue - -::======================================================================================================================================== - -:: Check if system is permanently activated or not - -call :dk_checkperm -if defined _perm ( -cls -echo ___________________________________________________________________________________________ -echo: -call :dk_color2 %_White% " " %Green% "%winos% is already permanently activated." -call :dk_color2 %_White% " " %Gray% "Activation is not required." -echo ___________________________________________________________________________________________ -if %_unattended%==1 goto dk_done -echo: -choice /C:10 /N /M "> [1] Activate Anyway [0] %_exitmsg% : " -if errorlevel 2 exit /b -) -cls - -::======================================================================================================================================== - -:: Check Evaluation version - -set _eval= -set _evalserv= - -if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" set _eval=1 -if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*EvalEdition~*.mum" set _evalserv=1 -if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*EvalCorEdition~*.mum" set _eval=1 & set _evalserv=1 - -if defined _eval ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% && ( -%eline% -echo [%winos% ^| %winbuild%] -if defined _evalserv ( -echo Server Evaluation cannot be activated. Convert it to full Server OS. -echo: -call :dk_color %Blue% "Go Back to main menu and use [Change Edition] option." -) else ( -echo Evaluation editions cannot be activated outside of their evaluation period. -call :dk_color %Blue% "Use TSforge activation option from the main menu to reset evaluation period." -echo: -set fixes=%fixes% %mas%evaluation_editions -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" -) -goto dk_done -) -) - -::======================================================================================================================================== - -:: Check clipup.exe for the detection and activation of server cor and acor editions - -if defined a_cor ( -if not exist "!_work!\clipup.exe" ( -%eline% -echo clipup.exe doesn't exist in Server Cor/Acor [No GUI] versions. -echo The file is required for KMS38 activation. -echo Check the below page for instructions on how to activate it. -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%kms38" -goto dk_done -) -) - -:: Check file signature - -if defined a_cor ( -%psc% "if (-not (Get-AuthenticodeSignature -FilePath '!_work!\clipup.exe').IsOSBinary) {Exit 3}" %nul% -if !errorlevel!==3 ( -%eline% -echo Valid digital signature not found in clipup.exe file. -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -goto dk_done -) -) - -::======================================================================================================================================== - -set error= - -cls -echo: -call :dk_showosinfo - -::======================================================================================================================================== - -echo Initiating Diagnostic Tests... - -set "_serv=ClipSVC sppsvc KeyIso Winmgmt" - -:: Client License Service (ClipSVC) -:: Software Protection -:: CNG Key Isolation -:: Windows Management Instrumentation - -call :dk_errorcheck - -::======================================================================================================================================== - -:: Check if GVLK (KMS key) is already installed or not - -call :k_channel - -:: Detect Key - -set key= -set pkey= -set altkey= -set changekey= -set altedition= - -call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f -if defined allapps call :kms38data key -if not defined key call :k_gvlk %nul% -if defined allapps if not defined key call :kms38fallback - -if defined altkey (set key=%altkey%&set changekey=1) - -set /a UBR=0 -if %osSKU%==191 if defined altkey if defined altedition ( -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% LSS 22598 if !UBR! LSS 2788 ( -call :dk_color %Blue% "Windows must be updated to build 19044.2788 or higher for IotEnterpriseS KMS38 activation." -) -) - -if not defined key if defined notfoundaltactID ( -call :dk_color %Red% "Checking Alternate Edition for KMS38 [%altedition% Activation ID Not Found]" -) - -if not defined key if not defined _gvlk ( -echo: -echo [%winos% ^| %winbuild% ^| SKU:%osSKU%] - -if exist "%SysPath%\spp\tokens\skus\%osedition%\*GVLK*.xrm-ms" set sppks=1 - -if defined skunotfound ( -call :dk_color %Red% "Required license files not found in %SysPath%\spp\tokens\skus\" -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -) - -if defined sppks ( -call :dk_color %Red% "KMS38 activation is supported but failed to find the key." -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -) - -if not defined skunotfound if not defined sppks ( -call :dk_color %Red% "This product does not support KMS38 activation." -call :dk_color %Blue% "Use TSforge activation option from the main menu." -set fixes=%fixes% %mas% -echo %mas% -) -echo: -goto dk_done -) - -::======================================================================================================================================== - -:: Install key - -echo: -if defined changekey ( -call :dk_color %Blue% "[%altedition%] edition product key will be used to enable KMS38 activation." -echo: -) - -if defined winsub ( -call :dk_color %Blue% "Windows Subscription edition [SKU ID-%slcSKU%] found. Script will activate the base edition [SKU ID-%regSKU%]." -echo: -) - -set _partial= -if not defined key ( -if %_wmic% EQU 1 for /f "tokens=2 delims==" %%# in ('wmic path %spp% where "ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and PartialProductKey<>null AND LicenseDependsOn is NULL" Get PartialProductKey /value %nul6%') do set "_partial=%%#" -if %_wmic% EQU 0 for /f "tokens=2 delims==" %%# in ('%psc% "(([WMISEARCHER]'SELECT PartialProductKey FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).PartialProductKey | %% {echo ('PartialProductKey='+$_)}" %nul6%') do set "_partial=%%#" -call echo Checking Installed Product Key [Partial Key - %%_partial%%] [Volume:GVLK] -) - -if defined key ( -set generickey=1 -call :dk_inskey "[%key%]" -) - -::======================================================================================================================================== - -:: Check activation ID for setting specific KMS host - -set app= -if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL AND LicenseDependsOn is NULL) get ID /VALUE" %nul6%') do call set "app=%%a" -if %_wmic% EQU 0 for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT ID FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND Description like ''%%KMSCLIENT%%'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).ID | %% {echo ('ID='+$_)}" %nul6%') do call set "app=%%a" - -if not defined app ( -call :dk_color %Red% "Checking Installed GVLK Activation ID [Not Found] Aborting..." -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -goto :dk_done -) - -::======================================================================================================================================== - -:: Set specific KMS host to Local Host -:: By doing this, global KMS IP can not replace KMS38 activation but can be used with Office and other Windows Editions - -echo: -%nul% reg delete "HKLM\%specific_kms%" /f -%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f - -%nul% reg query "HKLM\%specific_kms%" && ( -call :dk_color %Blue% "Specific KMS registry is locked. %_fixmsg%" -) - -set k_error= -%nul% reg add "HKLM\%specific_kms%\%app%" /f /v KeyManagementServiceName /t REG_SZ /d "127.0.0.2" || set k_error=1 -%nul% reg add "HKLM\%specific_kms%\%app%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" || set k_error=1 - -if not defined k_error ( -echo Adding Specific KMS Host [LocalHost] [Successful] -) else ( -call :dk_color %Red% "Adding Specific KMS Host [LocalHost] [Failed]" -) - -::======================================================================================================================================== - -:: Copy clipup.exe to System32 directory to activate Server Cor/Acor editions - -if defined a_cor ( -set "_clipup=%systemroot%\System32\clipup.exe" -pushd "!_work!\" -copy /y /b "ClipUp.exe" "!_clipup!" %nul% -popd - -echo: -if exist "!_clipup!" ( -echo Copying clipup.exe File to [%systemroot%\System32\] [Successful] -) else ( -call :dk_color %Red% "Copying clipup.exe File to [%systemroot%\System32\] [Failed] Aborting..." -goto :k_final -) -) - -::======================================================================================================================================== - -:: Generate GenuineTicket.xml and apply -:: In some cases clipup -v -o method fails and in some cases service restart method fails as well -:: To maximize success rate and get better error details, script will install tickets two times (service restart + clipup -v -o) - -set "tdir=%ProgramData%\Microsoft\Windows\ClipSVC\GenuineTicket" -if not exist "%tdir%\" md "%tdir%\" %nul% - -if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% -if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul% -if exist "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" del /f /q "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" %nul% - -:: Generate ticket - -set "SessionIdStr=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;GVLKExp=2038-01-19T03:14:07Z;DownlevelGenuineState=1;" -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sign\:.*';. ([scriptblock]::Create($f[1]))" - -copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul% - -if not exist "%tdir%\GenuineTicket.xml" ( -call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting...]" -if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% -goto :k_final -) else ( -echo Generating GenuineTicket.xml [Successful] -) - -set "_xmlexist=if exist "%tdir%\GenuineTicket.xml"" - -:: Stop sppsvc - -%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" - -%_xmlexist% ( -%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 20 | Out-Null" -%_xmlexist% timeout /t 2 %nul% -%_xmlexist% timeout /t 2 %nul% - -%_xmlexist% ( -set error=1 -if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul% -call :dk_color %Gray% "Installing GenuineTicket.xml [Failed with ClipSVC service restart, wait...]" -) -) - -copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul% -clipup -v -o - -set rebuildinfo= - -if not exist %ProgramData%\Microsoft\Windows\ClipSVC\tokens.dat ( -set error=1 -set rebuildinfo=1 -call :dk_color %Red% "Checking ClipSVC tokens.dat [Not Found]" -) - -%_xmlexist% ( -set error=1 -set rebuildinfo=1 -call :dk_color %Red% "Installing GenuineTicket.xml [Failed With clipup -v -o]" -) - -if exist "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*.xml" ( -set error=1 -set rebuildinfo=1 -call :dk_color %Red% "Checking Ticket Migration [Failed]" -) - -if not defined showfix if defined rebuildinfo ( -set showfix=1 -echo: -call :dk_color %Blue% "%_fixmsg%" -echo: -) - -if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% - -::========================================================================================================================================== - -call :dk_product - -echo: -echo Activating... -echo: - -call :k_checkexp -if defined _k38 ( -call :k_actinfo -goto :k_final -) - -:: Clear 180 Days KMS Activation lock with Windows SKU specific rearm and without the need to restart the system - -if %_wmic% EQU 1 wmic path %spp% where ID='%app%' call ReArmsku %nul% -if %_wmic% EQU 0 %psc% "$null=([WMI]'%spp%=''%app%''').ReArmsku()" %nul% - -if %errorlevel%==0 ( -echo Applying SKU-ID Rearm [Successful] -) else ( -call :dk_color %Red% "Applying SKU-ID Rearm [Failed]" -) -call :dk_refresh - -echo: -call :k_checkexp -if defined _k38 ( -call :k_actinfo -goto :k_final -) - -call :dk_color %Red% "Activation Failed" -if not defined error call :dk_color %Blue% "%_fixmsg%" -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" - -::======================================================================================================================================== - -:k_final - -:: Remove the specific KMS host (LocalHost) added by the script if activation is not completed - -echo: -if not defined _k38 ( -%nul% reg delete "HKLM\%specific_kms%" /f -%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f -%nul% reg query "HKLM\%specific_kms%" && ( -call :dk_color %Red% "Removing the Added Specific KMS Host [Failed]" -) || ( -echo Removing the Added Specific KMS Host [Successful] -) -) - -if defined _k38 if %winbuild% GEQ 26200 ( -call :dk_color %Gray% "In Windows settings, you may see a renewal notification for activation that can be ignored." -call :dk_color %Gray% "To avoid this notification, please use the HWID or TSforge activation options in the main menu." -) - -:: clipup.exe does not exist in server cor and acor editions by default, it was copied there with this script - -if defined a_cor if exist "%_clipup%" del /f /q "%_clipup%" %nul% - -if defined a_cor ( -if exist "%_clipup%" ( -call :dk_color %Red% "Deleting Copied clipup.exe File [Failed]" -) else ( -echo Deleting Copied clipup.exe File [Successful] -) -) - -for %%# in (407) do if %osSKU%==%%# ( -call :dk_color %Red% "%winos% does not support activation on non-azure platforms." -) - -:: Trigger reevaluation of SPP's Scheduled Tasks - -if defined _k38 ( -call :dk_reeval %nul% -) -goto :dk_done - -::======================================================================================================================================== - -:k_uninstall - -cls -if not defined terminal mode 99, 28 -title Remove KMS38 Activation %masver% - -%nul% reg delete "HKLM\%specific_kms%" /f -%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f - -echo: -%nul% reg query "HKLM\%specific_kms%" && ( -call :dk_color %Red% "Failed to remove specific KMS Host." -call :dk_color %Blue% "%_fixmsg%" -) || ( -echo Successfully removed specific KMS Host. -) - -echo: -echo KMS38 activation doesn't modify any Windows components and doesn't install any new files. -echo: -call :dk_color %Gray% "If you want to reset the activation status," -call :dk_color %Blue% "%_fixmsg%" -echo: - -goto :dk_done - -::======================================================================================================================================== - -:: Check KMS activation status - -:k_actinfo - -set xpr= -for /f "tokens=* delims=" %%# in ('%psc% "$([DateTime]::Now.addMinutes(%gpr%)).ToString('yyyy-MM-dd HH:mm:ss')" %nul6%') do set "xpr=%%#" -call :dk_color %Green% "%winos% is activated till !xpr!" -exit /b - -:: Check remaining KMS activation grace period - -:k_checkexp - -set gpr=0 -if %_wmic% EQU 1 for /f "tokens=2 delims==" %%# in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL AND LicenseDependsOn is NULL) get GracePeriodRemaining /VALUE" %nul6%') do set "gpr=%%#" -if %_wmic% EQU 0 for /f "tokens=2 delims==" %%# in ('%psc% "(([WMISEARCHER]'SELECT GracePeriodRemaining FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND Description like ''%%KMSCLIENT%%'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).GracePeriodRemaining | %% {echo ('GracePeriodRemaining='+$_)}" %nul6%') do set "gpr=%%#" -if %gpr% GTR 259200 (set _k38=1) else (set _k38=) -exit /b - -:: Get Windows installed key channel - -:k_channel - -set _gvlk= -if %_wmic% EQU 1 for /f "tokens=2 delims==" %%# in ('wmic path %spp% where "ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL and Description like '%%KMSCLIENT%%'" Get Name /value %nul6%') do (echo %%# findstr /i "Windows" %nul1% && set _gvlk=1) -if %_wmic% EQU 0 for /f "tokens=2 delims==" %%# in ('%psc% "(([WMISEARCHER]'SELECT Name FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL and Description like ''%%KMSCLIENT%%''').Get()).Name | %% {echo ('Name='+$_)}" %nul6%') do (echo %%# findstr /i "Windows" %nul1% && set _gvlk=1) -exit /b - -::======================================================================================================================================== - -:: Get Product Key from pkeyhelper.dll for future new editions -:: It works on Windows 10 1803 (17134) and later builds. - -:k_pkey - -call :dk_reflection - -set d1=%ref% [void]$TypeBuilder.DefinePInvokeMethod('SkuGetProductKeyForEdition', 'pkeyhelper.dll', 'Public, Static', 1, [int], @([int], [String], [String].MakeByRefType(), [String].MakeByRefType()), 1, 3); -set d1=%d1% $out = ''; [void]$TypeBuilder.CreateType()::SkuGetProductKeyForEdition(%1, %2, [ref]$out, [ref]$null); $out - -set pkey= -for /f %%a in ('%psc% "%d1%"') do if not errorlevel 1 (set pkey=%%a) -exit /b - -:: Get channel name for the key which was extracted from pkeyhelper.dll - -:k_pkeychannel - -set k=%1 -set m=[Runtime.InteropServices.Marshal] -set p=%SysPath%\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms - -set d1=%ref% [void]$TypeBuilder.DefinePInvokeMethod('PidGenX', 'pidgenx.dll', 'Public, Static', 1, [int], @([String], [String], [String], [int], [IntPtr], [IntPtr], [IntPtr]), 1, 3); -set d1=%d1% $r = [byte[]]::new(0x04F8); $r[0] = 0xF8; $r[1] = 0x04; $f = %m%::AllocHGlobal(0x04F8); %m%::Copy($r, 0, $f, 0x04F8); -set d1=%d1% [void]$TypeBuilder.CreateType()::PidGenX('%k%', '%p%', '00000', 0, 0, 0, $f); %m%::Copy($f, $r, 0, 0x04F8); %m%::FreeHGlobal($f); [Text.Encoding]::Unicode.GetString($r, 1016, 128) - -set pkeychannel= -for /f %%a in ('%psc% "%d1%"') do if not errorlevel 1 (set pkeychannel=%%a) -exit /b - -:k_gvlk - -for %%# in (pkeyhelper.dll) do @if "%%~$PATH:#"=="" exit /b -for %%# in (Volume:GVLK) do ( -call :k_pkey %osSKU% '%%#' -if defined pkey call :k_pkeychannel !pkey! -if /i "!pkeychannel!"=="%%#" ( -set key=!pkey! -exit /b -) -) -exit /b - -::======================================================================================================================================== - -:: 1st column = Activation ID -:: 2nd column = GVLK (Generic volume licensing key) -:: 3rd column = SKU ID -:: 4th column = WMI Edition ID (For reference only) -:: 5th column = Build Branch name incase same Edition ID is used in different OS versions with different key (For reference only) -:: Separator = "_" - -:kms38data - -set f= -for %%# in ( -:: Windows 10/11 -73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43___4_Enterprise -e272e3e2-732f-4c65-a8f0-484747d0d947_DPH2V-TTNVB-4X9Q3-TJR4H-KH%f%JW4__27_EnterpriseN -2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX__48_Professional -a80b5abf-76ad-428b-b05d-a47d2dffeebf_MH37W-N47XK-V7XM9-C7227-GC%f%QG9__49_ProfessionalN -7b9e1751-a8da-4f75-9560-5fadfe3d8e38_3KHY7-WNT83-DGQKR-F7HPR-84%f%4BM__98_CoreN -a9107544-f4a0-4053-a96a-1479abdef912_PVMJN-6DFY6-9CCP6-7BKTT-D3%f%WVR__99_CoreCountrySpecific -cd918a57-a41b-4c82-8dce-1a538e221a83_7HNRX-D7KGG-3K4RQ-4WPJ4-YT%f%DFH_100_CoreSingleLanguage -58e97c99-f377-4ef1-81d5-4ad5522b5fd8_TX9XD-98N7V-6WMQ6-BX7FG-H8%f%Q99_101_Core -e0c42288-980c-4788-a014-c080d2e1926e_NW6C2-QMPVW-D7KKK-3GKT6-VC%f%FB2_121_Education -3c102355-d027-42c6-ad23-2e7ef8a02585_2WH4N-8QGBV-H22JP-CT43Q-MD%f%WWJ_122_EducationN -32d2fab3-e4a8-42c2-923b-4bf4fd13e6ee_M7XTQ-FN8P6-TTKYV-9D4CC-J4%f%62D_125_EnterpriseS_RS5,VB,Ge -2d5a5a60-3040-48bf-beb0-fcd770c20ce0_DCPHK-NFMTC-H88MJ-PFHPY-QJ%f%4BJ_125_EnterpriseS_RS1 -7b51a46c-0c04-4e8f-9af4-8496cca90d5e_WNMTR-4C88C-JK8YV-HQ7T2-76%f%DF9_125_EnterpriseS_TH1 -7103a333-b8c8-49cc-93ce-d37c09687f92_92NFX-8DJQP-P6BBQ-THF9C-7C%f%G2H_126_EnterpriseSN_RS5,VB,Ge -9f776d83-7156-45b2-8a5c-359b9c9f22a3_QFFDN-GRT3P-VKWWX-X7T3R-8B%f%639_126_EnterpriseSN_RS1 -87b838b7-41b6-4590-8318-5797951d8529_2F77B-TNFGY-69QQF-B8YKP-D6%f%9TJ_126_EnterpriseSN_TH1 -82bbc092-bc50-4e16-8e18-b74fc486aec3_NRG8B-VKK3Q-CXVCJ-9G2XF-6Q%f%84J_161_ProfessionalWorkstation -4b1571d3-bafb-4b40-8087-a961be2caf65_9FNHH-K3HBT-3W4TD-6383H-6X%f%YWF_162_ProfessionalWorkstationN -3f1afc82-f8ac-4f6c-8005-1d233e606eee_6TP4R-GNPTD-KYYHQ-7B7DP-J4%f%47Y_164_ProfessionalEducation -5300b18c-2e33-4dc2-8291-47ffcec746dd_YVWGF-BXNMC-HTQYQ-CPQ99-66%f%QFC_165_ProfessionalEducationN -e0b2d383-d112-413f-8a80-97f373a5820c_YYVX9-NTFWV-6MDM3-9PT4T-4M%f%68B_171_EnterpriseG -e38454fb-41a4-4f59-a5dc-25080e354730_44RPN-FTY23-9VTTB-MP9BX-T8%f%4FV_172_EnterpriseGN -ec868e65-fadf-4759-b23e-93fe37f2cc29_CPWHC-NT2C7-VYW78-DHDB2-PG%f%3GK_175_ServerRdsh_RS5 -e4db50ea-bda1-4566-b047-0ca50abc6f07_7NBT4-WGBQX-MP4H7-QXFF8-YP%f%3KX_175_ServerRdsh_RS3 -0df4f814-3f57-4b8b-9a9d-fddadcd69fac_NBTWJ-3DR69-3C4V8-C26MC-GQ%f%9M6_183_CloudE -59eb965c-9150-42b7-a0ec-22151b9897c5_KBN8V-HFGQ4-MGXVD-347P6-PD%f%QGT_191_IoTEnterpriseS_VB,NI -d30136fc-cb4b-416e-a23d-87207abc44a9_6XN7V-PCBDC-BDBRH-8DQY7-G6%f%R44_202_CloudEditionN -ca7df2e3-5ea0-47b8-9ac1-b1be4d8edd69_37D7F-N49CB-WQR8W-TBJ73-FM%f%8RX_203_CloudEdition -:: Windows 2016/19/22/25 LTSC/SAC -7dc26449-db21-4e09-ba37-28f2958506a6_TVRH6-WHNXV-R9WG3-9XRFY-MY%f%832___7_ServerStandard_Ge -9bd77860-9b31-4b7b-96ad-2564017315bf_VDYBN-27WPP-V4HQT-9VMD4-VM%f%K7H___7_ServerStandard_FE -de32eafd-aaee-4662-9444-c1befb41bde2_N69G4-B89J2-4G8F4-WWYCC-J4%f%64C___7_ServerStandard_RS5 -8c1c5410-9f39-4805-8c9d-63a07706358f_WC2BQ-8NRM3-FDDYY-2BFGV-KH%f%KQY___7_ServerStandard_RS1 -c052f164-cdf6-409a-a0cb-853ba0f0f55a_D764K-2NDRG-47T6Q-P8T8W-YP%f%6DF___8_ServerDatacenter_Ge -ef6cfc9f-8c5d-44ac-9aad-de6a2ea0ae03_WX4NM-KYWYW-QJJR4-XV3QB-6V%f%M33___8_ServerDatacenter_FE -34e1ae55-27f8-4950-8877-7a03be5fb181_WMDGN-G9PQG-XVVXX-R3X43-63%f%DFG___8_ServerDatacenter_RS5 -21c56779-b449-4d20-adfc-eece0e1ad74b_CB7KF-BWN84-R7R2Y-793K2-8X%f%DDG___8_ServerDatacenter_RS1 -034d3cbb-5d4b-4245-b3f8-f84571314078_WVDHN-86M7X-466P6-VHXV7-YY%f%726__50_ServerSolution_RS5 -2b5a1b0f-a5ab-4c54-ac2f-a6d94824a283_JCKRF-N37P4-C2D82-9YXRT-4M%f%63B__50_ServerSolution_RS1 -7b4433f4-b1e7-4788-895a-c45378d38253_QN4C6-GBJD2-FB422-GHWJK-GJ%f%G2R_110_ServerCloudStorage -8de8eb62-bbe0-40ac-ac17-f75595071ea3_GRFBW-QNDC4-6QBHG-CCK3B-2P%f%R88_120_ServerARM64_RS5 -43d9af6e-5e86-4be8-a797-d072a046896c_K9FYF-G6NCK-73M32-XMVPY-F9%f%DRR_120_ServerARM64_RS4 -39e69c41-42b4-4a0a-abad-8e3c10a797cc_QFND9-D3Y9C-J3KKY-6RPVP-2D%f%PYV_145_ServerDatacenterACor_FE -90c362e5-0da1-4bfd-b53b-b87d309ade43_6NMRW-2C8FM-D24W7-TQWMY-CW%f%H2D_145_ServerDatacenterACor_RS5 -e49c08e7-da82-42f8-bde2-b570fbcae76c_2HXDN-KRXHB-GPYC7-YCKFJ-7F%f%VDG_145_ServerDatacenterACor_RS3 -f5e9429c-f50b-4b98-b15c-ef92eb5cff39_67KN8-4FYJW-2487Q-MQ2J7-4C%f%4RG_146_ServerStandardACor_FE -73e3957c-fc0c-400d-9184-5f7b6f2eb409_N2KJX-J94YW-TQVFB-DG9YT-72%f%4CC_146_ServerStandardACor_RS5 -61c5ef22-f14f-4553-a824-c4b31e84b100_PTXN8-JFHJM-4WC78-MPCBR-9W%f%4KR_146_ServerStandardACor_RS3 -45b5aff2-60a0-42f2-bc4b-ec6e5f7b527e_FCNV3-279Q9-BQB46-FTKXX-9H%f%PRH_168_ServerAzureCor_Ge -8c8f0ad3-9a43-4e05-b840-93b8d1475cbc_6N379-GGTMK-23C6M-XVVTC-CK%f%FRQ_168_ServerAzureCor_FE -a99cc1f0-7719-4306-9645-294102fbff95_FDNH6-VW9RW-BXPJ7-4XTYG-23%f%9TB_168_ServerAzureCor_RS5 -3dbf341b-5f6c-4fa7-b936-699dce9e263f_VP34G-4NPPG-79JTQ-864T4-R3%f%MQX_168_ServerAzureCor_RS1 -c2e946d1-cfa2-4523-8c87-30bc696ee584_XGN3F-F394H-FD2MY-PP6FD-8M%f%CRC_407_ServerTurbine_Ge -19b5e0fb-4431-46bc-bac1-2f1873e4ae73_NTBV8-9K7Q8-V27C6-M2BTV-KH%f%MXV_407_ServerTurbine_RS5 -) do ( -for /f "tokens=1-5 delims=_" %%A in ("%%#") do if %osSKU%==%%C ( -if %1==key if not defined key echo "!allapps!" | find /i "%%A" %nul1% && set key=%%B -) -) -exit /b - -::======================================================================================================================================== - -:: Below code is used to get alternate edition name and key if current edition doesn't support KMS38 activation - -:: 1st column = Current SKU ID -:: 2nd column = Current Edition Name -:: 3rd column = Current Edition Activation ID -:: 4th column = Alternate Edition Activation ID -:: 5th column = Alternate Edition GVLK -:: 6th column = Alternate Edition Name -:: Separator = _ - - -:kms38fallback - -set notfoundaltactID= -if %_NoEditionChange%==1 exit /b - -for %%# in ( -188_IoTEnterprise__________________8ab9bdd1-1f67-4997-82d9-8878520837d9_73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43_Enterprise -206_IoTEnterpriseK_________________80083eae-7031-4394-9e88-4901973d56fe_73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43_Enterprise -191_IoTEnterpriseS-2021____________ed655016-a9e8-4434-95d9-4345352c2552_32d2fab3-e4a8-42c2-923b-4bf4fd13e6ee_M7XTQ-FN8P6-TTKYV-9D4CC-J4%f%62D_EnterpriseS-2021 -205_IoTEnterpriseSK________________d4f9b41f-205c-405e-8e08-3d16e88e02be_59eb965c-9150-42b7-a0ec-22151b9897c5_KBN8V-HFGQ4-MGXVD-347P6-PD%f%QGT_IoTEnterpriseS -138_ProfessionalSingleLanguage_____a48938aa-62fa-4966-9d44-9f04da3f72f2_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional -139_ProfessionalCountrySpecific____f7af7d09-40e4-419c-a49b-eae366689ebd_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional -139_ProfessionalCountrySpecific-Zn_01eb852c-424d-4060-94b8-c10d799d7364_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional -) do ( -for /f "tokens=1-6 delims=_" %%A in ("%%#") do if %osSKU%==%%A ( -echo "!allapps!" | find /i "%%C" %nul1% && ( -echo "!allapps!" | find /i "%%D" %nul1% && ( -set altkey=%%E -set altedition=%%F -) || ( -set altedition=%%F -set notfoundaltactID=1 -) -) -) -) -exit /b - -:+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - :KMSActivation :: To activate Windows with K-M-S activation, run the script with "/K-Windows" parameter or change 0 to 1 in below line @@ -13080,7 +12320,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) @@ -14655,6 +13895,63 @@ exit /b ::======================================================================================================================================== +:: Get Windows installed key channel + +:k_channel + +set _gvlk= +if %_wmic% EQU 1 for /f "tokens=2 delims==" %%# in ('wmic path %spp% where "ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL and Description like '%%KMSCLIENT%%'" Get Name /value %nul6%') do (echo %%# findstr /i "Windows" %nul1% && set _gvlk=1) +if %_wmic% EQU 0 for /f "tokens=2 delims==" %%# in ('%psc% "(([WMISEARCHER]'SELECT Name FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL and Description like ''%%KMSCLIENT%%''').Get()).Name | %% {echo ('Name='+$_)}" %nul6%') do (echo %%# findstr /i "Windows" %nul1% && set _gvlk=1) +exit /b + + +::======================================================================================================================================== + +:: Get Product Key from pkeyhelper.dll for future new editions +:: It works on Windows 10 1803 (17134) and later builds. + +:k_pkey + +call :dk_reflection + +set d1=%ref% [void]$TypeBuilder.DefinePInvokeMethod('SkuGetProductKeyForEdition', 'pkeyhelper.dll', 'Public, Static', 1, [int], @([int], [String], [String].MakeByRefType(), [String].MakeByRefType()), 1, 3); +set d1=%d1% $out = ''; [void]$TypeBuilder.CreateType()::SkuGetProductKeyForEdition(%1, %2, [ref]$out, [ref]$null); $out + +set pkey= +for /f %%a in ('%psc% "%d1%"') do if not errorlevel 1 (set pkey=%%a) +exit /b + +:: Get channel name for the key which was extracted from pkeyhelper.dll + +:k_pkeychannel + +set k=%1 +set m=[Runtime.InteropServices.Marshal] +set p=%SysPath%\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms + +set d1=%ref% [void]$TypeBuilder.DefinePInvokeMethod('PidGenX', 'pidgenx.dll', 'Public, Static', 1, [int], @([String], [String], [String], [int], [IntPtr], [IntPtr], [IntPtr]), 1, 3); +set d1=%d1% $r = [byte[]]::new(0x04F8); $r[0] = 0xF8; $r[1] = 0x04; $f = %m%::AllocHGlobal(0x04F8); %m%::Copy($r, 0, $f, 0x04F8); +set d1=%d1% [void]$TypeBuilder.CreateType()::PidGenX('%k%', '%p%', '00000', 0, 0, 0, $f); %m%::Copy($f, $r, 0, 0x04F8); %m%::FreeHGlobal($f); [Text.Encoding]::Unicode.GetString($r, 1016, 128) + +set pkeychannel= +for /f %%a in ('%psc% "%d1%"') do if not errorlevel 1 (set pkeychannel=%%a) +exit /b + +:k_gvlk + +for %%# in (pkeyhelper.dll) do @if "%%~$PATH:#"=="" exit /b +for %%# in (Volume:GVLK) do ( +call :k_pkey %osSKU% '%%#' +if defined pkey call :k_pkeychannel !pkey! +if /i "!pkeychannel!"=="%%#" ( +set key=!pkey! +exit /b +) +) +exit /b + +::======================================================================================================================================== + :: 1st column = Office version number :: 2nd column = Activation ID :: 3rd column = Product ID from branding.xml @@ -15129,6 +14426,47 @@ set _allactid=!_allactid! %%A ) exit /b +::======================================================================================================================================== + +:: Below code is used to get alternate edition name and key if current edition doesn't support K-M-S activation + +:: 1st column = Current SKU ID +:: 2nd column = Current Edition Name +:: 3rd column = Current Edition Activation ID +:: 4th column = Alternate Edition Activation ID +:: 5th column = Alternate Edition GVLK +:: 6th column = Alternate Edition Name +:: Separator = _ + + +:kmsfallback + +set notfoundaltactID= +if %_NoEditionChange%==1 exit /b + +for %%# in ( +188_IoTEnterprise__________________8ab9bdd1-1f67-4997-82d9-8878520837d9_73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43_Enterprise +206_IoTEnterpriseK_________________80083eae-7031-4394-9e88-4901973d56fe_73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43_Enterprise +191_IoTEnterpriseS-2021____________ed655016-a9e8-4434-95d9-4345352c2552_32d2fab3-e4a8-42c2-923b-4bf4fd13e6ee_M7XTQ-FN8P6-TTKYV-9D4CC-J4%f%62D_EnterpriseS-2021 +205_IoTEnterpriseSK________________d4f9b41f-205c-405e-8e08-3d16e88e02be_59eb965c-9150-42b7-a0ec-22151b9897c5_KBN8V-HFGQ4-MGXVD-347P6-PD%f%QGT_IoTEnterpriseS +138_ProfessionalSingleLanguage_____a48938aa-62fa-4966-9d44-9f04da3f72f2_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional +139_ProfessionalCountrySpecific____f7af7d09-40e4-419c-a49b-eae366689ebd_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional +139_ProfessionalCountrySpecific-Zn_01eb852c-424d-4060-94b8-c10d799d7364_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional +) do ( +for /f "tokens=1-6 delims=_" %%A in ("%%#") do if %osSKU%==%%A ( +echo "!allapps!" | find /i "%%C" %nul1% && ( +echo "!allapps!" | find /i "%%D" %nul1% && ( +set altkey=%%E +set altedition=%%F +) || ( +set altedition=%%F +set notfoundaltactID=1 +) +) +) +) +exit /b + :+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ :check_actstatus diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd deleted file mode 100644 index 7b0025e..0000000 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ /dev/null @@ -1,2261 +0,0 @@ -@set masver=3.7 -@echo off - - - -::============================================================================ -:: -:: Homepage: mass()grave(dot)dev -:: Email: mas.help@outlook.com -:: -::============================================================================ - - - -:: To activate, run the script with "/KMS38" parameter or change 0 to 1 in below line -set _act=0 - -:: To disable changing edition if current edition doesn't support KMS38 activation, change the value to 1 from 0 or run the script with "/KMS38-NoEditionChange" parameter -set _NoEditionChange=0 - -:: To run the script in debug mode, change 0 to "/KMS38" in below line -set "_debug=0" - -:: If value is changed in above lines or parameter is used then script will run in unattended mode - - - -::======================================================================================================================================== - -:: Set environment variables, it helps if they are misconfigured in the system - -setlocal EnableExtensions -setlocal DisableDelayedExpansion - -set "PathExt=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC" - -set "SysPath=%SystemRoot%\System32" -set "Path=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0\" -if exist "%SystemRoot%\Sysnative\reg.exe" ( -set "SysPath=%SystemRoot%\Sysnative" -set "Path=%SystemRoot%\Sysnative;%SystemRoot%;%SystemRoot%\Sysnative\Wbem;%SystemRoot%\Sysnative\WindowsPowerShell\v1.0\;%Path%" -) - -set "ComSpec=%SysPath%\cmd.exe" -set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowerShell\v1.0\Modules" - -set re1= -set re2= -set "_cmdf=%~f0" -for %%# in (%*) do ( -if /i "%%#"=="re1" set re1=1 -if /i "%%#"=="re2" set re2=1 -if /i "%%#"=="-qedit" (set re1=1&set re2=1) -) - -:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows -:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows - -if exist %SystemRoot%\Sysnative\cmd.exe if not defined re1 ( -setlocal EnableDelayedExpansion -start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* re1" -exit /b -) - -:: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows - -if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined re2 ( -setlocal EnableDelayedExpansion -start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* re2" -exit /b -) - -::======================================================================================================================================== - -:: Debug code - -if "%_debug%" EQU "0" ( -set "nul1=1>nul" -set "nul2=2>nul" -set "nul6=2^>nul" -set "nul=>nul 2>&1" -goto :_debug -) - -set "nul1=" -set "nul2=" -set "nul6=" -set "nul=" - -@echo on -@prompt $G -@call :_debug "%_debug%" >"%~dp0_tmp.log" 2>&1 -@cmd /u /c type "%~dp0_tmp.log">"%~dp0_Debug.log" -@del "%~dp0_tmp.log" -@echo off -@exit /b - -:_debug - -::======================================================================================================================================== - -set "blank=" -set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/" -set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts" -set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts" - -:: Check if Null service is working, it's important for the batch script - -sc query Null | find /i "RUNNING" -if %errorlevel% NEQ 0 ( -echo: -echo Null service is not running, script may crash... -echo: -echo: -echo Check this webpage for help - %mas%fix_service -echo: -echo: -ping 127.0.0.1 -n 20 -) -cls - -:: Check LF line ending - -pushd "%~dp0" ->nul findstr /v "$" "%~nx0" && ( -echo: -echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing. -echo: -echo: -echo Check this webpage for help - %mas%troubleshoot -echo: -echo: -ping 127.0.0.1 -n 20 >nul -popd -exit /b -) -popd - -::======================================================================================================================================== - -cls -color 07 -title KMS38 Activation %masver% - -set _args= -set _elev= -set _unattended=0 - -set _args=%* -if defined _args set _args=%_args:"=% -if defined _args set _args=%_args:re1=% -if defined _args set _args=%_args:re2=% -if defined _args ( -for %%A in (%_args%) do ( -if /i "%%A"=="/KMS38" set _act=1 -if /i "%%A"=="/KMS38-NoEditionChange" set _NoEditionChange=1 -if /i "%%A"=="-el" set _elev=1 -) -) - -for %%A in (%_act% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1) - -::======================================================================================================================================== - -set _k38= -call :dk_setvar -set "specific_kms=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f" - -if %winbuild% EQU 1 ( -%eline% -echo Failed to detect Windows build number. -echo: -setlocal EnableDelayedExpansion -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -goto dk_done -) - -if exist "%Systemdrive%\Users\WDAGUtilityAccount" ( -sc query gcs | find /i "RUNNING" %nul% && ( -%eline% -echo Windows Sandbox detected; activation is not supported. -echo The script cannot run due to missing licensing components. Aborting... -echo: -goto dk_done -) -) - -if %winbuild% LSS 14393 ( -%eline% -echo Unsupported OS version detected [%winbuild%]. -echo KMS38 activation is only supported on Windows 10/11/Server, build 14393 and later. -echo: -if %winbuild% LSS 10240 ( -call :dk_color %Blue% "Use TSforge activation option from the main menu." -) else ( -call :dk_color %Blue% "Use HWID activation option from the main menu." -) -goto dk_done -) - -::======================================================================================================================================== - -:: Fix special character limitations in path name - -set "_work=%~dp0" -if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%" - -set "_batf=%~f0" -set "_batp=%_batf:'=''%" - -set _PSarg="""%~f0""" -el %_args% -set _PSarg=%_PSarg:'=''% - -set "_ttemp=%userprofile%\AppData\Local\Temp" - -setlocal EnableDelayedExpansion - -::======================================================================================================================================== - -echo "!_batf!" | find /i "!_ttemp!" %nul1% && ( -if /i not "!_work!"=="!_ttemp!" ( -%eline% -echo The script was launched from the temp folder. -echo You are most likely running the script directly from the archive file. -echo: -echo Extract the archive file and launch the script from the extracted folder. -goto dk_done -) -) - -::======================================================================================================================================== - -:: Elevate script as admin and pass arguments and preventing loop - -%nul1% fltmc || ( -if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b -%eline% -echo This script needs admin rights. -echo Right click on this script and select 'Run as administrator'. -goto dk_done -) - -::======================================================================================================================================== - -:: Check PowerShell - -::pstst $ExecutionContext.SessionState.LanguageMode :pstst - -for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a) - -if /i not "%tstresult%"=="FullLanguage" ( -%eline% -for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a) -echo Test 1 - %tstresult% -echo Test 2 - !tstresult2! -echo: - -REM check LanguageMode - -echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( -echo FullLanguage mode not found in PowerShell. Aborting... -echo If you have applied restrictions on Powershell then undo those changes. -echo: -set fixes=%fixes% %mas%fix_powershell -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell" -goto dk_done -) - -REM check Powershell core version - -cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( -echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting... -echo: -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" -goto dk_done -) - -REM check for Mal-ware that may cause issues with Powershell - -for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( -echo "%%f" -echo Mal%blank%ware found, PowerShell is not working properly. -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -goto dk_done -) - -REM check if .NET is working properly - -if /i "!tstresult2!"=="FullLanguage" ( -cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% -if !errorlevel!==3 ( -echo Windows Powershell failed to load .NET command. Aborting... -echo: -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" -goto dk_done -) -) - -REM check antivirus and other errors - -echo PowerShell is not working properly. Aborting... - -if /i "!tstresult2!"=="FullLanguage" ( -echo: -echo Your antivirus software might be blocking the script. -echo: -sc query sense | find /i "RUNNING" %nul% && ( -echo Installed Antivirus - Microsoft Defender for Endpoint -) -cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}""" -) - -echo: -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -goto dk_done -) - -::======================================================================================================================================== - -:: Disable QuickEdit and launch from conhost.exe to avoid Terminal app - -if %winbuild% GEQ 17763 ( -set terminal=1 -) else ( -set terminal= -) - -:: Check if script is running in Terminal app - -if defined terminal ( -set lines=0 -for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" ( -for %%B in (%%A) do set lines=%%B -) -if !lines! GEQ 100 set terminal= -) - -if %_unattended%==1 goto :skipQE -for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE) - -:: Relaunch to disable QuickEdit in the current session and use conhost.exe instead of the Terminal app -:: This code disables QuickEdit for the current cmd.exe session without making permanent registry changes -:: It is included because clicking on the script window can pause execution, causing confusion that the script has stopped due to an error - -set resetQE=1 -reg query HKCU\Console /v QuickEdit %nul2% | find /i "0x0" %nul1% && set resetQE=0 -reg add HKCU\Console /v QuickEdit /t REG_DWORD /d 0 /f %nul1% - -if defined terminal ( -start conhost.exe "!_batf!" %_args% -qedit -start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1% -exit /b -) else if %resetQE% EQU 1 ( -start cmd.exe /c ""!_batf!" %_args% -qedit" -start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1% -exit /b -) - -:skipQE - -::======================================================================================================================================== - -:: Check for updates - -set -= -set old= -set pingp= -set upver=%masver:.=% - -for %%A in ( -activ%-%ated.win -mass%-%grave.dev -) do if not defined pingp ( -for /f "delims=[] tokens=2" %%B in ('ping -n 1 %%A') do ( -if not "%%B"=="" (set old=1& set pingp=1) -for /f "delims=[] tokens=2" %%C in ('ping -n 1 updatecheck%upver%.%%A') do ( -if not "%%C"=="" set old= -) -) -) - -if defined old ( -echo ________________________________________________ -%eline% -echo Your version of MAS [%masver%] is outdated. -echo ________________________________________________ -echo: -if not %_unattended%==1 ( -echo [1] Get Latest MAS -echo [0] Continue Anyway -echo: -call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" -choice /C:10 /N -if !errorlevel!==2 rem -if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b) -) -) -cls - -::======================================================================================================================================== - -:k_menu - -if %_unattended%==0 ( -cls -if not defined terminal mode 76, 25 -title KMS38 Activation %masver% - -echo: -echo: -echo: -echo: -echo: ______________________________________________________ -echo: -echo [1] KMS38 Activation -echo ____________________________________________ -echo: -echo [2] Remove KMS38 Activation -echo: -echo [0] %_exitmsg% -echo: ______________________________________________________ -echo: -call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,0]" -choice /C:120 /N -set _el=!errorlevel! -if !_el!==3 exit /b -if !_el!==2 goto :k_uninstall -if !_el!==1 goto :k_menu2 -goto :k_menu -) - -::======================================================================================================================================== - -:k_menu2 - -cls -if not defined terminal ( -mode 110, 34 -if exist "%SysPath%\spp\store_test\" mode 134, 34 -) -title KMS38 Activation %masver% - -echo: -echo Initializing... -call :dk_chkmal - -if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*CorEdition~*.mum" if not exist "%SysPath%\clipup.exe" set a_cor=1 -if not exist %SysPath%\sppsvc.exe (set _fmiss=sppsvc.exe) -if not exist %SysPath%\ClipUp.exe if not defined a_cor (set _fmiss=%_fmiss%ClipUp.exe) - -if defined _fmiss ( -%eline% -echo [%_fmiss%] file is missing, aborting... -echo: -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" -) -goto dk_done -) - -::======================================================================================================================================== - -set spp=SoftwareLicensingProduct -set sps=SoftwareLicensingService - -call :dk_ckeckwmic -call :dk_checksku -call :dk_product -call :dk_sppissue - -::======================================================================================================================================== - -:: Check if system is permanently activated or not - -call :dk_checkperm -if defined _perm ( -cls -echo ___________________________________________________________________________________________ -echo: -call :dk_color2 %_White% " " %Green% "%winos% is already permanently activated." -call :dk_color2 %_White% " " %Gray% "Activation is not required." -echo ___________________________________________________________________________________________ -if %_unattended%==1 goto dk_done -echo: -choice /C:10 /N /M "> [1] Activate Anyway [0] %_exitmsg% : " -if errorlevel 2 exit /b -) -cls - -::======================================================================================================================================== - -:: Check Evaluation version - -set _eval= -set _evalserv= - -if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" set _eval=1 -if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*EvalEdition~*.mum" set _evalserv=1 -if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*EvalCorEdition~*.mum" set _eval=1 & set _evalserv=1 - -if defined _eval ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% && ( -%eline% -echo [%winos% ^| %winbuild%] -if defined _evalserv ( -echo Server Evaluation cannot be activated. Convert it to full Server OS. -echo: -call :dk_color %Blue% "Go Back to main menu and use [Change Edition] option." -) else ( -echo Evaluation editions cannot be activated outside of their evaluation period. -call :dk_color %Blue% "Use TSforge activation option from the main menu to reset evaluation period." -echo: -set fixes=%fixes% %mas%evaluation_editions -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" -) -goto dk_done -) -) - -::======================================================================================================================================== - -:: Check clipup.exe for the detection and activation of server cor and acor editions - -if defined a_cor ( -if not exist "!_work!\clipup.exe" ( -%eline% -echo clipup.exe doesn't exist in Server Cor/Acor [No GUI] versions. -echo The file is required for KMS38 activation. -echo Check the below page for instructions on how to activate it. -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%kms38" -goto dk_done -) -) - -:: Check file signature - -if defined a_cor ( -%psc% "if (-not (Get-AuthenticodeSignature -FilePath '!_work!\clipup.exe').IsOSBinary) {Exit 3}" %nul% -if !errorlevel!==3 ( -%eline% -echo Valid digital signature not found in clipup.exe file. -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -goto dk_done -) -) - -::======================================================================================================================================== - -set error= - -cls -echo: -call :dk_showosinfo - -::======================================================================================================================================== - -echo Initiating Diagnostic Tests... - -set "_serv=ClipSVC sppsvc KeyIso Winmgmt" - -:: Client License Service (ClipSVC) -:: Software Protection -:: CNG Key Isolation -:: Windows Management Instrumentation - -call :dk_errorcheck - -::======================================================================================================================================== - -:: Check if GVLK (KMS key) is already installed or not - -call :k_channel - -:: Detect Key - -set key= -set pkey= -set altkey= -set changekey= -set altedition= - -call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f -if defined allapps call :kms38data key -if not defined key call :k_gvlk %nul% -if defined allapps if not defined key call :kms38fallback - -if defined altkey (set key=%altkey%&set changekey=1) - -set /a UBR=0 -if %osSKU%==191 if defined altkey if defined altedition ( -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% LSS 22598 if !UBR! LSS 2788 ( -call :dk_color %Blue% "Windows must be updated to build 19044.2788 or higher for IotEnterpriseS KMS38 activation." -) -) - -if not defined key if defined notfoundaltactID ( -call :dk_color %Red% "Checking Alternate Edition for KMS38 [%altedition% Activation ID Not Found]" -) - -if not defined key if not defined _gvlk ( -echo: -echo [%winos% ^| %winbuild% ^| SKU:%osSKU%] - -if exist "%SysPath%\spp\tokens\skus\%osedition%\*GVLK*.xrm-ms" set sppks=1 - -if defined skunotfound ( -call :dk_color %Red% "Required license files not found in %SysPath%\spp\tokens\skus\" -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -) - -if defined sppks ( -call :dk_color %Red% "KMS38 activation is supported but failed to find the key." -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -) - -if not defined skunotfound if not defined sppks ( -call :dk_color %Red% "This product does not support KMS38 activation." -call :dk_color %Blue% "Use TSforge activation option from the main menu." -set fixes=%fixes% %mas% -echo %mas% -) -echo: -goto dk_done -) - -::======================================================================================================================================== - -:: Install key - -echo: -if defined changekey ( -call :dk_color %Blue% "[%altedition%] edition product key will be used to enable KMS38 activation." -echo: -) - -if defined winsub ( -call :dk_color %Blue% "Windows Subscription edition [SKU ID-%slcSKU%] found. Script will activate the base edition [SKU ID-%regSKU%]." -echo: -) - -set _partial= -if not defined key ( -if %_wmic% EQU 1 for /f "tokens=2 delims==" %%# in ('wmic path %spp% where "ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and PartialProductKey<>null AND LicenseDependsOn is NULL" Get PartialProductKey /value %nul6%') do set "_partial=%%#" -if %_wmic% EQU 0 for /f "tokens=2 delims==" %%# in ('%psc% "(([WMISEARCHER]'SELECT PartialProductKey FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).PartialProductKey | %% {echo ('PartialProductKey='+$_)}" %nul6%') do set "_partial=%%#" -call echo Checking Installed Product Key [Partial Key - %%_partial%%] [Volume:GVLK] -) - -if defined key ( -set generickey=1 -call :dk_inskey "[%key%]" -) - -::======================================================================================================================================== - -:: Check activation ID for setting specific KMS host - -set app= -if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL AND LicenseDependsOn is NULL) get ID /VALUE" %nul6%') do call set "app=%%a" -if %_wmic% EQU 0 for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT ID FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND Description like ''%%KMSCLIENT%%'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).ID | %% {echo ('ID='+$_)}" %nul6%') do call set "app=%%a" - -if not defined app ( -call :dk_color %Red% "Checking Installed GVLK Activation ID [Not Found] Aborting..." -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" -goto :dk_done -) - -::======================================================================================================================================== - -:: Set specific KMS host to Local Host -:: By doing this, global KMS IP can not replace KMS38 activation but can be used with Office and other Windows Editions - -echo: -%nul% reg delete "HKLM\%specific_kms%" /f -%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f - -%nul% reg query "HKLM\%specific_kms%" && ( -call :dk_color %Blue% "Specific KMS registry is locked. %_fixmsg%" -) - -set k_error= -%nul% reg add "HKLM\%specific_kms%\%app%" /f /v KeyManagementServiceName /t REG_SZ /d "127.0.0.2" || set k_error=1 -%nul% reg add "HKLM\%specific_kms%\%app%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" || set k_error=1 - -if not defined k_error ( -echo Adding Specific KMS Host [LocalHost] [Successful] -) else ( -call :dk_color %Red% "Adding Specific KMS Host [LocalHost] [Failed]" -) - -::======================================================================================================================================== - -:: Copy clipup.exe to System32 directory to activate Server Cor/Acor editions - -if defined a_cor ( -set "_clipup=%systemroot%\System32\clipup.exe" -pushd "!_work!\" -copy /y /b "ClipUp.exe" "!_clipup!" %nul% -popd - -echo: -if exist "!_clipup!" ( -echo Copying clipup.exe File to [%systemroot%\System32\] [Successful] -) else ( -call :dk_color %Red% "Copying clipup.exe File to [%systemroot%\System32\] [Failed] Aborting..." -goto :k_final -) -) - -::======================================================================================================================================== - -:: Generate GenuineTicket.xml and apply -:: In some cases clipup -v -o method fails and in some cases service restart method fails as well -:: To maximize success rate and get better error details, script will install tickets two times (service restart + clipup -v -o) - -set "tdir=%ProgramData%\Microsoft\Windows\ClipSVC\GenuineTicket" -if not exist "%tdir%\" md "%tdir%\" %nul% - -if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% -if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul% -if exist "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" del /f /q "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" %nul% - -:: Generate ticket - -set "SessionIdStr=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;GVLKExp=2038-01-19T03:14:07Z;DownlevelGenuineState=1;" -%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sign\:.*';. ([scriptblock]::Create($f[1]))" - -copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul% - -if not exist "%tdir%\GenuineTicket.xml" ( -call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting...]" -if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% -goto :k_final -) else ( -echo Generating GenuineTicket.xml [Successful] -) - -set "_xmlexist=if exist "%tdir%\GenuineTicket.xml"" - -:: Stop sppsvc - -%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" - -%_xmlexist% ( -%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 20 | Out-Null" -%_xmlexist% timeout /t 2 %nul% -%_xmlexist% timeout /t 2 %nul% - -%_xmlexist% ( -set error=1 -if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul% -call :dk_color %Gray% "Installing GenuineTicket.xml [Failed with ClipSVC service restart, wait...]" -) -) - -copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul% -clipup -v -o - -set rebuildinfo= - -if not exist %ProgramData%\Microsoft\Windows\ClipSVC\tokens.dat ( -set error=1 -set rebuildinfo=1 -call :dk_color %Red% "Checking ClipSVC tokens.dat [Not Found]" -) - -%_xmlexist% ( -set error=1 -set rebuildinfo=1 -call :dk_color %Red% "Installing GenuineTicket.xml [Failed With clipup -v -o]" -) - -if exist "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*.xml" ( -set error=1 -set rebuildinfo=1 -call :dk_color %Red% "Checking Ticket Migration [Failed]" -) - -if not defined showfix if defined rebuildinfo ( -set showfix=1 -echo: -call :dk_color %Blue% "%_fixmsg%" -echo: -) - -if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% - -::========================================================================================================================================== - -call :dk_product - -echo: -echo Activating... -echo: - -call :k_checkexp -if defined _k38 ( -call :k_actinfo -goto :k_final -) - -:: Clear 180 Days KMS Activation lock with Windows SKU specific rearm and without the need to restart the system - -if %_wmic% EQU 1 wmic path %spp% where ID='%app%' call ReArmsku %nul% -if %_wmic% EQU 0 %psc% "$null=([WMI]'%spp%=''%app%''').ReArmsku()" %nul% - -if %errorlevel%==0 ( -echo Applying SKU-ID Rearm [Successful] -) else ( -call :dk_color %Red% "Applying SKU-ID Rearm [Failed]" -) -call :dk_refresh - -echo: -call :k_checkexp -if defined _k38 ( -call :k_actinfo -goto :k_final -) - -call :dk_color %Red% "Activation Failed" -if not defined error call :dk_color %Blue% "%_fixmsg%" -set fixes=%fixes% %mas%troubleshoot -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" - -::======================================================================================================================================== - -:k_final - -:: Remove the specific KMS host (LocalHost) added by the script if activation is not completed - -echo: -if not defined _k38 ( -%nul% reg delete "HKLM\%specific_kms%" /f -%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f -%nul% reg query "HKLM\%specific_kms%" && ( -call :dk_color %Red% "Removing the Added Specific KMS Host [Failed]" -) || ( -echo Removing the Added Specific KMS Host [Successful] -) -) - -if defined _k38 if %winbuild% GEQ 26200 ( -call :dk_color %Gray% "In Windows settings, you may see a renewal notification for activation that can be ignored." -call :dk_color %Gray% "To avoid this notification, please use the HWID or TSforge activation options in the main menu." -) - -:: clipup.exe does not exist in server cor and acor editions by default, it was copied there with this script - -if defined a_cor if exist "%_clipup%" del /f /q "%_clipup%" %nul% - -if defined a_cor ( -if exist "%_clipup%" ( -call :dk_color %Red% "Deleting Copied clipup.exe File [Failed]" -) else ( -echo Deleting Copied clipup.exe File [Successful] -) -) - -for %%# in (407) do if %osSKU%==%%# ( -call :dk_color %Red% "%winos% does not support activation on non-azure platforms." -) - -:: Trigger reevaluation of SPP's Scheduled Tasks - -if defined _k38 ( -call :dk_reeval %nul% -) -goto :dk_done - -::======================================================================================================================================== - -:k_uninstall - -cls -if not defined terminal mode 99, 28 -title Remove KMS38 Activation %masver% - -%nul% reg delete "HKLM\%specific_kms%" /f -%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f - -echo: -%nul% reg query "HKLM\%specific_kms%" && ( -call :dk_color %Red% "Failed to remove specific KMS Host." -call :dk_color %Blue% "%_fixmsg%" -) || ( -echo Successfully removed specific KMS Host. -) - -echo: -echo KMS38 activation doesn't modify any Windows components and doesn't install any new files. -echo: -call :dk_color %Gray% "If you want to reset the activation status," -call :dk_color %Blue% "%_fixmsg%" -echo: - -goto :dk_done - -::======================================================================================================================================== - -:: Set variables - -:dk_setvar - -set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe -set psc=%ps% -nop -c -set winbuild=1 -for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J" - -set _slexe=sppsvc.exe& set _slser=sppsvc -if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc) -if %winbuild% LSS 7600 if exist "%SysPath%\SLsvc.exe" (set _slexe=SLsvc.exe& set _slser=SLsvc) -if %_slexe%==SLsvc.exe set _vis=1 - -set _NCS=1 -if %winbuild% LSS 10586 set _NCS=0 -if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0) - -echo "%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%" | find /i "ARM64" %nul1% && (if %winbuild% LSS 21277 set ps32onArm=1) - -if %_NCS% EQU 1 ( -for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a" -set "Red="41;97m"" -set "Gray="100;97m"" -set "Green="42;97m"" -set "Blue="44;97m"" -set "White="107;91m"" -set "_Red="40;91m"" -set "_White="40;37m"" -set "_Green="40;92m"" -set "_Yellow="40;93m"" -) else ( -set "Red="Red" "white"" -set "Gray="Darkgray" "white"" -set "Green="DarkGreen" "white"" -set "Blue="Blue" "white"" -set "White="White" "Red"" -set "_Red="Black" "Red"" -set "_White="Black" "Gray"" -set "_Green="Black" "Green"" -set "_Yellow="Black" "Yellow"" -) - -set "nceline=echo: &echo ==== ERROR ==== &echo:" -set "eline=echo: &call :dk_color %Red% "==== ERROR ====" &echo:" -if %~z0 GEQ 200000 ( -set "_exitmsg=Go back" -set "_fixmsg=Go back to Main Menu, select Troubleshoot and run Fix Licensing option." -) else ( -set "_exitmsg=Exit" -set "_fixmsg=In MAS folder, run Troubleshoot script and select Fix Licensing option." -) -exit /b - -:: Show OS info - -:dk_showosinfo - -for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE') do set osarch=%%b - -for /f "tokens=6-7 delims=[]. " %%i in ('ver') do if not "%%j"=="" ( -set fullbuild=%%i.%%j -) else ( -for /f "tokens=3" %%G in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v UBR" %nul6%') do if not errorlevel 1 set /a "UBR=%%G" -for /f "skip=2 tokens=3,4 delims=. " %%G in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v BuildLabEx') do ( -if defined UBR (set "fullbuild=%%G.!UBR!") else (set "fullbuild=%%G.%%H") -) -) - -echo Checking OS Info [%winos% ^| %fullbuild% ^| %osarch%] -exit /b - -:: Check SKU value - -:dk_checksku - -call :dk_reflection - -set osSKU= -set slcSKU= -set wmiSKU= -set regSKU= -set winsub= - -if %winbuild% GEQ 14393 (set info=Kernel-BrandingInfo) else (set info=Kernel-ProductInfo) -set d1=%ref% [void]$TypeBuilder.DefinePInvokeMethod('SLGetWindowsInformationDWORD', 'slc.dll', 'Public, Static', 1, [int], @([String], [int].MakeByRefType()), 1, 3); -set d1=%d1% $Sku = 0; [void]$TypeBuilder.CreateType()::SLGetWindowsInformationDWORD('%info%', [ref]$Sku); $Sku -for /f "delims=" %%s in ('"%psc% %d1%"') do if not errorlevel 1 (set slcSKU=%%s) -set slcSKU=%slcSKU: =% -if "%slcSKU%"=="0" set slcSKU= -for /f "tokens=* delims=0123456789" %%a in ("%slcSKU%") do (if not "[%%a]"=="[]" set slcSKU=) - -for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions" /v OSProductPfn %nul6%') do set "regSKU=%%a" -if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" -if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a" - -if %winbuild% GEQ 15063 %psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';. ([scriptblock]::Create($f[1]))" %nul2% | find /i "Subscription_is_activated" %nul% && ( -if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" ( -set winsub=1 -set osSKU=%regSKU% -) -) - -if not defined osSKU set osSKU=%slcSKU% -if not defined osSKU set osSKU=%wmiSKU% -if not defined osSKU set osSKU=%regSKU% -exit /b - -:: Get Windows Subscription status - -:winsubstatus: -$DM = [AppDomain]::CurrentDomain.DefineDynamicAssembly(6, 1).DefineDynamicModule(4).DefineType(2) -[void]$DM.DefinePInvokeMethod('ClipGetSubscriptionStatus', 'Clipc.dll', 22, 1, [Int32], @([IntPtr].MakeByRefType()), 1, 3).SetImplementationFlags(128) -$m = [System.Runtime.InteropServices.Marshal] -$p = $m::AllocHGlobal(12) -$r = $DM.CreateType()::ClipGetSubscriptionStatus([ref]$p) -if ($r -eq 0) { - $enabled = $m::ReadInt32($p) - if ($enabled -ge 1) { - $state = $m::ReadInt32($p, 8) - if ($state -eq 1) { - "Subscription_is_activated." - } - } -} -:winsubstatus: - -:: Check KMS activation status - -:k_actinfo - -set xpr= -for /f "tokens=* delims=" %%# in ('%psc% "$([DateTime]::Now.addMinutes(%gpr%)).ToString('yyyy-MM-dd HH:mm:ss')" %nul6%') do set "xpr=%%#" -call :dk_color %Green% "%winos% is activated till !xpr!" -exit /b - -:: Check remaining KMS activation grace period - -:k_checkexp - -set gpr=0 -if %_wmic% EQU 1 for /f "tokens=2 delims==" %%# in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL AND LicenseDependsOn is NULL) get GracePeriodRemaining /VALUE" %nul6%') do set "gpr=%%#" -if %_wmic% EQU 0 for /f "tokens=2 delims==" %%# in ('%psc% "(([WMISEARCHER]'SELECT GracePeriodRemaining FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND Description like ''%%KMSCLIENT%%'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).GracePeriodRemaining | %% {echo ('GracePeriodRemaining='+$_)}" %nul6%') do set "gpr=%%#" -if %gpr% GTR 259200 (set _k38=1) else (set _k38=) -exit /b - -:: Get Windows permanent activation status - -:dk_checkperm - -if %_wmic% EQU 1 wmic path %spp% where (LicenseStatus='1' and GracePeriodRemaining='0' and PartialProductKey is not NULL AND LicenseDependsOn is NULL) get Name /value %nul2% | findstr /i "Windows" %nul1% && set _perm=1||set _perm= -if %_wmic% EQU 0 %psc% "(([WMISEARCHER]'SELECT Name FROM %spp% WHERE LicenseStatus=1 AND GracePeriodRemaining=0 AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).Name | %% {echo ('Name='+$_)}" %nul2% | findstr /i "Windows" %nul1% && set _perm=1||set _perm= -exit /b - -:: Refresh license status - -:dk_refresh - -if %_wmic% EQU 1 wmic path %sps% where __CLASS='%sps%' call RefreshLicenseStatus %nul% -if %_wmic% EQU 0 %psc% "$null=(([WMICLASS]'%sps%').GetInstances()).RefreshLicenseStatus()" %nul% -exit /b - -:: Install Key - -:dk_inskey - -if %_wmic% EQU 1 wmic path %sps% where __CLASS='%sps%' call InstallProductKey ProductKey="%key%" %nul% -if %_wmic% EQU 0 %psc% "try { $null=(([WMISEARCHER]'SELECT Version FROM %sps%').Get()).InstallProductKey('%key%'); exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul% -set keyerror=%errorlevel% -cmd /c exit /b %keyerror% -if %keyerror% NEQ 0 set "keyerror=[0x%=ExitCode%]" - -if defined generickey (set "keyecho=Installing Generic Product Key ") else (set "keyecho=Installing Product Key ") -if %keyerror% EQU 0 ( -if %sps%==SoftwareLicensingService call :dk_refresh -echo %keyecho% %~1 [Successful] -) else ( -call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" -if not defined showfix ( -if defined altapplist call :dk_color %Red% "Activation ID not found for this key." -echo: -call :dk_color %Blue% "%_fixmsg%" -echo: -set showfix=1 -) -set error=1 -) - -set generickey= -exit /b - -:: Get Windows installed key channel - -:k_channel - -set _gvlk= -if %_wmic% EQU 1 for /f "tokens=2 delims==" %%# in ('wmic path %spp% where "ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL and Description like '%%KMSCLIENT%%'" Get Name /value %nul6%') do (echo %%# findstr /i "Windows" %nul1% && set _gvlk=1) -if %_wmic% EQU 0 for /f "tokens=2 delims==" %%# in ('%psc% "(([WMISEARCHER]'SELECT Name FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL and Description like ''%%KMSCLIENT%%''').Get()).Name | %% {echo ('Name='+$_)}" %nul6%') do (echo %%# findstr /i "Windows" %nul1% && set _gvlk=1) -exit /b - -:: Get all products Activation IDs - -:dk_actids - -set allapps= -if %_wmic% EQU 1 set "chkapp=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='%1') get ID /VALUE" %nul6%')" -if %_wmic% EQU 0 set "chkapp=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT ID FROM %spp% WHERE ApplicationID=''%1''').Get()).ID ^| %% {echo ('ID='+$_)}" %nul6%')" -%chkapp% do (if defined allapps (call set "allapps=!allapps! %%a") else (call set "allapps=%%a")) -exit /b - -:: Get installed products Activation IDs - -:dk_actid - -set apps= -if %_wmic% EQU 1 set "chkapp=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='%1' and PartialProductKey is not null) get ID /VALUE" %nul6%')" -if %_wmic% EQU 0 set "chkapp=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT ID FROM %spp% WHERE ApplicationID=''%1'' AND PartialProductKey IS NOT NULL').Get()).ID ^| %% {echo ('ID='+$_)}" %nul6%')" -%chkapp% do (if defined apps (call set "apps=!apps! %%a") else (call set "apps=%%a")) -exit /b - -:: Trigger reevaluation, it helps in updating SPP tasks - -:dk_reeval - -if %winbuild% LSS 7600 exit /b - -:: This key is left by the system in rearm process and sppsvc sometimes fails to delete it, it causes issues in working of the Scheduled Tasks of SPP - -set "ruleskey=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedSystemState" -reg delete "%ruleskey%" /v "State" /f %nul% -reg delete "%ruleskey%" /v "SuppressRulesEngine" /f %nul% - -set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0); -set r2=%r1% [void]$TB.DefinePInvokeMethod('SLpTriggerServiceWorker', 'sppc.dll', 22, 1, [Int32], @([UInt32], [IntPtr], [String], [UInt32]), 1, 3); -set d1=%r2% [void]$TB.CreateType()::SLpTriggerServiceWorker(0, 0, 'reeval', 0) -%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; %d1%" -exit /b - -:: Install License files using Powershell/WMI instead of slmgr.vbs - -:xrm: -function InstallLicenseFile($Lsc) { - try { - $null = $sls.InstallLicense([IO.File]::ReadAllText($Lsc)) - } catch { - $host.SetShouldExit($_.Exception.HResult) - } -} -function InstallLicenseArr($Str) { - $a = $Str -split ';' - ForEach ($x in $a) {InstallLicenseFile "$x"} -} -function InstallLicenseDir($Loc) { - Get-ChildItem $Loc -Recurse -Filter *.xrm-ms | ForEach-Object {InstallLicenseFile $_.FullName} -} -function ReinstallLicenses() { - $Paths = @("$env:SysPath\oem", "$env:SysPath\licensing", "$env:SysPath\spp\tokens") - foreach ($Path in $Paths) { - if (Test-Path $Path) { InstallLicenseDir "$Path" } - } -} -:xrm: - -:: Check wmic.exe - -:dk_ckeckwmic - -if %winbuild% LSS 9200 (set _wmic=1&exit /b) -set _wmic=0 -for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" ( -cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" %nul2% | find /i "computersystem" %nul1% && set _wmic=1 -) -exit /b - -:: Show info for potential script stuck scenario - -:dk_sppissue - -sc start %_slser% %nul% -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: -%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host '%_slser% is not working correctly. Check this webpage for help - %mas%troubleshoot'}" -exit /b - -:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used) - -:dk_product - -set d1=%ref% $meth = $TypeBuilder.DefinePInvokeMethod('BrandingFormatString', 'winbrand.dll', 'Public, Static', 1, [String], @([String]), 1, 3); -set d1=%d1% $meth.SetImplementationFlags(128); $TypeBuilder.CreateType()::BrandingFormatString('%%WINDOWS_LONG%%') -replace [string][char]0xa9, '' -replace [string][char]0xae, '' -replace [string][char]0x2122, '' - -set winos= -for /f "delims=" %%s in ('"%psc% %d1%"') do if not errorlevel 1 (set winos=%%s) -echo "%winos%" | find /i "Windows" %nul1% || ( -for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName %nul6%') do set "winos=%%b" -if %winbuild% GEQ 22000 ( -set winos=!winos:Windows 10=Windows 11! -) -) - -if not defined winsub exit /b - -:: Check base edition product name if Windows subscription license is found - -for %%# in (pkeyhelper.dll) do @if "%%~$PATH:#"=="" exit /b -set d1=%ref% [void]$TypeBuilder.DefinePInvokeMethod('GetEditionNameFromId', 'pkeyhelper.dll', 'Public, Static', 1, [int], @([int], [IntPtr].MakeByRefType()), 1, 3); -set d1=%d1% $out = 0; [void]$TypeBuilder.CreateType()::GetEditionNameFromId(%regSKU%, [ref]$out);$s=[Runtime.InteropServices.Marshal]::PtrToStringUni($out); $s - -for /f %%a in ('%psc% "%d1%"') do if not errorlevel 1 ( -if %winbuild% GEQ 22000 ( -set winos=Windows 11 %%a -) else ( -set winos=Windows 10 %%a -) -) -exit /b - -:: Common lines used in PowerShell reflection code - -:dk_reflection - -set ref=$AssemblyBuilder = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1); -set ref=%ref% $ModuleBuilder = $AssemblyBuilder.DefineDynamicModule(2, $False); -set ref=%ref% $TypeBuilder = $ModuleBuilder.DefineType(0); -exit /b - -::======================================================================================================================================== - -:: Get Product Key from pkeyhelper.dll for future new editions -:: It works on Windows 10 1803 (17134) and later builds. - -:k_pkey - -call :dk_reflection - -set d1=%ref% [void]$TypeBuilder.DefinePInvokeMethod('SkuGetProductKeyForEdition', 'pkeyhelper.dll', 'Public, Static', 1, [int], @([int], [String], [String].MakeByRefType(), [String].MakeByRefType()), 1, 3); -set d1=%d1% $out = ''; [void]$TypeBuilder.CreateType()::SkuGetProductKeyForEdition(%1, %2, [ref]$out, [ref]$null); $out - -set pkey= -for /f %%a in ('%psc% "%d1%"') do if not errorlevel 1 (set pkey=%%a) -exit /b - -:: Get channel name for the key which was extracted from pkeyhelper.dll - -:k_pkeychannel - -set k=%1 -set m=[Runtime.InteropServices.Marshal] -set p=%SysPath%\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms - -set d1=%ref% [void]$TypeBuilder.DefinePInvokeMethod('PidGenX', 'pidgenx.dll', 'Public, Static', 1, [int], @([String], [String], [String], [int], [IntPtr], [IntPtr], [IntPtr]), 1, 3); -set d1=%d1% $r = [byte[]]::new(0x04F8); $r[0] = 0xF8; $r[1] = 0x04; $f = %m%::AllocHGlobal(0x04F8); %m%::Copy($r, 0, $f, 0x04F8); -set d1=%d1% [void]$TypeBuilder.CreateType()::PidGenX('%k%', '%p%', '00000', 0, 0, 0, $f); %m%::Copy($f, $r, 0, 0x04F8); %m%::FreeHGlobal($f); [Text.Encoding]::Unicode.GetString($r, 1016, 128) - -set pkeychannel= -for /f %%a in ('%psc% "%d1%"') do if not errorlevel 1 (set pkeychannel=%%a) -exit /b - -:k_gvlk - -for %%# in (pkeyhelper.dll) do @if "%%~$PATH:#"=="" exit /b -for %%# in (Volume:GVLK) do ( -call :k_pkey %osSKU% '%%#' -if defined pkey call :k_pkeychannel !pkey! -if /i "!pkeychannel!"=="%%#" ( -set key=!pkey! -exit /b -) -) -exit /b - -::======================================================================================================================================== - -:dk_chkmal - -:: Many users unknowingly download mal-ware by using activators found through Google search. -:: This code aims to notify users that their system has been affected by mal-ware. - -set w= -set results= -if exist "%ProgramFiles%\KM%w%Spico" set pupfound= KM%w%Spico -if not defined pupfound ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\taskcache\tasks" /f Path /s | find /i "AutoPico" %nul% && set pupfound= KM%w%Spico -) - -set hcount=0 -for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do ( -find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1) -if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]" - -sc start %_slser% %nul% -echo "%errorlevel%" | findstr "577 225" %nul% && ( -set "results=%results%[Likely File Infector]" -) || ( -if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%results%[Likely File Infector]") -) - -if not "%results%%pupfound%"=="" ( -if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" -if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." -if defined results (call :dk_color %Red% "%results%"&set showfix=1) -echo: -set fixes=%fixes% %mas%remove_mal%w%ware -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" -echo: -) - -:: Remove the scheduled task of R@1n-KMS (old version) that runs the activation command every minute, as it leads to high CPU usage. - -if exist %SysPath%\Tasks\R@1n-KMS ( -for /f %%A in ('dir /b /a:-d %SysPath%\Tasks\R@1n-KMS %nul6%') do (schtasks /delete /tn \R@1n-KMS\%%A /f %nul%) -) - -exit /b - -::======================================================================================================================================== - -:dk_errorcheck - -set showfix= -call :dk_chkmal - -::============================== - -:: Check Sandboxing - -sc query Null %nul% || ( -call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly]" -if not defined showfix ( -echo: -call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." -echo: -) -set error=1 -set showfix=1 -) - -::============================== - -:: Check WinPE mode - -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && ( - -call :dk_color %Red% "Checking WinPE [Found]" -if not defined showfix ( -echo: -call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." -echo: -) -set error=1 -set showfix=1 -) - -::============================== - -:: Check Safe mode - -if defined safeboot_option ( -call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" -if not defined showfix ( -echo: -call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." -echo: -) -set error=1 -set showfix=1 -) - -::============================== - -:: Check ImageState -:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states - -for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B) - -if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" ( -call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" -echo "%imagestate%" | find /i "RESEAL" %nul% && ( -if not defined showfix ( -echo: -call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode." -echo: -) -set error=1 -set showfix=1 -) -echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( -if not defined showfix ( -echo: -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade" -echo: -) -) -) - -::============================== - -:: Check corrupt services - -set serv_cor= -for %%# in (%_serv%) do ( -set _regcorr= -set _corrupt= -sc start %%# %nul% -if !errorlevel! EQU 1060 set _corrupt=1 -sc query %%# %nul% || set _corrupt=1 -for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr ( -reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError) -) - -if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!")) -) - -if defined serv_cor ( -call :dk_color %Red% "Checking Corrupt Services [%serv_cor%]" - -if not defined showfix ( -echo: -if /i "%serv_cor%"=="sppsvc-RegistryError" ( -set fixes=%fixes% %mas%fix_service -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service" -) else ( -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" -) -echo: -) - -set error=1 -set showfix=1 -) - -::============================== - -:: Check disabled services - -set serv_ste= -for %%# in (%_serv%) do ( -sc start %%# %nul% -if !errorlevel! EQU 1058 (if defined serv_ste (set "serv_ste=!serv_ste! %%#") else (set "serv_ste=%%#")) -) - -:: Change disabled services startup type to default - -set serv_csts= -set serv_cste= - -if defined serv_ste ( -for %%# in (%serv_ste%) do ( -if /i %%#==ClipSVC (reg add "HKLM\SYSTEM\CurrentControlSet\Services\%%#" /v "Start" /t REG_DWORD /d "3" /f %nul% & sc config %%# start= demand %nul%) -if /i %%#==wlidsvc sc config %%# start= demand %nul% -if /i %%#==sppsvc (reg add "HKLM\SYSTEM\CurrentControlSet\Services\%%#" /v "Start" /t REG_DWORD /d "2" /f %nul% & sc config %%# start= delayed-auto %nul%) -if /i %%#==SLsvc sc config %%# start= auto %nul% -if /i %%#==KeyIso sc config %%# start= demand %nul% -if /i %%#==LicenseManager sc config %%# start= demand %nul% -if /i %%#==Winmgmt sc config %%# start= auto %nul% -if !errorlevel!==0 ( -if defined serv_csts (set "serv_csts=!serv_csts! %%#") else (set "serv_csts=%%#") -) else ( -if defined serv_cste (set "serv_cste=!serv_cste! %%#") else (set "serv_cste=%%#") -) -) -) - -if defined serv_csts call :dk_color %Gray% "Enabling Disabled Services [Successful] [%serv_csts%]" - -if defined serv_cste ( -call :dk_color %Red% "Enabling Disabled Services [Failed] [%serv_cste%]" - -if not defined showfix ( -echo: -echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( -echo A registry fix has been applied to enable the disabled service. -echo: -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." -) || ( -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" -) -echo: -) - -set error=1 -set showfix=1 -) - -::============================== - -:: Check if the services are able to run or not -:: Workarounds are added to get correct status and error code because sc query doesn't output correct results in some conditions - -set serv_e= -for %%# in (%_serv%) do ( -set errorcode= -set checkerror= - -sc query %%# | find /i "RUNNING" %nul% || ( -%psc% "Start-Job { Start-Service %%# } | Wait-Job -Timeout 20 | Out-Null" -set errorcode=!errorlevel! -sc query %%# | find /i "RUNNING" %nul% || set checkerror=1 -) - -sc start %%# %nul% -if !errorlevel! NEQ 1056 if !errorlevel! NEQ 0 (set errorcode=!errorlevel!&set checkerror=1) -if defined checkerror if defined serv_e (set "serv_e=!serv_e!, %%#-!errorcode!") else (set "serv_e=%%#-!errorcode!") -) - -if defined serv_e ( -call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" - -if not defined showfix ( -set listwospp=%_serv:sppsvc=% -echo %serv_e% | findstr /i "!listwospp!" %nul% && ( -set showfix=1 -echo: -call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade" -echo: -) -) -set error=1 -) - -::============================== - -:: Check WMI - -set wmifailed= -if %_wmic% EQU 1 wmic path Win32_ComputerSystem get CreationClassName /value %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 %_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 ( -call :dk_color %Red% "Checking WMI [Not Working]" - -if not defined showfix ( -echo: -call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." -echo: -) -set error=1 -set showfix=1 -) - -::============================== - -:: Check SPP Registry Key - -if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( -call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]" -if not defined showfix ( -echo: -set fixes=%fixes% %mas%issues_due_to_gaming_spoofers -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" -echo: -) -set error=1 -set showfix=1 -) - -::============================== - -:: Check TokenStore registry key - -set tokenstore= -if %winbuild% GEQ 7600 ( -for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v TokenStore %nul6%') do call set "tokenstore=%%b" -if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform" - -if %winbuild% GEQ 9200 if /i not "!tokenstore!"=="%SysPath%\spp\store" if /i not "!tokenstore!"=="%SysPath%\spp\store\2.0" if /i not "!tokenstore!"=="%SysPath%\spp\store_test\2.0" ( -call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]" -if not defined showfix ( -echo: -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" -echo: -) -set toerr=1 -set error=1 -set showfix=1 -) -) - -::============================== - -:: This code creates token folder only if it's missing and sets default permission for it - -if %winbuild% GEQ 7600 if not defined toerr if not exist "%tokenstore%\" ( - -mkdir "%tokenstore%" %nul% - -if %winbuild% LSS 9200 set "d=$sddl = 'O:NSG:NSD:AI(A;OICIID;FA;;;SY)(A;OICIID;FA;;;BA)(A;OICIID;FA;;;NS)';" -if %winbuild% GEQ 9200 set "d=$sddl = 'O:BAG:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICIIO;GR;;;BU)(A;;FR;;;BU)(A;OICI;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)';" -set "d=!d! $AclObject = New-Object System.Security.AccessControl.DirectorySecurity;" -set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" -set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" -%psc% "!d!" %nul% - -if exist "%tokenstore%\" ( -call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]" -) else ( -call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" -if not defined showfix ( -echo: -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" -echo: -) -set error=1 -set showfix=1 -) -) - -::============================== - -:: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. - -set permerror= -if %winbuild% GEQ 9200 if not defined toerr if not defined ps32onArm if exist "%tokenstore%\" ( -for %%# in ( -"%tokenstore%+FullControl" -"HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" -"HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform+SetValue" -) do for /f "tokens=1,2 delims=+" %%A in (%%#) do if not defined permerror ( -%psc% "$acl = (Get-Acl '%%A' | fl | Out-String); if (-not ($acl -match 'NT SERVICE\\sppsvc Allow %%B') -or ($acl -match 'NT SERVICE\\sppsvc Deny')) {Exit 2}" %nul% -if !errorlevel!==2 ( -if "%%A"=="%tokenstore%" ( -set "permerror=Error Found In Token Folder" -) else ( -set "permerror=Error Found In SPP Registries" -) -) -) - -REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application - -if not defined permerror ( -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && ( -set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies" -reg query "!pol!" %nul% || reg add "!pol!" %nul% -%psc% "$netServ = (New-Object Security.Principal.SecurityIdentifier('S-1-5-20')).Translate([Security.Principal.NTAccount]).Value; $aclString = Get-Acl 'Registry::!pol!' | Format-List | Out-String; if (-not ($aclString.Contains($netServ + ' Allow FullControl') -or $aclString.Contains('NT SERVICE\sppsvc Allow FullControl')) -or ($aclString.Contains('Deny'))) {Exit 3}" %nul% -if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP" -) -) - -if defined permerror ( -call :dk_color %Red% "Checking SPP Permissions [!permerror!]" -if not defined showfix ( -echo: -call :dk_color %Blue% "%_fixmsg%" -echo: -) -set error=1 -set showfix=1 -) -) - -::============================== - -:: Check WPA Registry Errors - -set chkalp= -set wpainfo=NotFound -for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':wpatest\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set wpainfo=%%a) -for /f "delims=0123456789" %%i in ("%wpainfo%") do set chkalp=%%i - -if defined chkalp ( -call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" -if not defined showfix ( -echo "%wpainfo%" | find /i "Error Found" %nul% && ( -echo: -call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." -echo: -set error=1 -set showfix=1 -) -) -set wpainfo=a -) - -if not defined chkalp ( -if %wpainfo% GEQ 5000 ( -call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" -echo: -call :dk_color %Blue% "A large number of WPA registries have been found, which may cause high CPU usage." -call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option." -echo: -) else ( -echo Checking WPA Registry Count [%wpainfo%] -) -) - -::============================== - -:: Check Rearm - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( -call :dk_color %Red% "Checking Rearm [System is Rearmed]" -if not defined showfix ( -echo: -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." -echo: -) -set error=1 -set showfix=1 -) - - -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( -call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" -if not defined showfix ( -echo: -call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." -echo: -) -set error=1 -set showfix=1 -) - -::============================== - -:: Check SoftwareLicensingService - -if %error_code% NEQ 0 ( -call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" -if not defined showfix ( -echo: -call :dk_color %Blue% "%_fixmsg%" -call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." -echo: -) -set error=1 -set showfix=1 -) - -::============================== - -:: Check Activation IDs - -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f - -if not defined apps ( -%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul% -if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1 -call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f -) - -if not defined apps call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f - -if not defined apps if defined allapps if not defined notwinact ( -call :dk_color %Gray% "Checking Activation IDs [Key Not Installed or Act ID Not Found]" -) - -if not defined apps if not defined allapps ( -call :dk_color %Red% "Checking Activation IDs [Not found]" -if not defined showfix ( -echo: -call :dk_color %Blue% "%_fixmsg%" -call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." -echo: -) -set error=1 -set showfix=1 -) - -if not defined showfix if defined rlicfailed ( -echo: -call :dk_color %Blue% "%_fixmsg%" -call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." -echo: -) - -if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" ( -call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]" -) - -::============================== - -:: Check Eval Windows - -if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( -call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]" -if not defined showfix ( -echo: -call :dk_color %Blue% "License swapping is not the right way to upgrade to the full version. Learn the correct method at the link below." -set fixes=%fixes% %mas%evaluation_editions -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" -echo: -) -set error=1 -set showfix=1 -) -) - -::============================== - -:: Check HKU\S-1-5-20\Software registry, in some systems it's missing and that causes Windows activation problems - -reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( -call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" -if not defined showfix ( -echo: -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" -echo: -) -set error=1 -set showfix=1 -) - -::============================== - -:: Check license and package files for the current edition - -set osedition=0 -if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL) get LicenseFamily /VALUE" %nul6%')" -if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND LicenseDependsOn is NULL AND PartialProductKey IS NOT NULL').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')" -%chkedi% do if not errorlevel 1 (call set "osedition=%%a") - -if %osedition%==0 for /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul6%') do set "osedition=%%a" - -:: Workaround for an issue in builds between 1607 and 1709 where ProfessionalEducation is shown as Professional - -if not %osedition%==0 ( -if "%osSKU%"=="164" set osedition=ProfessionalEducation -if "%osSKU%"=="165" set osedition=ProfessionalEducationN -) - -if not defined notwinact ( -if %osedition%==0 ( -call :dk_color %Red% "Checking Edition Name [Not Found In Registry]" -) else ( -if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" ( -set skunotfound=1 -call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]" -) -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( -if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( -call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" -) -) -) -) - -::============================== - -:: Check SKU value to find if there is any difference - -if not defined notwinact ( -if %winbuild% GEQ 10240 ( -%nul% set /a "sum=%slcSKU%+%regSKU%+%wmiSKU%" -set /a "sum/=3" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI/REG SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU% Reg:%regSKU%]" -) -) else ( -%nul% set /a "sum=%slcSKU%+%wmiSKU%" -set /a "sum/=2" -if not "!sum!"=="%slcSKU%" ( -call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found - SLC:%slcSKU% WMI:%wmiSKU%]" -) -) -) - -::============================== - -:: 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" ( -echo Checking Eval WLMS Service [Found] -) - -::============================== - -:: Check SPP interference in IFEO - -for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) -) -if defined _sppint ( -echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" -if not defined showfix ( -echo: -call :dk_color %Blue% "%_fixmsg%" -echo: -) -set showfix=1 -) || ( -echo Checking SPP In IFEO [%_sppint%] -) -) - -::============================== - -:: Check and fix SkipRearm registry value - -if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 ( -reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul% -call :dk_color %Gray% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]" -%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null" -) - -::============================== - -:: Check SvcRestartTask status, this task helps in making sure system remains activated - -if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" ( -%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || ( -for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a) - -echo !taskinfo! | find /i "Ready" %nul% || ( -reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% -reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -if "!taskinfo!"=="" set "taskinfo=Not Found" - -call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" -if not defined showfix ( -echo: -echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( -set fixes=%fixes% %mas%in-place_repair_upgrade -call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade" -) || ( -call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." -) -echo: -) -) -) -) - -::============================== - -exit /b - -:: This code checks for invalid registry keys in HKLM\SYSTEM\WPA. This issue may appear even on healthy systems - -:wpatest: -$wpaKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $env:COMPUTERNAME).OpenSubKey("SYSTEM\\WPA") -$count = 0 -foreach ($subkeyName in $wpaKey.GetSubKeyNames()) { - if ($subkeyName -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') { - $count++ - } -} -$osVersion = [System.Environment]::OSVersion.Version -$minBuildNumber = 14393 -if ($osVersion.Build -ge $minBuildNumber) { - $subkeyHashTable = @{} - foreach ($subkeyName in $wpaKey.GetSubKeyNames()) { - if ($subkeyName -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') { - $keyNumber = $subkeyName -replace '.*-', '' - $subkeyHashTable[$keyNumber] = $true - } - } - for ($i=1; $i -le $count; $i++) { - if (-not $subkeyHashTable.ContainsKey("$i")) { - Write-Output "Total Keys $count. Error Found - $i key does not exist." - $wpaKey.Close() - exit - } - } -} -$wpaKey.GetSubKeyNames() | ForEach-Object { - if ($_ -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') { - if ($PSVersionTable.PSVersion.Major -lt 3) { - cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1" - if ($LASTEXITCODE -ne 0) { - Write-Host "Total Keys $count. Error Found - Binary Data is corrupt." - $wpaKey.Close() - exit - } - } else { - $subkey = $wpaKey.OpenSubKey($_) - $p = $subkey.GetValueNames() - if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) { - Write-Host "Total Keys $count. Error Found - Binary Data is corrupt." - $wpaKey.Close() - exit - } - } - } -} -$count -$wpaKey.Close() -:wpatest: - -::======================================================================================================================================== - -:dk_color - -if %_NCS% EQU 1 ( -echo %esc%[%~1%~2%esc%[0m -) else if exist %ps% ( -%psc% write-host -back '%1' -fore '%2' '%3' -) else if not exist %ps% ( -echo %~3 -) -exit /b - -:dk_color2 - -if %_NCS% EQU 1 ( -echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m -) else if exist %ps% ( -%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6' -) else if not exist %ps% ( -echo %~3 %~6 -) -exit /b - -::======================================================================================================================================== - -:dk_done - -echo: -if %_unattended%==1 timeout /t 2 & exit /b - -if defined fixes ( -call :dk_color %White% "Follow ALL the ABOVE blue lines. " -call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore" -choice /C:10 /N -if !errorlevel!==2 exit /b -if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#)) -) - -if defined terminal ( -call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..." -choice /c 0 /n -) else ( -call :dk_color %_Yellow% "Press any key to %_exitmsg%..." -pause %nul1% -) - -exit /b - -::======================================================================================================================================== - -:: 1st column = Activation ID -:: 2nd column = GVLK (Generic volume licensing key) -:: 3rd column = SKU ID -:: 4th column = WMI Edition ID (For reference only) -:: 5th column = Build Branch name incase same Edition ID is used in different OS versions with different key (For reference only) -:: Separator = "_" - -:kms38data - -set f= -for %%# in ( -:: Windows 10/11 -73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43___4_Enterprise -e272e3e2-732f-4c65-a8f0-484747d0d947_DPH2V-TTNVB-4X9Q3-TJR4H-KH%f%JW4__27_EnterpriseN -2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX__48_Professional -a80b5abf-76ad-428b-b05d-a47d2dffeebf_MH37W-N47XK-V7XM9-C7227-GC%f%QG9__49_ProfessionalN -7b9e1751-a8da-4f75-9560-5fadfe3d8e38_3KHY7-WNT83-DGQKR-F7HPR-84%f%4BM__98_CoreN -a9107544-f4a0-4053-a96a-1479abdef912_PVMJN-6DFY6-9CCP6-7BKTT-D3%f%WVR__99_CoreCountrySpecific -cd918a57-a41b-4c82-8dce-1a538e221a83_7HNRX-D7KGG-3K4RQ-4WPJ4-YT%f%DFH_100_CoreSingleLanguage -58e97c99-f377-4ef1-81d5-4ad5522b5fd8_TX9XD-98N7V-6WMQ6-BX7FG-H8%f%Q99_101_Core -e0c42288-980c-4788-a014-c080d2e1926e_NW6C2-QMPVW-D7KKK-3GKT6-VC%f%FB2_121_Education -3c102355-d027-42c6-ad23-2e7ef8a02585_2WH4N-8QGBV-H22JP-CT43Q-MD%f%WWJ_122_EducationN -32d2fab3-e4a8-42c2-923b-4bf4fd13e6ee_M7XTQ-FN8P6-TTKYV-9D4CC-J4%f%62D_125_EnterpriseS_RS5,VB,Ge -2d5a5a60-3040-48bf-beb0-fcd770c20ce0_DCPHK-NFMTC-H88MJ-PFHPY-QJ%f%4BJ_125_EnterpriseS_RS1 -7b51a46c-0c04-4e8f-9af4-8496cca90d5e_WNMTR-4C88C-JK8YV-HQ7T2-76%f%DF9_125_EnterpriseS_TH1 -7103a333-b8c8-49cc-93ce-d37c09687f92_92NFX-8DJQP-P6BBQ-THF9C-7C%f%G2H_126_EnterpriseSN_RS5,VB,Ge -9f776d83-7156-45b2-8a5c-359b9c9f22a3_QFFDN-GRT3P-VKWWX-X7T3R-8B%f%639_126_EnterpriseSN_RS1 -87b838b7-41b6-4590-8318-5797951d8529_2F77B-TNFGY-69QQF-B8YKP-D6%f%9TJ_126_EnterpriseSN_TH1 -82bbc092-bc50-4e16-8e18-b74fc486aec3_NRG8B-VKK3Q-CXVCJ-9G2XF-6Q%f%84J_161_ProfessionalWorkstation -4b1571d3-bafb-4b40-8087-a961be2caf65_9FNHH-K3HBT-3W4TD-6383H-6X%f%YWF_162_ProfessionalWorkstationN -3f1afc82-f8ac-4f6c-8005-1d233e606eee_6TP4R-GNPTD-KYYHQ-7B7DP-J4%f%47Y_164_ProfessionalEducation -5300b18c-2e33-4dc2-8291-47ffcec746dd_YVWGF-BXNMC-HTQYQ-CPQ99-66%f%QFC_165_ProfessionalEducationN -e0b2d383-d112-413f-8a80-97f373a5820c_YYVX9-NTFWV-6MDM3-9PT4T-4M%f%68B_171_EnterpriseG -e38454fb-41a4-4f59-a5dc-25080e354730_44RPN-FTY23-9VTTB-MP9BX-T8%f%4FV_172_EnterpriseGN -ec868e65-fadf-4759-b23e-93fe37f2cc29_CPWHC-NT2C7-VYW78-DHDB2-PG%f%3GK_175_ServerRdsh_RS5 -e4db50ea-bda1-4566-b047-0ca50abc6f07_7NBT4-WGBQX-MP4H7-QXFF8-YP%f%3KX_175_ServerRdsh_RS3 -0df4f814-3f57-4b8b-9a9d-fddadcd69fac_NBTWJ-3DR69-3C4V8-C26MC-GQ%f%9M6_183_CloudE -59eb965c-9150-42b7-a0ec-22151b9897c5_KBN8V-HFGQ4-MGXVD-347P6-PD%f%QGT_191_IoTEnterpriseS_VB,NI -d30136fc-cb4b-416e-a23d-87207abc44a9_6XN7V-PCBDC-BDBRH-8DQY7-G6%f%R44_202_CloudEditionN -ca7df2e3-5ea0-47b8-9ac1-b1be4d8edd69_37D7F-N49CB-WQR8W-TBJ73-FM%f%8RX_203_CloudEdition -:: Windows 2016/19/22/25 LTSC/SAC -7dc26449-db21-4e09-ba37-28f2958506a6_TVRH6-WHNXV-R9WG3-9XRFY-MY%f%832___7_ServerStandard_Ge -9bd77860-9b31-4b7b-96ad-2564017315bf_VDYBN-27WPP-V4HQT-9VMD4-VM%f%K7H___7_ServerStandard_FE -de32eafd-aaee-4662-9444-c1befb41bde2_N69G4-B89J2-4G8F4-WWYCC-J4%f%64C___7_ServerStandard_RS5 -8c1c5410-9f39-4805-8c9d-63a07706358f_WC2BQ-8NRM3-FDDYY-2BFGV-KH%f%KQY___7_ServerStandard_RS1 -c052f164-cdf6-409a-a0cb-853ba0f0f55a_D764K-2NDRG-47T6Q-P8T8W-YP%f%6DF___8_ServerDatacenter_Ge -ef6cfc9f-8c5d-44ac-9aad-de6a2ea0ae03_WX4NM-KYWYW-QJJR4-XV3QB-6V%f%M33___8_ServerDatacenter_FE -34e1ae55-27f8-4950-8877-7a03be5fb181_WMDGN-G9PQG-XVVXX-R3X43-63%f%DFG___8_ServerDatacenter_RS5 -21c56779-b449-4d20-adfc-eece0e1ad74b_CB7KF-BWN84-R7R2Y-793K2-8X%f%DDG___8_ServerDatacenter_RS1 -034d3cbb-5d4b-4245-b3f8-f84571314078_WVDHN-86M7X-466P6-VHXV7-YY%f%726__50_ServerSolution_RS5 -2b5a1b0f-a5ab-4c54-ac2f-a6d94824a283_JCKRF-N37P4-C2D82-9YXRT-4M%f%63B__50_ServerSolution_RS1 -7b4433f4-b1e7-4788-895a-c45378d38253_QN4C6-GBJD2-FB422-GHWJK-GJ%f%G2R_110_ServerCloudStorage -8de8eb62-bbe0-40ac-ac17-f75595071ea3_GRFBW-QNDC4-6QBHG-CCK3B-2P%f%R88_120_ServerARM64_RS5 -43d9af6e-5e86-4be8-a797-d072a046896c_K9FYF-G6NCK-73M32-XMVPY-F9%f%DRR_120_ServerARM64_RS4 -39e69c41-42b4-4a0a-abad-8e3c10a797cc_QFND9-D3Y9C-J3KKY-6RPVP-2D%f%PYV_145_ServerDatacenterACor_FE -90c362e5-0da1-4bfd-b53b-b87d309ade43_6NMRW-2C8FM-D24W7-TQWMY-CW%f%H2D_145_ServerDatacenterACor_RS5 -e49c08e7-da82-42f8-bde2-b570fbcae76c_2HXDN-KRXHB-GPYC7-YCKFJ-7F%f%VDG_145_ServerDatacenterACor_RS3 -f5e9429c-f50b-4b98-b15c-ef92eb5cff39_67KN8-4FYJW-2487Q-MQ2J7-4C%f%4RG_146_ServerStandardACor_FE -73e3957c-fc0c-400d-9184-5f7b6f2eb409_N2KJX-J94YW-TQVFB-DG9YT-72%f%4CC_146_ServerStandardACor_RS5 -61c5ef22-f14f-4553-a824-c4b31e84b100_PTXN8-JFHJM-4WC78-MPCBR-9W%f%4KR_146_ServerStandardACor_RS3 -45b5aff2-60a0-42f2-bc4b-ec6e5f7b527e_FCNV3-279Q9-BQB46-FTKXX-9H%f%PRH_168_ServerAzureCor_Ge -8c8f0ad3-9a43-4e05-b840-93b8d1475cbc_6N379-GGTMK-23C6M-XVVTC-CK%f%FRQ_168_ServerAzureCor_FE -a99cc1f0-7719-4306-9645-294102fbff95_FDNH6-VW9RW-BXPJ7-4XTYG-23%f%9TB_168_ServerAzureCor_RS5 -3dbf341b-5f6c-4fa7-b936-699dce9e263f_VP34G-4NPPG-79JTQ-864T4-R3%f%MQX_168_ServerAzureCor_RS1 -c2e946d1-cfa2-4523-8c87-30bc696ee584_XGN3F-F394H-FD2MY-PP6FD-8M%f%CRC_407_ServerTurbine_Ge -19b5e0fb-4431-46bc-bac1-2f1873e4ae73_NTBV8-9K7Q8-V27C6-M2BTV-KH%f%MXV_407_ServerTurbine_RS5 -) do ( -for /f "tokens=1-5 delims=_" %%A in ("%%#") do if %osSKU%==%%C ( -if %1==key if not defined key echo "!allapps!" | find /i "%%A" %nul1% && set key=%%B -) -) -exit /b - -::======================================================================================================================================== - -:sign: -$ErrorActionPreference = "Stop" - -function SignProperties { - param ( - $Properties, - $rsa - ) - - $sha256 = [Security.Cryptography.SHA256]::Create() - $bytes = [Text.Encoding]::UTF8.GetBytes($Properties) - $hash = $sha256.ComputeHash($bytes) - - $signature = $rsa.SignHash($hash, [Security.Cryptography.HashAlgorithmName]::SHA256, [Security.Cryptography.RSASignaturePadding]::Pkcs1) - return [Convert]::ToBase64String($signature) - -} - -[byte[]] $key = 0x07,0x02,0x00,0x00,0x00,0xA4,0x00,0x00,0x52,0x53,0x41,0x32,0x00,0x04,0x00,0x00, - 0x01,0x00,0x01,0x00,0x29,0x87,0xBA,0x3F,0x52,0x90,0x57,0xD8,0x12,0x26,0x6B,0x38, - 0xB2,0x3B,0xF9,0x67,0x08,0x4F,0xDD,0x8B,0xF5,0xE3,0x11,0xB8,0x61,0x3A,0x33,0x42, - 0x51,0x65,0x05,0x86,0x1E,0x00,0x41,0xDE,0xC5,0xDD,0x44,0x60,0x56,0x3D,0x14,0x39, - 0xB7,0x43,0x65,0xE9,0xF7,0x2B,0xA5,0xF0,0xA3,0x65,0x68,0xE9,0xE4,0x8B,0x5C,0x03, - 0x2D,0x36,0xFE,0x28,0x4C,0xD1,0x3C,0x3D,0xC1,0x90,0x75,0xF9,0x6E,0x02,0xE0,0x58, - 0x97,0x6A,0xCA,0x80,0x02,0x42,0x3F,0x6C,0x15,0x85,0x4D,0x83,0x23,0x6A,0x95,0x9E, - 0x38,0x52,0x59,0x38,0x6A,0x99,0xF0,0xB5,0xCD,0x53,0x7E,0x08,0x7C,0xB5,0x51,0xD3, - 0x8F,0xA3,0x0D,0xA0,0xFA,0x8D,0x87,0x3C,0xFC,0x59,0x21,0xD8,0x2E,0xD9,0x97,0x8B, - 0x40,0x60,0xB1,0xD7,0x2B,0x0A,0x6E,0x60,0xB5,0x50,0xCC,0x3C,0xB1,0x57,0xE4,0xB7, - 0xDC,0x5A,0x4D,0xE1,0x5C,0xE0,0x94,0x4C,0x5E,0x28,0xFF,0xFA,0x80,0x6A,0x13,0x53, - 0x52,0xDB,0xF3,0x04,0x92,0x43,0x38,0xB9,0x1B,0xD9,0x85,0x54,0x7B,0x14,0xC7,0x89, - 0x16,0x8A,0x4B,0x82,0xA1,0x08,0x02,0x99,0x23,0x48,0xDD,0x75,0x9C,0xC8,0xC1,0xCE, - 0xB0,0xD7,0x1B,0xD8,0xFB,0x2D,0xA7,0x2E,0x47,0xA7,0x18,0x4B,0xF6,0x29,0x69,0x44, - 0x30,0x33,0xBA,0xA7,0x1F,0xCE,0x96,0x9E,0x40,0xE1,0x43,0xF0,0xE0,0x0D,0x0A,0x32, - 0xB4,0xEE,0xA1,0xC3,0x5E,0x9B,0xC7,0x7F,0xF5,0x9D,0xD8,0xF2,0x0F,0xD9,0x8F,0xAD, - 0x75,0x0A,0x00,0xD5,0x25,0x43,0xF7,0xAE,0x51,0x7F,0xB7,0xDE,0xB7,0xAD,0xFB,0xCE, - 0x83,0xE1,0x81,0xFF,0xDD,0xA2,0x77,0xFE,0xEB,0x27,0x1F,0x10,0xFA,0x82,0x37,0xF4, - 0x7E,0xCC,0xE2,0xA1,0x58,0xC8,0xAF,0x1D,0x1A,0x81,0x31,0x6E,0xF4,0x8B,0x63,0x34, - 0xF3,0x05,0x0F,0xE1,0xCC,0x15,0xDC,0xA4,0x28,0x7A,0x9E,0xEB,0x62,0xD8,0xD8,0x8C, - 0x85,0xD7,0x07,0x87,0x90,0x2F,0xF7,0x1C,0x56,0x85,0x2F,0xEF,0x32,0x37,0x07,0xAB, - 0xB0,0xE6,0xB5,0x02,0x19,0x35,0xAF,0xDB,0xD4,0xA2,0x9C,0x36,0x80,0xC6,0xDC,0x82, - 0x08,0xE0,0xC0,0x5F,0x3C,0x59,0xAA,0x4E,0x26,0x03,0x29,0xB3,0x62,0x58,0x41,0x59, - 0x3A,0x37,0x43,0x35,0xE3,0x9F,0x34,0xE2,0xA1,0x04,0x97,0x12,0x9D,0x8C,0xAD,0xF7, - 0xFB,0x8C,0xA1,0xA2,0xE9,0xE4,0xEF,0xD9,0xC5,0xE5,0xDF,0x0E,0xBF,0x4A,0xE0,0x7A, - 0x1E,0x10,0x50,0x58,0x63,0x51,0xE1,0xD4,0xFE,0x57,0xB0,0x9E,0xD7,0xDA,0x8C,0xED, - 0x7D,0x82,0xAC,0x2F,0x25,0x58,0x0A,0x58,0xE6,0xA4,0xF4,0x57,0x4B,0xA4,0x1B,0x65, - 0xB9,0x4A,0x87,0x46,0xEB,0x8C,0x0F,0x9A,0x48,0x90,0xF9,0x9F,0x76,0x69,0x03,0x72, - 0x77,0xEC,0xC1,0x42,0x4C,0x87,0xDB,0x0B,0x3C,0xD4,0x74,0xEF,0xE5,0x34,0xE0,0x32, - 0x45,0xB0,0xF8,0xAB,0xD5,0x26,0x21,0xD7,0xD2,0x98,0x54,0x8F,0x64,0x88,0x20,0x2B, - 0x14,0xE3,0x82,0xD5,0x2A,0x4B,0x8F,0x4E,0x35,0x20,0x82,0x7E,0x1B,0xFE,0xFA,0x2C, - 0x79,0x6C,0x6E,0x66,0x94,0xBB,0x0A,0xEB,0xBA,0xD9,0x70,0x61,0xE9,0x47,0xB5,0x82, - 0xFC,0x18,0x3C,0x66,0x3A,0x09,0x2E,0x1F,0x61,0x74,0xCA,0xCB,0xF6,0x7A,0x52,0x37, - 0x1D,0xAC,0x8D,0x63,0x69,0x84,0x8E,0xC7,0x70,0x59,0xDD,0x2D,0x91,0x1E,0xF7,0xB1, - 0x56,0xED,0x7A,0x06,0x9D,0x5B,0x33,0x15,0xDD,0x31,0xD0,0xE6,0x16,0x07,0x9B,0xA5, - 0x94,0x06,0x7D,0xC1,0xE9,0xD6,0xC8,0xAF,0xB4,0x1E,0x2D,0x88,0x06,0xA7,0x63,0xB8, - 0xCF,0xC8,0xA2,0x6E,0x84,0xB3,0x8D,0xE5,0x47,0xE6,0x13,0x63,0x8E,0xD1,0x7F,0xD4, - 0x81,0x44,0x38,0xBF - -$rsa = New-Object Security.Cryptography.RSACryptoServiceProvider -$rsa.ImportCspBlob($key) -$SessionId = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($env:SessionIdStr + [char]0)) -$PropertiesStr = "OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=$SessionId;TimeStampClient=2022-10-11T12:00:00Z" -$SignatureStr = SignProperties $PropertiesStr $rsa - -$xml = @" -1.0$PropertiesStr$SignatureStr -"@ -[System.IO.File]::WriteAllText("$env:ProgramData\Microsoft\Windows\ClipSVC\GenuineTicket\GenuineTicket", ($xml -join ""), [System.Text.Encoding]::ASCII) -:sign: - -::======================================================================================================================================== - -:: Below code is used to get alternate edition name and key if current edition doesn't support KMS38 activation - -:: 1st column = Current SKU ID -:: 2nd column = Current Edition Name -:: 3rd column = Current Edition Activation ID -:: 4th column = Alternate Edition Activation ID -:: 5th column = Alternate Edition GVLK -:: 6th column = Alternate Edition Name -:: Separator = _ - - -:kms38fallback - -set notfoundaltactID= -if %_NoEditionChange%==1 exit /b - -for %%# in ( -188_IoTEnterprise__________________8ab9bdd1-1f67-4997-82d9-8878520837d9_73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43_Enterprise -206_IoTEnterpriseK_________________80083eae-7031-4394-9e88-4901973d56fe_73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43_Enterprise -191_IoTEnterpriseS-2021____________ed655016-a9e8-4434-95d9-4345352c2552_32d2fab3-e4a8-42c2-923b-4bf4fd13e6ee_M7XTQ-FN8P6-TTKYV-9D4CC-J4%f%62D_EnterpriseS-2021 -205_IoTEnterpriseSK________________d4f9b41f-205c-405e-8e08-3d16e88e02be_59eb965c-9150-42b7-a0ec-22151b9897c5_KBN8V-HFGQ4-MGXVD-347P6-PD%f%QGT_IoTEnterpriseS -138_ProfessionalSingleLanguage_____a48938aa-62fa-4966-9d44-9f04da3f72f2_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional -139_ProfessionalCountrySpecific____f7af7d09-40e4-419c-a49b-eae366689ebd_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional -139_ProfessionalCountrySpecific-Zn_01eb852c-424d-4060-94b8-c10d799d7364_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional -) do ( -for /f "tokens=1-6 delims=_" %%A in ("%%#") do if %osSKU%==%%A ( -echo "!allapps!" | find /i "%%C" %nul1% && ( -echo "!allapps!" | find /i "%%D" %nul1% && ( -set altkey=%%E -set altedition=%%F -) || ( -set altedition=%%F -set notfoundaltactID=1 -) -) -) -) -exit /b - -::======================================================================================================================================== -:: Leave empty line below diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 2be8ae5..ba039cb 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -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) @@ -4226,7 +4226,7 @@ exit /b :: Separator = _ -:kms38fallback +:kmsfallback set notfoundaltactID= if %_NoEditionChange%==1 exit /b diff --git a/MAS/Separate-Files-Version/Activators/_ReadMe.txt b/MAS/Separate-Files-Version/Activators/_ReadMe.txt index 058a628..9832bc8 100644 --- a/MAS/Separate-Files-Version/Activators/_ReadMe.txt +++ b/MAS/Separate-Files-Version/Activators/_ReadMe.txt @@ -5,7 +5,6 @@ Activation Type Supported Product Activation Period HWID - Windows 10-11 - Permanent Ohook - 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 -------------------------------------------------------------------------------------- diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index e831122..0b3bd39 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -406,7 +406,6 @@ goto done2 ) 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 Ohook_Activation_AIO.cmd=Activators\Ohook_Activation_AIO.cmd set TSforge_Activation.cmd=Activators\TSforge_Activation.cmd @@ -415,7 +414,6 @@ pushd "!_work!" set _nofile= for %%# in ( %HWID_Activation.cmd% -%KMS38_Activation.cmd% %Online_KMS_Activation.cmd% %Ohook_Activation_AIO.cmd% %TSforge_Activation.cmd% @@ -449,28 +447,26 @@ echo: echo: [1] HWID [Windows] echo: [2] Ohook [Office] echo: [3] TSforge [Windows / ESU / Office] -echo: [4] KMS38 [Windows] -echo: [5] Online KMS [Windows / Office] +echo: [4] Online KMS [Windows / Office] echo: -echo: [6] HWID [Windows] ^+ Ohook [Office] -echo: [7] HWID [Windows] ^+ Ohook [Office] ^+ TSforge [ESU] -echo: [8] TSforge [Windows] ^+ Online KMS [Office] +echo: [5] HWID [Windows] ^+ Ohook [Office] +echo: [6] HWID [Windows] ^+ Ohook [Office] ^+ TSforge [ESU] +echo: [7] TSforge [Windows] ^+ Online KMS [Office] echo: call :dk_color2 %_White% " [R] " %_Green% "ReadMe" echo: [0] Exit echo: ____________________________________________________________ echo: call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard :" -choice /C:12345678R0 /N +choice /C:1234567R0 /N set _erl=%errorlevel% -if %_erl%==10 exit /b -if %_erl%==9 start %mas%oem-folder &goto :Menu -if %_erl%==8 goto:tsforge_kms -if %_erl%==7 goto:hwid_ohook_tsforge -if %_erl%==6 goto:hwid_ohook -if %_erl%==5 goto:kms -if %_erl%==4 goto:kms38 +if %_erl%==9 exit /b +if %_erl%==8 start %mas%oem-folder &goto :Menu +if %_erl%==7 goto:tsforge_kms +if %_erl%==6 goto:hwid_ohook_tsforge +if %_erl%==5 goto:hwid_ohook +if %_erl%==4 goto:kms if %_erl%==3 goto:tsforge if %_erl%==2 goto:ohook 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 cls @@ -760,11 +726,6 @@ echo ______________________________________________________________ echo: call :dk_color %Blue% "%oem%" 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 ______________________________________________________________ :done2 From 117ccae4ed6bc0fb4c7b16359ad793747eace85e Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 7 Nov 2025 19:06:09 +0530 Subject: [PATCH 093/117] Change one combination for OEM folder --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 17 +++++----- .../Extract_OEM_Folder.cmd | 34 +++++++++---------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 0689192..94517c9 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -453,6 +453,7 @@ if %winbuild% GEQ 10240 if %winbuild% LEQ 19045 if not defined _serexist if not call :dk_color2 %_Green% " Tip:" %_White% " To activate ESU updates after W10 EOL, use TSforge option." ) echo: +echo: echo: ______________________________________________________________ echo: echo: Activation Methods: @@ -573,14 +574,14 @@ echo: echo: Extract $OEM$ folder on the desktop echo: ____________________________________________________________ echo: -echo: [1] HWID [Windows] -echo: [2] Ohook [Office] -echo: [3] TSforge [Windows / ESU / Office] -echo: [4] Online KMS [Windows / Office] +echo: [1] HWID [Windows] +echo: [2] Ohook [Office] +echo: [3] TSforge [Windows / ESU / Office] +echo: [4] Online KMS [Windows / Office] echo: -echo: [5] HWID [Windows] ^+ Ohook [Office] -echo: [6] HWID [Windows] ^+ Ohook [Office] ^+ TSforge [ESU] -echo: [7] TSforge [Windows] ^+ Online KMS [Office] +echo: [5] HWID [Windows] ^+ Ohook [Office] +echo: [6] HWID [Windows] ^+ Ohook [Office] ^+ TSforge [ESU] +echo: [7] TSforge [Windows / ESU] ^+ Ohook [Office] echo: call :dk_color2 %_White% " [R] " %_Green% "ReadMe" echo: [0] Go Back @@ -592,7 +593,7 @@ set _erl=%errorlevel% if %_erl%==9 goto:Extras if %_erl%==8 start %mas%oem-folder &goto:Extract$OEM$2 -if %_erl%==7 (set "_oem=TSforge [Windows] + Online KMS [Office]" & set "para=/Z-Windows /K-Office" &goto:Extract$OEM$3) +if %_erl%==7 (set "_oem=TSforge [Windows / ESU] + Ohook [Office]" & set "para=/Z-Windows /Z-ESU /Ohook" &goto:Extract$OEM$3) if %_erl%==6 (set "_oem=HWID [Windows] + Ohook [Office] + TSforge [ESU]" & set "para=/HWID /Ohook /Z-ESU" &goto:Extract$OEM$3) if %_erl%==5 (set "_oem=HWID [Windows] + Ohook [Office]" & set "para=/HWID /Ohook" &goto:Extract$OEM$3) if %_erl%==4 (set "_oem=Online KMS" & set "para=/K-WindowsOffice" &goto:Extract$OEM$3) diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 0b3bd39..1ad1085 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -444,14 +444,14 @@ echo: echo: Extract $OEM$ folder on the desktop echo: ____________________________________________________________ echo: -echo: [1] HWID [Windows] -echo: [2] Ohook [Office] -echo: [3] TSforge [Windows / ESU / Office] -echo: [4] Online KMS [Windows / Office] +echo: [1] HWID [Windows] +echo: [2] Ohook [Office] +echo: [3] TSforge [Windows / ESU / Office] +echo: [4] Online KMS [Windows / Office] echo: -echo: [5] HWID [Windows] ^+ Ohook [Office] -echo: [6] HWID [Windows] ^+ Ohook [Office] ^+ TSforge [ESU] -echo: [7] TSforge [Windows] ^+ Online KMS [Office] +echo: [5] HWID [Windows] ^+ Ohook [Office] +echo: [6] HWID [Windows] ^+ Ohook [Office] ^+ TSforge [ESU] +echo: [7] TSforge [Windows / ESU] ^+ Ohook [Office] echo: call :dk_color2 %_White% " [R] " %_Green% "ReadMe" echo: [0] Exit @@ -463,7 +463,7 @@ set _erl=%errorlevel% if %_erl%==9 exit /b if %_erl%==8 start %mas%oem-folder &goto :Menu -if %_erl%==7 goto:tsforge_kms +if %_erl%==7 goto:tsforge_ohook if %_erl%==6 goto:hwid_ohook_tsforge if %_erl%==5 goto:hwid_ohook if %_erl%==4 goto:kms @@ -676,41 +676,41 @@ cd \ ::======================================================================================================================================== -:tsforge_kms +:tsforge_ohook cls md "!desktop!\$OEM$\$$\Setup\Scripts" pushd "!_work!" 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 -call :export tsforge_kms_setup +call :export tsforge_ohook_setup set _error= 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 defined _error goto errorfound -set oem=TSforge [Windows] + Online KMS [Office] +set oem=TSforge [Windows / ESU] + Ohook [Office] goto done -:tsforge_kms_setup: +:tsforge_ohook_setup: @echo off fltmc >nul || exit /b setlocal -call "%~dp0TSforge_Activation.cmd" /Z-Windows +call "%~dp0TSforge_Activation.cmd" /Z-Windows /Z-ESU endlocal setlocal -call "%~dp0Online_KMS_Activation.cmd" /K-Office +call "%~dp0Ohook_Activation_AIO.cmd" /Ohook endlocal cd \ (goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0") -:tsforge_kms_setup: +:tsforge_ohook_setup: ::======================================================================================================================================== From 77c4bacde6a6c6370a02ebd4638a81ecbd5f32fb Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 7 Nov 2025 19:37:01 +0530 Subject: [PATCH 094/117] Fix an issue in filtering where ESU IDs are not showing in manual option --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 ++-- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 94517c9..604f1b3 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -5809,14 +5809,14 @@ $filteredResults = $results | Where-Object { $true } else { - $_.Name -notlike "*CountrySpecific*" + $_.Name -like "*ESU*" -or $_.Name -notlike "*CountrySpecific*" } } | Where-Object { if ($env:tsedition -like "*CloudEdition*") { $true } else { - $_.Name -notlike "*CloudEdition*" + $_.Name -like "*ESU*" -or $_.Name -notlike "*CloudEdition*" } } | Where-Object { $_.Name -like "*CountrySpecific*" -or (IsMuiNotLocked $_.ID) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index a2e8111..12cddfc 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1872,14 +1872,14 @@ $filteredResults = $results | Where-Object { $true } else { - $_.Name -notlike "*CountrySpecific*" + $_.Name -like "*ESU*" -or $_.Name -notlike "*CountrySpecific*" } } | Where-Object { if ($env:tsedition -like "*CloudEdition*") { $true } else { - $_.Name -notlike "*CloudEdition*" + $_.Name -like "*ESU*" -or $_.Name -notlike "*CloudEdition*" } } | Where-Object { $_.Name -like "*CountrySpecific*" -or (IsMuiNotLocked $_.ID) From 0aee35e673469c90eceb9dd30ea2677a8b304522 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 8 Nov 2025 03:30:26 +0530 Subject: [PATCH 095/117] Add HWID support for WNC edition --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 1 + MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 1 + 2 files changed, 2 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 604f1b3..4069d1d 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -2345,6 +2345,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 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 +1bc2140b-285b-4351-b99c-26a126104b29_TMP2N-KGFHJ-PWM6F-68KCQ-3P%f%JBP_210_X23-60513_0_____Retail_WNC ) do ( for /f "tokens=1-9 delims=_" %%A in ("%%#") do ( diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 0bada26..3326546 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -2038,6 +2038,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 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 +1bc2140b-285b-4351-b99c-26a126104b29_TMP2N-KGFHJ-PWM6F-68KCQ-3P%f%JBP_210_X23-60513_0_____Retail_WNC ) do ( for /f "tokens=1-9 delims=_" %%A in ("%%#") do ( From 1e444671be3b0a53681737b00b09c454894f6999 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 9 Nov 2025 06:03:18 +0530 Subject: [PATCH 096/117] Fix KMS4k activation info on 26100.7019 and later --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 8 ++++++-- .../Activators/TSforge_Activation.cmd | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 4069d1d..6aaca53 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -5891,7 +5891,7 @@ if %_actman%==0 (if not defined showfix call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) else ( -if /i %tsmethod%==KMS4k if %winbuild% GEQ 26200 ( +if /i %tsmethod%==KMS4k if %winbuild% GEQ 26100 ( echo: 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." @@ -11275,6 +11275,7 @@ namespace LibTSforge.PhysicalStore $ErrorActionPreference = 'Stop' $binPath = "$env:_work\BIN\LibTSforge.dll" $psMajorVer = (Get-Host).Version.Major +$build = [System.Environment]::OSVersion.Version.Build if (Test-Path -LiteralPath $binPath) { Write-Host "LibTSforge.dll found in BIN folder. Loading the DLL..." @@ -11373,7 +11374,7 @@ if (-not $env:resetstuff) { } if ($env:tsmethod -eq "KMS4k") { $GracePeriodStatus = Get-WmiInfo -tsactid $tsactid -property "GracePeriodRemaining" - if ($GracePeriodStatus -gt 259200) { $activated = 1 } + if ((($build -ge 26100 -and $GracePeriodStatus -ge 259200) -or ($build -lt 26100 -and $GracePeriodStatus -gt 259200))) { $activated = 1 } } else { $licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus" @@ -11388,6 +11389,9 @@ if (-not $env:resetstuff) { else { if ($env:tsmethod -eq "KMS4k") { Write-Host "[$prodName] is activated till $([DateTime]::Now.AddMinutes($GracePeriodStatus).ToString('yyyy-MM-dd HH:mm:ss')) with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen + if ($build -ge 26100) { + Write-Host "From build 26100.7019, Windows shows 180-day max, but activation lasts over 4,000 years, so it always stays at 180." -ForegroundColor White -BackgroundColor Darkgray + } } else { Write-Host "[$prodName] is permanently activated with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 12cddfc..8e6d534 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1953,7 +1953,7 @@ if %_actman%==0 (if not defined showfix call :dk_color %Blue% "%_fixmsg%") set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" ) else ( -if /i %tsmethod%==KMS4k if %winbuild% GEQ 26200 ( +if /i %tsmethod%==KMS4k if %winbuild% GEQ 26100 ( echo: 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." @@ -8848,6 +8848,7 @@ namespace LibTSforge.PhysicalStore $ErrorActionPreference = 'Stop' $binPath = "$env:_work\BIN\LibTSforge.dll" $psMajorVer = (Get-Host).Version.Major +$build = [System.Environment]::OSVersion.Version.Build if (Test-Path -LiteralPath $binPath) { Write-Host "LibTSforge.dll found in BIN folder. Loading the DLL..." @@ -8946,7 +8947,7 @@ if (-not $env:resetstuff) { } if ($env:tsmethod -eq "KMS4k") { $GracePeriodStatus = Get-WmiInfo -tsactid $tsactid -property "GracePeriodRemaining" - if ($GracePeriodStatus -gt 259200) { $activated = 1 } + if ((($build -ge 26100 -and $GracePeriodStatus -ge 259200) -or ($build -lt 26100 -and $GracePeriodStatus -gt 259200))) { $activated = 1 } } else { $licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus" @@ -8961,6 +8962,9 @@ if (-not $env:resetstuff) { else { if ($env:tsmethod -eq "KMS4k") { Write-Host "[$prodName] is activated till $([DateTime]::Now.AddMinutes($GracePeriodStatus).ToString('yyyy-MM-dd HH:mm:ss')) with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen + if ($build -ge 26100) { + Write-Host "From build 26100.7019, Windows shows 180-day max, but activation lasts over 4,000 years, so it always stays at 180." -ForegroundColor White -BackgroundColor Darkgray + } } else { Write-Host "[$prodName] is permanently activated with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen From 4bf82f576c143ed89151c03219b667d1e13e99b8 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 9 Nov 2025 16:54:55 +0530 Subject: [PATCH 097/117] Improve KMS4k activation info --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 14 +++++++++++--- .../Activators/TSforge_Activation.cmd | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 6aaca53..ced64c8 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -11374,7 +11374,12 @@ if (-not $env:resetstuff) { } if ($env:tsmethod -eq "KMS4k") { $GracePeriodStatus = Get-WmiInfo -tsactid $tsactid -property "GracePeriodRemaining" - if ((($build -ge 26100 -and $GracePeriodStatus -ge 259200) -or ($build -lt 26100 -and $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 { $licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus" @@ -11388,9 +11393,12 @@ if (-not $env:resetstuff) { } else { if ($env:tsmethod -eq "KMS4k") { - Write-Host "[$prodName] is activated till $([DateTime]::Now.AddMinutes($GracePeriodStatus).ToString('yyyy-MM-dd HH:mm:ss')) with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen if ($build -ge 26100) { - Write-Host "From build 26100.7019, Windows shows 180-day max, but activation lasts over 4,000 years, so it always stays at 180." -ForegroundColor White -BackgroundColor Darkgray + 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 } } else { diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 8e6d534..fc5f28d 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -8947,7 +8947,12 @@ if (-not $env:resetstuff) { } if ($env:tsmethod -eq "KMS4k") { $GracePeriodStatus = Get-WmiInfo -tsactid $tsactid -property "GracePeriodRemaining" - if ((($build -ge 26100 -and $GracePeriodStatus -ge 259200) -or ($build -lt 26100 -and $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 { $licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus" @@ -8961,9 +8966,12 @@ if (-not $env:resetstuff) { } else { if ($env:tsmethod -eq "KMS4k") { - Write-Host "[$prodName] is activated till $([DateTime]::Now.AddMinutes($GracePeriodStatus).ToString('yyyy-MM-dd HH:mm:ss')) with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen if ($build -ge 26100) { - Write-Host "From build 26100.7019, Windows shows 180-day max, but activation lasts over 4,000 years, so it always stays at 180." -ForegroundColor White -BackgroundColor Darkgray + 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 } } else { From 0a35a0026606222a76380fc255efb592449529da Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 11 Nov 2025 02:25:55 +0530 Subject: [PATCH 098/117] Change key preference order in Change Windows edition script. Thanks to Magic. --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index ced64c8..67a513b 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -17396,7 +17396,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% if defined targetSKU call :ced_windowskey diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index a38ac4e..76eb714 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -604,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% if defined targetSKU call :ced_windowskey From 82f7cfe5f4615b929710696cc815bb0e46fcb0e5 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 11 Nov 2025 04:15:09 +0530 Subject: [PATCH 099/117] Auto select Quick repair option for Office 16.0 C2R. Thanks to Yerong for the suggestion. --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 37 ++++++++++++--------- MAS/Separate-Files-Version/Troubleshoot.cmd | 37 ++++++++++++--------- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 67a513b..e733ad1 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -16584,8 +16584,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 ( @@ -16627,13 +16627,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..." @@ -16660,16 +16658,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 @@ -16689,6 +16687,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" 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" From 979dfb750bb5589bb7a257f082969ca59a7fad19 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 11 Nov 2025 14:46:32 +0530 Subject: [PATCH 100/117] Update as per abbodi1406's CAS No KMS Client info when ADBA is shown --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 21 +++++++++++-------- .../Check_Activation_Status.cmd | 21 +++++++++++-------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index e733ad1..e061840 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -14965,6 +14965,7 @@ function DetectSubscription { function DetectAdbaClient { $propADBA | foreach { set $_ (SlGetInfoSku $licID $_) } + DetectActType CONOUT "`nAD Activation client information:" CONOUT " Object Name: $ADActivationObjectName" CONOUT " Domain Name: $ADActivationObjectDN" @@ -15055,17 +15056,18 @@ function DetectKmsHost if ($null -NE $KeyManagementServiceNotificationRequests) {CONOUT " Notification: $KeyManagementServiceNotificationRequests"} } +function DetectActType +{ + $VLType = strGetRegistry ($SPKeyPath + '\' + $strApp + '\' + $licID) "VLActivationType" + if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp) "VLActivationType"} + if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath) "VLActivationType"} + if ($null -EQ $VLType -Or $VLType -GT 3) {$VLType = 0} + if ($null -NE $VLType) {CONOUT "Configured Activation Type: $($VLActTypes[$VLType])"} +} + function DetectKmsClient { - if ($win8) - { - $VLType = strGetRegistry ($SPKeyPath + '\' + $strApp + '\' + $licID) "VLActivationType" - if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp) "VLActivationType"} - if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath) "VLActivationType"} - if ($null -EQ $VLType -Or $VLType -GT 3) {$VLType = 0} - } - if ($null -NE $VLType) {CONOUT "Configured Activation Type: $($VLActTypes[$VLType])"} - + if ($win8) {DetectActType} CONOUT "`r" if ($LicenseStatus -NE 1) { CONOUT "Please activate the product in order to update KMS client information values." @@ -15313,6 +15315,7 @@ function GetResult($strSLP, $strApp, $entry) if ($win8 -And $VLActivationType -EQ 1) { DetectAdbaClient + $cKmsClient = $null } if ($winID -And $null -NE $cAvmClient) { diff --git a/MAS/Separate-Files-Version/Check_Activation_Status.cmd b/MAS/Separate-Files-Version/Check_Activation_Status.cmd index 83f64cc..a7959ef 100644 --- a/MAS/Separate-Files-Version/Check_Activation_Status.cmd +++ b/MAS/Separate-Files-Version/Check_Activation_Status.cmd @@ -518,6 +518,7 @@ function DetectSubscription { function DetectAdbaClient { $propADBA | foreach { set $_ (SlGetInfoSku $licID $_) } + DetectActType CONOUT "`nAD Activation client information:" CONOUT " Object Name: $ADActivationObjectName" CONOUT " Domain Name: $ADActivationObjectDN" @@ -608,17 +609,18 @@ function DetectKmsHost if ($null -NE $KeyManagementServiceNotificationRequests) {CONOUT " Notification: $KeyManagementServiceNotificationRequests"} } +function DetectActType +{ + $VLType = strGetRegistry ($SPKeyPath + '\' + $strApp + '\' + $licID) "VLActivationType" + if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp) "VLActivationType"} + if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath) "VLActivationType"} + if ($null -EQ $VLType -Or $VLType -GT 3) {$VLType = 0} + if ($null -NE $VLType) {CONOUT "Configured Activation Type: $($VLActTypes[$VLType])"} +} + function DetectKmsClient { - if ($win8) - { - $VLType = strGetRegistry ($SPKeyPath + '\' + $strApp + '\' + $licID) "VLActivationType" - if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp) "VLActivationType"} - if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath) "VLActivationType"} - if ($null -EQ $VLType -Or $VLType -GT 3) {$VLType = 0} - } - if ($null -NE $VLType) {CONOUT "Configured Activation Type: $($VLActTypes[$VLType])"} - + if ($win8) {DetectActType} CONOUT "`r" if ($LicenseStatus -NE 1) { 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) { DetectAdbaClient + $cKmsClient = $null } if ($winID -And $null -NE $cAvmClient) { From f4e08dac3de82f797e7b9ff6d70174b54a758aee Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 11 Nov 2025 15:27:47 +0530 Subject: [PATCH 101/117] Update WLMS service check --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 4 +++- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 4 +++- .../Activators/Ohook_Activation_AIO.cmd | 4 +++- .../Activators/Online_KMS_Activation.cmd | 4 +++- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index e061840..3c95faf 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -2127,7 +2127,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] ) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 3326546..cbb92c0 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1820,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. -if exist "%SysPath%\wlms\wlms.exe" ( +sc query wlms %nul% + +if %errorlevel% NEQ 1060 ( echo Checking Eval WLMS Service [Found] ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index ae3ae34..f5c3952 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -2506,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. -if exist "%SysPath%\wlms\wlms.exe" ( +sc query wlms %nul% + +if %errorlevel% NEQ 1060 ( echo Checking Eval WLMS Service [Found] ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index ba039cb..9242be8 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -3569,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] ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index fc5f28d..cb10b11 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -3579,7 +3579,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] ) From 55cc6d95d10446808a36c58547cd597f5c2bc98b Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 11 Nov 2025 16:58:07 +0530 Subject: [PATCH 102/117] 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(-) 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% From 1ee7cd1e60d52e10c20a470d0e967c128f216807 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 11 Nov 2025 21:11:51 +0530 Subject: [PATCH 103/117] Improve wording --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 16 +++++++++------- .../Activators/Ohook_Activation_AIO.cmd | 8 ++++---- .../Activators/Online_KMS_Activation.cmd | 8 ++++---- .../Activators/TSforge_Activation.cmd | 16 +++++++++------- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 5154bf2..554f3a6 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -3618,10 +3618,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: ) @@ -5899,16 +5899,18 @@ 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." ) 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% && ( -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% && ( -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 defined esuexistsup echo Help: %mas%tsforge#windows-esu + if %_actwin%==1 for %%# in (407) do if %osSKU%==%%# ( call :dk_color %Red% "%winos% does not support activation on non-azure platforms." ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index f5c3952..af33be3 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1513,10 +1513,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: ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 9242be8..c7b7e9a 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -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: ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index cb10b11..cbb19ed 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1959,16 +1959,18 @@ 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." ) 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% && ( -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% && ( -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 defined esuexistsup echo Help: %mas%tsforge#windows-esu + if %_actwin%==1 for %%# in (407) do if %osSKU%==%%# ( call :dk_color %Red% "%winos% does not support activation on non-azure platforms." ) @@ -2454,10 +2456,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: ) From d16661cc8711d05d4b62c42944de4a954680cc98 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 11 Nov 2025 21:25:04 +0530 Subject: [PATCH 104/117] Suggest inplace repair upgrade when system files are missing --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 20 +++++++++---------- .../Activators/HWID_Activation.cmd | 4 ++-- .../Activators/Ohook_Activation_AIO.cmd | 4 ++-- .../Activators/Online_KMS_Activation.cmd | 4 ++-- .../Activators/TSforge_Activation.cmd | 4 ++-- .../Change_Windows_Edition.cmd | 4 ++-- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 554f3a6..b42ea7b 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -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% "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 ) @@ -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% "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 ) @@ -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% "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 ) @@ -12219,8 +12219,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 ) @@ -17238,8 +17238,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% "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 ) ) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index cbb92c0..1cdcb5e 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -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% "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 ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index af33be3..0260838 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -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% "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 ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index c7b7e9a..0242d4c 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -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 ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index cbb19ed..e3ebf46 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -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% "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 ) diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 76eb714..f2f6833 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -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% "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 ) ) From eeae1dd93114775c3c7300b40472624066d257cb Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 11 Nov 2025 22:08:51 +0530 Subject: [PATCH 105/117] Add command to refresh ESU status --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 1 + MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 1 + 2 files changed, 2 insertions(+) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index b42ea7b..52d09e4 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -5906,6 +5906,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) ) ) diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index e3ebf46..7fbd7c8 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1966,6 +1966,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) ) ) From 4958ddf4744881b5b211a5b9ccd960018cca8710 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 12 Nov 2025 04:31:44 +0530 Subject: [PATCH 106/117] 3.8 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 3 ++- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- .../Activators/Ohook_Activation_AIO.cmd | 2 +- .../Activators/Online_KMS_Activation.cmd | 2 +- .../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(-) 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) From 27f21a13d5d484db4469c52cc69d7fa8a1728d7c Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 12 Nov 2025 04:38:07 +0530 Subject: [PATCH 107/117] export-ignore --- .gitattributes | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index 4d21483..de5bd3d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -# MAS export-ignore -# LICENSE export-ignore -# README.md export-ignore -# .gitattributes export-ignore +MAS export-ignore +LICENSE export-ignore +README.md export-ignore +.gitattributes export-ignore From 7327f3b4458985d2faa2a827657d7463ef74a8bf Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 12 Nov 2025 05:01:10 +0530 Subject: [PATCH 108/117] Revert export-ignore --- .gitattributes | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index de5bd3d..4d21483 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -MAS export-ignore -LICENSE export-ignore -README.md export-ignore -.gitattributes export-ignore +# MAS export-ignore +# LICENSE export-ignore +# README.md export-ignore +# .gitattributes export-ignore From e7e73a8fbce6f3da2e37248c2c3ba587984617f1 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 18 Nov 2025 12:44:37 +0530 Subject: [PATCH 109/117] Use Client-ESU license instead of Client-IoT-ESU (it has bugs) for IoTEnterprise edition --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 8 ++------ .../Activators/TSforge_Activation.cmd | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index db84bb8..8664e69 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -5056,7 +5056,7 @@ set w10EsuEditions=Education-EducationN-Enterprise-EnterpriseN-Professional-Prof set minbuild=0 if /i %tsedition%==ServerRdsh set minbuild=5552 -for %%# in (Core CoreN CoreCountrySpecific CoreSingleLanguage) do (if /i %tsedition%==%%# set minbuild=6156) +for %%# in (Core CoreN CoreCountrySpecific CoreSingleLanguage IoTEnterprise) do (if /i %tsedition%==%%# set minbuild=6156) if /i %tsedition%==PPIPro set minbuild=6388 set /a UBR=0 @@ -5085,10 +5085,6 @@ f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-%w10EsuEditions%-%w10EsuE 1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% 83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% 0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% -b8527af1-5389-447c-9a88-2d1691ea33d3_Client-IoT-ESU-Year1_-IoTEnterprise- -7b76ee02-0a75-4f08-85d5-bd0feadad0c0_Client-IoT-ESU-Year2_-IoTEnterprise- -4dac5a0c-5709-4595-a32c-14a56a4a6b31_Client-IoT-ESU-Year3_-IoTEnterprise- -f69e2d51-3bbd-4ddf-8da7-a145e9dca597_Client-IoT-ESU-Year6[4-6y]_-IoTEnterprise- ) do ( for /f "tokens=1-3 delims=_" %%A in ("%%#") do ( echo "%allapps%" | find /i "%%A" %nul1% && ( @@ -5904,7 +5900,7 @@ call :dk_color %Gray% "Windows Update gets 1-3 years of ESU; 4-6 are unofficial 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 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 "83d49986-add3-41d7-ba33-87c7bfb5c0fb 0b533b5e-08b6-44f9-b885-c2de291ba456" %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/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index c46137d..e0e7e5b 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1116,7 +1116,7 @@ set w10EsuEditions=Education-EducationN-Enterprise-EnterpriseN-Professional-Prof set minbuild=0 if /i %tsedition%==ServerRdsh set minbuild=5552 -for %%# in (Core CoreN CoreCountrySpecific CoreSingleLanguage) do (if /i %tsedition%==%%# set minbuild=6156) +for %%# in (Core CoreN CoreCountrySpecific CoreSingleLanguage IoTEnterprise) do (if /i %tsedition%==%%# set minbuild=6156) if /i %tsedition%==PPIPro set minbuild=6388 set /a UBR=0 @@ -1145,10 +1145,6 @@ f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-%w10EsuEditions%-%w10EsuE 1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% 83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% 0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% -b8527af1-5389-447c-9a88-2d1691ea33d3_Client-IoT-ESU-Year1_-IoTEnterprise- -7b76ee02-0a75-4f08-85d5-bd0feadad0c0_Client-IoT-ESU-Year2_-IoTEnterprise- -4dac5a0c-5709-4595-a32c-14a56a4a6b31_Client-IoT-ESU-Year3_-IoTEnterprise- -f69e2d51-3bbd-4ddf-8da7-a145e9dca597_Client-IoT-ESU-Year6[4-6y]_-IoTEnterprise- ) do ( for /f "tokens=1-3 delims=_" %%A in ("%%#") do ( echo "%allapps%" | find /i "%%A" %nul1% && ( @@ -1964,7 +1960,7 @@ call :dk_color %Gray% "Windows Update gets 1-3 years of ESU; 4-6 are unofficial 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 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 "83d49986-add3-41d7-ba33-87c7bfb5c0fb 0b533b5e-08b6-44f9-b885-c2de291ba456" %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%) From 41783f7a23ce9557f3ad07166b8f9e1c534d0223 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 18 Nov 2025 13:20:39 +0530 Subject: [PATCH 110/117] Evade AV detections --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 18 +++++++++--------- .../Activators/HWID_Activation.cmd | 2 +- .../Activators/Ohook_Activation_AIO.cmd | 8 ++++---- .../Activators/Online_KMS_Activation.cmd | 6 +++--- .../Activators/TSforge_Activation.cmd | 4 ++-- .../Change_Office_Edition.cmd | 2 +- .../Change_Windows_Edition.cmd | 2 +- .../Extract_OEM_Folder.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 8664e69..ed4938d 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1,18 +1,18 @@ -@::r45f3r3-random +@::sfh437frandom @set masver=3.8 @setlocal DisableDelayedExpansion @echo off -:: For command line switches, check mass()grave(dot)dev/command_line_switches +:: For command line switches, check mass{}grave{dot}dev/command_line_switches :: If you want to better understand script, read from separate files version. ::============================================================================ :: -:: Homepage: mass()grave(dot)dev +:: Homepage: mass{}grave{dot}dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -2833,7 +2833,7 @@ call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Of ::======================================================================================================================================== -:: mass()grave(dot)dev/office-license-is-not-genuine +:: mass{}grave{dot}dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear :: Script already is using MAK instead of GVLK so it won't appear anyway, but registry keys are added incase Office installs default GVLK grace key for volume products @@ -4158,13 +4158,13 @@ $MemoryStream.Close() :: :: The files are encoded in base64 to make AIO version. :: -:: mass()grave(dot)dev/ohook +:: mass{}grave{dot}dev/ohook :: Here you can find the files source code and info on how to rebuild the identical sppc.dll files :: :: stackoverflow.com/a/35335273 :: Here you can check how to extract sppc.dll files from base64 :: -:: For any further question, feel free to contact us on mass()grave(dot)dev/contactus +:: For any further question, feel free to contact us on mass{}grave{dot}dev/contactus :: ::======================================================================================================================================== :: @@ -5410,7 +5410,7 @@ call :ts_process ::======================================================================================================================================== -:: mass()grave(dot)dev/office-license-is-not-genuine +:: mass{}grave{dot}dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" @@ -12712,7 +12712,7 @@ if %winbuild% GEQ 9200 ( for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath /reg:32" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" if defined _C16R ( -REM mass()grave(dot)dev/office-license-is-not-genuine +REM mass{}grave{dot}dev/office-license-is-not-genuine set _server=10.0.0.10 call :_taskregserv echo Keeping the non-existent IP address 10.0.0.10 as %KS% Server. @@ -13057,7 +13057,7 @@ exit /b ::============================================================================ :: -:: Homepage: mass()grave(dot)dev +:: Homepage: mass{}grave{dot}dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 6354862..aa959d7 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass()grave(dot)dev +:: Homepage: mass{}grave{dot}dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 255258d..8c8f0fd 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass()grave(dot)dev +:: Homepage: mass{}grave{dot}dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -728,7 +728,7 @@ call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Of ::======================================================================================================================================== -:: mass()grave(dot)dev/office-license-is-not-genuine +:: mass{}grave{dot}dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear :: Script already is using MAK instead of GVLK so it won't appear anyway, but registry keys are added incase Office installs default GVLK grace key for volume products @@ -3241,13 +3241,13 @@ $MemoryStream.Close() :: :: The files are encoded in base64 to make AIO version. :: -:: mass()grave(dot)dev/ohook +:: mass{}grave{dot}dev/ohook :: Here you can find the files source code and info on how to rebuild the identical sppc.dll files :: :: stackoverflow.com/a/35335273 :: Here you can check how to extract sppc.dll files from base64 :: -:: For any further question, feel free to contact us on mass()grave(dot)dev/contactus +:: For any further question, feel free to contact us on mass{}grave{dot}dev/contactus :: ::======================================================================================================================================== :: diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 4ee3cbf..3da7adb 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass()grave(dot)dev +:: Homepage: mass{}grave{dot}dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -1031,7 +1031,7 @@ if %winbuild% GEQ 9200 ( for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath /reg:32" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" if defined _C16R ( -REM mass()grave(dot)dev/office-license-is-not-genuine +REM mass{}grave{dot}dev/office-license-is-not-genuine set _server=10.0.0.10 call :_taskregserv echo Keeping the non-existent IP address 10.0.0.10 as %KS% Server. @@ -1727,7 +1727,7 @@ exit /b ::============================================================================ :: -:: Homepage: mass()grave(dot)dev +:: Homepage: mass{}grave{dot}dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index e0e7e5b..c43257b 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass()grave(dot)dev +:: Homepage: mass{}grave{dot}dev :: Email: mas.help@outlook.com :: ::============================================================================ @@ -1470,7 +1470,7 @@ call :ts_process ::======================================================================================================================================== -:: mass()grave(dot)dev/office-license-is-not-genuine +:: mass{}grave{dot}dev/office-license-is-not-genuine :: Add registry keys for volume products so that 'non-genuine' banner won't appear set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 49e0358..0c5cd17 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass()grave(dot)dev +:: Homepage: mass{}grave{dot}dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index e04a347..b727b71 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass()grave(dot)dev +:: Homepage: mass{}grave{dot}dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 0f87172..9284342 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass()grave(dot)dev +:: Homepage: mass{}grave{dot}dev :: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index b67b0a2..eb874e6 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -5,7 +5,7 @@ ::============================================================================ :: -:: Homepage: mass()grave(dot)dev +:: Homepage: mass{}grave{dot}dev :: Email: mas.help@outlook.com :: ::============================================================================ From 3c7178aaf6838431535134e5daad094bf05e0e90 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 18 Nov 2025 13:53:38 +0530 Subject: [PATCH 111/117] Remove the deprecated Semi-Annual Preview channel in change update channel option --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 27 +++++++++---------- .../Change_Office_Edition.cmd | 27 +++++++++---------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index ed4938d..661cd46 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -18799,20 +18799,19 @@ call :dk_color %Gray% "Installed Office editions: %_oIds%" echo: for %%# in ( -"5440fd1f-7ecb-4221-8110-145efaa6372f_Insider Fast [Beta] - Insiders::DevMain -" -"64256afe-f5d9-4f86-8936-8840a6a4f5be_Monthly Preview - Insiders::CC -" -"492350f6-3a01-4f97-b9c0-c7c6ddf67d60_Monthly [Current] - Production::CC -" -"55336b82-a18d-4dd6-b5f6-9e5095c314a6_Monthly Enterprise - Production::MEC -" -"b8f9b850-328d-4355-9145-c59439a0c4cf_Semi Annual Preview - Insiders::FRDC -" -"7ffbc6bf-bc32-4f92-8982-f9dd17fd3114_Semi Annual - Production::DC -" -"ea4a4090-de26-49d7-93c1-91bff9e53fc3_DevMain Channel - Dogfood::DevMain -" -"b61285dd-d9f7-41f2-9757-8f61cba4e9c8_Microsoft Elite - Microsoft::DevMain -" -"f2e724c1-748f-4b47-8fb8-8e0d210e9208_Perpetual2019 VL - Production::LTSC -" -"1d2d2ea6-1680-4c56-ac58-a441c8c24ff9_Microsoft2019 VL - Microsoft::LTSC -" -"5030841d-c919-4594-8d2d-84ae4f96e58e_Perpetual2021 VL - Production::LTSC2021 -" -"86752282-5841-4120-ac80-db03ae6b5fdb_Microsoft2021 VL - Microsoft::LTSC2021 -" -"7983bac0-e531-40cf-be00-fd24fe66619c_Perpetual2024 VL - Production::LTSC2024 -" -"c02d8fe6-5242-4da8-972f-82ee55e00671_Microsoft2024 VL - Microsoft::LTSC2024 -" +"5440fd1f-7ecb-4221-8110-145efaa6372f_Beta / Insider Fast - Insiders::DevMain -" +"64256afe-f5d9-4f86-8936-8840a6a4f5be_Current / Monthly Preview - Insiders::CC -" +"492350f6-3a01-4f97-b9c0-c7c6ddf67d60_Current / Monthly - Production::CC -" +"55336b82-a18d-4dd6-b5f6-9e5095c314a6_Monthly Enterprise - Production::MEC -" +"7ffbc6bf-bc32-4f92-8982-f9dd17fd3114_Semi Annual Enterprise - Production::DC -" +"ea4a4090-de26-49d7-93c1-91bff9e53fc3_DevMain Channel - Dogfood::DevMain -" +"b61285dd-d9f7-41f2-9757-8f61cba4e9c8_Microsoft Elite - Microsoft::DevMain -" +"f2e724c1-748f-4b47-8fb8-8e0d210e9208_Perpetual2019 VL - Production::LTSC -" +"1d2d2ea6-1680-4c56-ac58-a441c8c24ff9_Microsoft2019 VL - Microsoft::LTSC -" +"5030841d-c919-4594-8d2d-84ae4f96e58e_Perpetual2021 VL - Production::LTSC2021 -" +"86752282-5841-4120-ac80-db03ae6b5fdb_Microsoft2021 VL - Microsoft::LTSC2021 -" +"7983bac0-e531-40cf-be00-fd24fe66619c_Perpetual2024 VL - Production::LTSC2024 -" +"c02d8fe6-5242-4da8-972f-82ee55e00671_Microsoft2024 VL - Microsoft::LTSC2024 -" ) do ( for /f "tokens=1-2 delims=_" %%A in ("%%~#") do ( set bypass= diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 0c5cd17..b59634d 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -1071,20 +1071,19 @@ call :dk_color %Gray% "Installed Office editions: %_oIds%" echo: for %%# in ( -"5440fd1f-7ecb-4221-8110-145efaa6372f_Insider Fast [Beta] - Insiders::DevMain -" -"64256afe-f5d9-4f86-8936-8840a6a4f5be_Monthly Preview - Insiders::CC -" -"492350f6-3a01-4f97-b9c0-c7c6ddf67d60_Monthly [Current] - Production::CC -" -"55336b82-a18d-4dd6-b5f6-9e5095c314a6_Monthly Enterprise - Production::MEC -" -"b8f9b850-328d-4355-9145-c59439a0c4cf_Semi Annual Preview - Insiders::FRDC -" -"7ffbc6bf-bc32-4f92-8982-f9dd17fd3114_Semi Annual - Production::DC -" -"ea4a4090-de26-49d7-93c1-91bff9e53fc3_DevMain Channel - Dogfood::DevMain -" -"b61285dd-d9f7-41f2-9757-8f61cba4e9c8_Microsoft Elite - Microsoft::DevMain -" -"f2e724c1-748f-4b47-8fb8-8e0d210e9208_Perpetual2019 VL - Production::LTSC -" -"1d2d2ea6-1680-4c56-ac58-a441c8c24ff9_Microsoft2019 VL - Microsoft::LTSC -" -"5030841d-c919-4594-8d2d-84ae4f96e58e_Perpetual2021 VL - Production::LTSC2021 -" -"86752282-5841-4120-ac80-db03ae6b5fdb_Microsoft2021 VL - Microsoft::LTSC2021 -" -"7983bac0-e531-40cf-be00-fd24fe66619c_Perpetual2024 VL - Production::LTSC2024 -" -"c02d8fe6-5242-4da8-972f-82ee55e00671_Microsoft2024 VL - Microsoft::LTSC2024 -" +"5440fd1f-7ecb-4221-8110-145efaa6372f_Beta / Insider Fast - Insiders::DevMain -" +"64256afe-f5d9-4f86-8936-8840a6a4f5be_Current / Monthly Preview - Insiders::CC -" +"492350f6-3a01-4f97-b9c0-c7c6ddf67d60_Current / Monthly - Production::CC -" +"55336b82-a18d-4dd6-b5f6-9e5095c314a6_Monthly Enterprise - Production::MEC -" +"7ffbc6bf-bc32-4f92-8982-f9dd17fd3114_Semi Annual Enterprise - Production::DC -" +"ea4a4090-de26-49d7-93c1-91bff9e53fc3_DevMain Channel - Dogfood::DevMain -" +"b61285dd-d9f7-41f2-9757-8f61cba4e9c8_Microsoft Elite - Microsoft::DevMain -" +"f2e724c1-748f-4b47-8fb8-8e0d210e9208_Perpetual2019 VL - Production::LTSC -" +"1d2d2ea6-1680-4c56-ac58-a441c8c24ff9_Microsoft2019 VL - Microsoft::LTSC -" +"5030841d-c919-4594-8d2d-84ae4f96e58e_Perpetual2021 VL - Production::LTSC2021 -" +"86752282-5841-4120-ac80-db03ae6b5fdb_Microsoft2021 VL - Microsoft::LTSC2021 -" +"7983bac0-e531-40cf-be00-fd24fe66619c_Perpetual2024 VL - Production::LTSC2024 -" +"c02d8fe6-5242-4da8-972f-82ee55e00671_Microsoft2024 VL - Microsoft::LTSC2024 -" ) do ( for /f "tokens=1-2 delims=_" %%A in ("%%~#") do ( set bypass= From f8f37b38fed82f78ad8a51503145e4951e584c16 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 19 Nov 2025 02:53:24 +0530 Subject: [PATCH 112/117] Don't auto change IoTEnterprise to Enterprise in KMS script --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 3 --- .../Activators/Online_KMS_Activation.cmd | 3 --- 2 files changed, 6 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 661cd46..f43e04e 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -14461,9 +14461,6 @@ set notfoundaltactID= if %_NoEditionChange%==1 exit /b for %%# in ( -188_IoTEnterprise__________________8ab9bdd1-1f67-4997-82d9-8878520837d9_73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43_Enterprise -206_IoTEnterpriseK_________________80083eae-7031-4394-9e88-4901973d56fe_73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43_Enterprise -191_IoTEnterpriseS-2021____________ed655016-a9e8-4434-95d9-4345352c2552_32d2fab3-e4a8-42c2-923b-4bf4fd13e6ee_M7XTQ-FN8P6-TTKYV-9D4CC-J4%f%62D_EnterpriseS-2021 205_IoTEnterpriseSK________________d4f9b41f-205c-405e-8e08-3d16e88e02be_59eb965c-9150-42b7-a0ec-22151b9897c5_KBN8V-HFGQ4-MGXVD-347P6-PD%f%QGT_IoTEnterpriseS 138_ProfessionalSingleLanguage_____a48938aa-62fa-4966-9d44-9f04da3f72f2_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional 139_ProfessionalCountrySpecific____f7af7d09-40e4-419c-a49b-eae366689ebd_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 3da7adb..8c2af1c 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -4234,9 +4234,6 @@ set notfoundaltactID= if %_NoEditionChange%==1 exit /b for %%# in ( -188_IoTEnterprise__________________8ab9bdd1-1f67-4997-82d9-8878520837d9_73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43_Enterprise -206_IoTEnterpriseK_________________80083eae-7031-4394-9e88-4901973d56fe_73111121-5638-40f6-bc11-f1d7b0d64300_NPPR9-FWDCX-D2C8J-H872K-2Y%f%T43_Enterprise -191_IoTEnterpriseS-2021____________ed655016-a9e8-4434-95d9-4345352c2552_32d2fab3-e4a8-42c2-923b-4bf4fd13e6ee_M7XTQ-FN8P6-TTKYV-9D4CC-J4%f%62D_EnterpriseS-2021 205_IoTEnterpriseSK________________d4f9b41f-205c-405e-8e08-3d16e88e02be_59eb965c-9150-42b7-a0ec-22151b9897c5_KBN8V-HFGQ4-MGXVD-347P6-PD%f%QGT_IoTEnterpriseS 138_ProfessionalSingleLanguage_____a48938aa-62fa-4966-9d44-9f04da3f72f2_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional 139_ProfessionalCountrySpecific____f7af7d09-40e4-419c-a49b-eae366689ebd_2de67392-b7a7-462a-b1ca-108dd189f588_W269N-WFGWX-YVC9B-4J6C9-T8%f%3GX_Professional From f69e4ff432e465a006896de107c390220102b6d3 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 19 Nov 2025 03:37:36 +0530 Subject: [PATCH 113/117] 3.9 --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- .../Activators/Ohook_Activation_AIO.cmd | 2 +- .../Activators/Online_KMS_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 2 +- 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 | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index f43e04e..5fa7a8a 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 @@ @::sfh437frandom -@set masver=3.8 +@set masver=3.9 @setlocal DisableDelayedExpansion @echo off diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index aa959d7..9033d67 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.8 +@set masver=3.9 @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 8c8f0fd..0370026 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.8 +@set masver=3.9 @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 8c2af1c..8d6a334 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.8 +@set masver=3.9 @echo off diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index c43257b..2c9bb75 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.8 +@set masver=3.9 @echo off diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index b59634d..c7d4d73 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.8 +@set masver=3.9 @echo off diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index b727b71..44d4ce1 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.8 +@set masver=3.9 @echo off diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 9284342..d31bd7d 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.8 +@set masver=3.9 @echo off diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index eb874e6..6fa92c7 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1,4 +1,4 @@ -@set masver=3.8 +@set masver=3.9 @echo off diff --git a/README.md b/README.md index a9bbd23..47faa7c 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,8 @@ --- ``` -Latest Version: 3.8 -Release date: 11-Nov-2025 +Latest Version: 3.9 +Release date: 19-Nov-2025 ``` ### [Troubleshooting / Help](https://massgrave.dev/troubleshoot) From 2bc48bfd4d929384dd0320aff4d856c056f07da8 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 19 Nov 2025 03:55:25 +0530 Subject: [PATCH 114/117] export-ignore --- .gitattributes | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index 4d21483..de5bd3d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -# MAS export-ignore -# LICENSE export-ignore -# README.md export-ignore -# .gitattributes export-ignore +MAS export-ignore +LICENSE export-ignore +README.md export-ignore +.gitattributes export-ignore From 541364642b5995277d38af4ba443b1492fbf285d Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 19 Nov 2025 03:59:34 +0530 Subject: [PATCH 115/117] Revert export-ignore --- .gitattributes | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index de5bd3d..4d21483 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -MAS export-ignore -LICENSE export-ignore -README.md export-ignore -.gitattributes export-ignore +# MAS export-ignore +# LICENSE export-ignore +# README.md export-ignore +# .gitattributes export-ignore From 5f40fb4a79c90e6542f4273da7c3e1bc4e339d91 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 22 Nov 2025 12:35:29 +0530 Subject: [PATCH 116/117] Remove email --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 3 --- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 1 - MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd | 1 - .../Activators/Online_KMS_Activation.cmd | 3 --- MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd | 1 - MAS/Separate-Files-Version/Change_Office_Edition.cmd | 1 - MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 1 - MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 1 - MAS/Separate-Files-Version/Troubleshoot.cmd | 1 - 9 files changed, 13 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 5fa7a8a..fdadbf4 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -13,7 +13,6 @@ ::============================================================================ :: :: Homepage: mass{}grave{dot}dev -:: Email: mas.help@outlook.com :: ::============================================================================ @@ -13058,7 +13057,6 @@ exit /b ::============================================================================ :: :: Homepage: mass{}grave{dot}dev -:: Email: mas.help@outlook.com :: ::============================================================================ @@ -13667,7 +13665,6 @@ echo: echo This Script is a part of MAS project. echo: echo Homepage: mass%w%grave%w%.dev -echo Email: mas.help@outlook.com )>"%_dest%\Info.txt" exit /b diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 9033d67..4332dd8 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -6,7 +6,6 @@ ::============================================================================ :: :: Homepage: mass{}grave{dot}dev -:: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 0370026..7389471 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -6,7 +6,6 @@ ::============================================================================ :: :: Homepage: mass{}grave{dot}dev -:: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 8d6a334..33c2c50 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -6,7 +6,6 @@ ::============================================================================ :: :: Homepage: mass{}grave{dot}dev -:: Email: mas.help@outlook.com :: ::============================================================================ @@ -1728,7 +1727,6 @@ exit /b ::============================================================================ :: :: Homepage: mass{}grave{dot}dev -:: Email: mas.help@outlook.com :: ::============================================================================ @@ -2337,7 +2335,6 @@ echo: echo This Script is a part of MAS project. echo: echo Homepage: mass%w%grave%w%.dev -echo Email: mas.help@outlook.com )>"%_dest%\Info.txt" exit /b diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 2c9bb75..d966498 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -6,7 +6,6 @@ ::============================================================================ :: :: Homepage: mass{}grave{dot}dev -:: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index c7d4d73..9220148 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -6,7 +6,6 @@ ::============================================================================ :: :: Homepage: mass{}grave{dot}dev -:: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 44d4ce1..0844273 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -6,7 +6,6 @@ ::============================================================================ :: :: Homepage: mass{}grave{dot}dev -:: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index d31bd7d..ddbe84e 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -6,7 +6,6 @@ ::============================================================================ :: :: Homepage: mass{}grave{dot}dev -:: Email: mas.help@outlook.com :: ::============================================================================ diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 6fa92c7..124220c 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -6,7 +6,6 @@ ::============================================================================ :: :: Homepage: mass{}grave{dot}dev -:: Email: mas.help@outlook.com :: ::============================================================================ From 54a1ec3d5418a6d24a31c38f52ced9a5e67ebb11 Mon Sep 17 00:00:00 2001 From: WitherOrNot Date: Sun, 23 Nov 2025 16:27:07 -0500 Subject: [PATCH 117/117] Fix self-hosted git URL --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 47faa7c..02115e2 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Release date: 19-Nov-2025 [1]: https://github.com/massgravel/Microsoft-Activation-Scripts [2]: https://dev.azure.com/massgrave/_git/Microsoft-Activation-Scripts -[3]: https://git.activated.win/massgrave/Microsoft-Activation-Scripts +[3]: https://git.activated.win/Microsoft-Activation-Scripts [4]: https://discord.gg/j2yFsV5ZVC [5]: https://www.reddit.com/r/MAS_Activator [6]: https://bsky.app/profile/massgrave.dev @@ -108,3 +108,4 @@ Release date: 19-Nov-2025 ---

Made with Love ❤️

+