Compare commits

..

11 Commits

Author SHA1 Message Date
Lyssa
d33dfc9ce6 Revert export-ignore 2026-01-28 19:25:27 +04:00
Lyssa
a5435a349b export-ignore 2026-01-28 19:17:15 +04:00
Lyssa
4fdefbc0d5 Remove some more empty lines 2026-01-28 17:58:08 +04:00
Lyssa
63da908027 Fix mistakes 2026-01-28 17:01:43 +04:00
Lyssa
146d828b46 Update AIO script to 3.10 2026-01-27 21:35:55 +04:00
Lyssa
d7302ee41b Update version number to 3.10 2026-01-27 21:12:08 +04:00
Lyssa
72cd62552e Remove newlines before blue lines 2026-01-27 20:59:20 +04:00
Lyssa
8d8ed5d098 Suggest in-place repair if license package files are missing 2026-01-27 20:27:33 +04:00
Lyssa
f0d13cb216 Remove unnecessary insider check in Ohook script + make CAS beginning comment consistent with other scripts 2026-01-27 17:12:28 +04:00
Lyssa
a93b4b3f4b Add warnings for Smart App Control 2026-01-26 15:40:36 +04:00
WitherOrNot
a353813814 Add Windows Server 2016 ESU 2026-01-25 21:04:32 -05:00
11 changed files with 109 additions and 287 deletions

View File

@ -1,5 +1,5 @@
@::ab7249d77random13141b5922144806de5d43f @::ab7249d77random13141b5922144806de5d43f
@set masver=3.9 @set masver=3.10
@setlocal DisableDelayedExpansion @setlocal DisableDelayedExpansion
@echo off @echo off
@ -239,7 +239,6 @@ REM check LanguageMode
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo FullLanguage mode not found in PowerShell. Aborting... echo FullLanguage mode not found in PowerShell. Aborting...
echo If you have applied restrictions on Powershell then undo those changes. echo If you have applied restrictions on Powershell then undo those changes.
echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
goto dk_done goto dk_done
@ -249,7 +248,6 @@ REM check Powershell core version
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( 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 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 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -260,7 +258,6 @@ REM check for Mal-ware that may cause issues with Powershell
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
echo "%%f" echo "%%f"
echo Mal%blank%ware found, PowerShell is not working properly. echo Mal%blank%ware found, PowerShell is not working properly.
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
goto dk_done goto dk_done
@ -272,7 +269,6 @@ if /i "!tstresult2!"=="FullLanguage" (
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
if !errorlevel!==3 ( if !errorlevel!==3 (
echo Windows Powershell failed to load .NET command. Aborting... echo Windows Powershell failed to load .NET command. Aborting...
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -293,7 +289,6 @@ 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 ', '))}""" 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 set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -679,7 +674,6 @@ if %winbuild% LSS 10240 (
%eline% %eline%
echo Unsupported OS version detected [%winbuild%]. echo Unsupported OS version detected [%winbuild%].
echo HWID Activation is only supported on Windows 10/11. echo HWID Activation is only supported on Windows 10/11.
echo:
call :dk_color %Blue% "Use TSforge activation option from the main menu." call :dk_color %Blue% "Use TSforge activation option from the main menu."
goto dk_done goto dk_done
) )
@ -717,7 +711,6 @@ echo:
if not defined results ( if not defined results (
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
call :dk_color %Blue% "After that, restart system and try activation again." call :dk_color %Blue% "After that, restart system and try activation again."
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
) )
@ -764,7 +757,6 @@ echo [%winos% ^| %winbuild%]
echo: echo:
echo Evaluation editions cannot be activated outside of their evaluation period. 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." call :dk_color %Blue% "Use TSforge activation option from the main menu to reset evaluation period."
echo:
set fixes=%fixes% %mas%evaluation_editions set fixes=%fixes% %mas%evaluation_editions
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
goto dk_done goto dk_done
@ -965,7 +957,6 @@ call :dk_color %Red% "Checking Ticket Migration [Failed]"
if not defined altapplist if not defined showfix if defined rebuildinfo ( if not defined altapplist if not defined showfix if defined rebuildinfo (
set showfix=1 set showfix=1
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -1037,7 +1028,6 @@ licensing.mp.microsoft.com
findstr /i "%%#" "%SysPath%\drivers\etc\hosts" %nul1% && set "hosfail= [%%# Blocked in Hosts]" findstr /i "%%#" "%SysPath%\drivers\etc\hosts" %nul1% && set "hosfail= [%%# Blocked in Hosts]"
) )
call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]!hosfail!" call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]!hosfail!"
echo:
set fixes=%fixes% %mas%licensing-servers-issue set fixes=%fixes% %mas%licensing-servers-issue
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
echo: echo:
@ -1053,7 +1043,6 @@ 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 reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DoNotConnectToWindowsUpdateInternetLocations %nul2% | find /i "0x1" %nul% && set wublock=1
if defined wublock ( if defined wublock (
call :dk_color %Red% "Checking Update Blocker In Registry [Found]" 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." call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it."
echo: echo:
) )
@ -1061,7 +1050,6 @@ echo:
reg query "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v DisableStoreApps %nul2% | find /i "0x1" %nul% && ( reg query "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v DisableStoreApps %nul2% | find /i "0x1" %nul% && (
set storeblock=1 set storeblock=1
call :dk_color %Red% "Checking Store Blocker In Registry [Found]" 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." call :dk_color %Blue% "If you have used any tool to block Store, undo it."
echo: echo:
) )
@ -1080,12 +1068,10 @@ set error=1
call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]" call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]"
if !wcount! GTR 2 ( if !wcount! GTR 2 (
call :dk_color %Red% "Windows seems to be infected with Mal%w%ware." call :dk_color %Red% "Windows seems to be infected with Mal%w%ware."
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
echo: echo:
) else ( ) else (
echo:
call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it." call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it."
echo: echo:
) )
@ -1096,7 +1082,6 @@ set error=1
set wuerror=1 set wuerror=1
sc start wuauserv %nul% sc start wuauserv %nul%
call :dk_color %Red% "Starting Windows Update Service [Failed] [!errorlevel!]" 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." call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it."
echo: echo:
) )
@ -1111,7 +1096,6 @@ 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 ( 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% && ( echo "%error_code%" | findstr /i "0x80072e 0x80072f 0x800704cf 0x87e10bcf 0x800705b4" %nul% && (
call :dk_color %Red% "Checking Internet Issues [Found] %error_code%" call :dk_color %Red% "Checking Internet Issues [Found] %error_code%"
echo:
set fixes=%fixes% %mas%licensing-servers-issue set fixes=%fixes% %mas%licensing-servers-issue
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
echo: echo:
@ -1323,7 +1307,6 @@ echo %keyecho% %~1 [Successful]
call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%"
if not defined showfix ( if not defined showfix (
if defined altapplist call :dk_color %Red% "Activation ID not found for this key." if defined altapplist call :dk_color %Red% "Activation ID not found for this key."
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
set showfix=1 set showfix=1
@ -1465,7 +1448,6 @@ if %spperror% NEQ 1056 if %spperror% NEQ 0 (
%eline% %eline%
echo sc start %_slser% [Error Code: %spperror%] echo sc start %_slser% [Error Code: %spperror%]
if %spperror% EQU 1053 ( if %spperror% EQU 1053 (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and try again." 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." call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
) )
@ -1547,7 +1529,6 @@ if not "%results%%pupfound%"=="" (
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%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% "Checking Probable Mal%w%ware Infection..."
if defined results (call :dk_color %Red% "%results%"&set showfix=1) if defined results (call :dk_color %Red% "%results%"&set showfix=1)
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
echo: echo:
@ -1575,7 +1556,6 @@ call :dk_chkmal
sc query Null %nul% || ( sc query Null %nul% || (
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 ( if not defined showfix (
echo:
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
echo: echo:
) )
@ -1591,7 +1571,6 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot
call :dk_color %Red% "Checking WinPE [Found]" call :dk_color %Red% "Checking WinPE [Found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode."
echo: echo:
) )
@ -1606,7 +1585,6 @@ set showfix=1
if defined safeboot_option ( if defined safeboot_option (
call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode."
echo: echo:
) )
@ -1625,7 +1603,6 @@ if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]"
echo "%imagestate%" | find /i "RESEAL" %nul% && ( echo "%imagestate%" | find /i "RESEAL" %nul% && (
if not defined showfix ( 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." call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
echo: echo:
) )
@ -1634,7 +1611,6 @@ set showfix=1
) )
echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && (
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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 the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -1720,7 +1696,6 @@ if not defined showfix (
echo: echo:
echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && (
echo A registry fix has been applied to enable the disabled service. 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." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
) || ( ) || (
set fixes=%fixes% %mas%in-place_repair_upgrade set fixes=%fixes% %mas%in-place_repair_upgrade
@ -1761,7 +1736,6 @@ if not defined showfix (
set listwospp=%_serv:sppsvc=% set listwospp=%_serv:sppsvc=%
echo %serv_e% | findstr /i "!listwospp!" %nul% && ( echo %serv_e% | findstr /i "!listwospp!" %nul% && (
set showfix=1 set showfix=1
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
@ -1793,7 +1767,6 @@ if defined wmifailed (
call :dk_color %Red% "Checking WMI [Not Working]" call :dk_color %Red% "Checking WMI [Not Working]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option."
echo: echo:
) )
@ -1808,7 +1781,6 @@ set showfix=1
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% || ( 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]" call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers 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" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
echo: echo:
@ -1829,7 +1801,6 @@ if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\Net
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" ( 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!]" call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -1860,7 +1831,6 @@ call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creat
) else ( ) else (
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -1905,7 +1875,6 @@ if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
if defined permerror ( if defined permerror (
call :dk_color %Red% "Checking SPP Permissions [!permerror!]" call :dk_color %Red% "Checking SPP Permissions [!permerror!]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -1927,7 +1896,6 @@ if defined chkalp (
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
if not defined showfix ( if not defined showfix (
echo "%wpainfo%" | find /i "Error Found" %nul% && ( 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." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
echo: echo:
set error=1 set error=1
@ -1940,7 +1908,6 @@ set wpainfo=a
if not defined chkalp ( if not defined chkalp (
if %wpainfo% GEQ 5000 ( if %wpainfo% GEQ 5000 (
call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" 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% "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." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
echo: echo:
@ -1956,7 +1923,6 @@ echo Checking WPA Registry Count [%wpainfo%]
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
call :dk_color %Red% "Checking Rearm [System is Rearmed]" call :dk_color %Red% "Checking Rearm [System is Rearmed]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
echo: echo:
) )
@ -1968,7 +1934,6 @@ set showfix=1
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
echo: echo:
) )
@ -1983,7 +1948,6 @@ set showfix=1
if %error_code% NEQ 0 ( if %error_code% NEQ 0 (
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -2013,7 +1977,6 @@ call :dk_color %Gray% "Checking Activation IDs [Key Not Installe
if not defined apps if not defined allapps ( if not defined apps if not defined allapps (
call :dk_color %Red% "Checking Activation IDs [Not found]" call :dk_color %Red% "Checking Activation IDs [Not found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -2023,7 +1986,6 @@ set showfix=1
) )
if not defined showfix if defined rlicfailed ( if not defined showfix if defined rlicfailed (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -2041,7 +2003,6 @@ if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Win
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( 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]" call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]"
if not defined showfix ( 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." 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 set fixes=%fixes% %mas%evaluation_editions
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
@ -2059,7 +2020,6 @@ set showfix=1
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( 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]" call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -2097,6 +2057,13 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" (
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
if not defined showfix (
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
) )
) )
) )
@ -2143,7 +2110,6 @@ if defined _sppint (
echo %_sppint% | find /i "PerfOptions" %nul% && ( echo %_sppint% | find /i "PerfOptions" %nul% && (
call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -2178,7 +2144,6 @@ if "!taskinfo!"=="" set "taskinfo=Not Found"
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
if not defined showfix ( if not defined showfix (
echo:
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
@ -2559,7 +2524,6 @@ goto :oh_menu
cls cls
if not defined terminal ( if not defined terminal (
mode 140, 32 mode 140, 32
if exist "%SysPath%\spp\store_test\" mode 140, 32
%psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=32;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" %nul% %psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=32;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" %nul%
) )
title Ohook Activation %masver% title Ohook Activation %masver%
@ -2575,7 +2539,6 @@ echo:
if not defined results ( if not defined results (
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
call :dk_color %Blue% "After that, restart system and try activation again." call :dk_color %Blue% "After that, restart system and try activation again."
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
) )
@ -2676,11 +2639,9 @@ call :dk_color %Red% "Checking Installed Office [Not Found]"
if defined ohub ( if defined ohub (
echo: 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 URL below, then try again."
call :dk_color %Blue% "Download and install Office from the below URL and then try again."
echo:
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
goto dk_done goto dk_done
@ -2706,6 +2667,26 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2
::======================================================================================================================================== ::========================================================================================================================================
:: Check Smart App Control
set "sacstate="
if %winbuild% GEQ 22621 (
for /f "tokens=3" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\CI\Policy" /v VerifiedAndReputablePolicyState %nul6%') do set "sacstate=%%a"
)
if defined sacstate (
if "%sacstate%"=="0x1" (
call :dk_color %Gray% "Checking Smart App Control State [Enabled]"
call :dk_color %Blue% "Smart App Control may prevent you from opening Office after Ohook activation."
call :dk_color %Blue% "You will need to disable it from the Windows Defender settings if it does."
) else if "%sacstate%"=="0x2" (
call :dk_color %Gray% "Checking Smart App Control State [Evaluation]"
call :dk_color %Blue% "Smart App Control may prevent you from opening Office in the future if it enables itself after the evaluation period."
call :dk_color %Blue% "It is recommended that you disable it from the Windows Defender settings."
)
)
::========================================================================================================================================
:: Process Office 15.0 C2R :: Process Office 15.0 C2R
if not defined o15c2r goto :starto16c2r if not defined o15c2r goto :starto16c2r
@ -2875,7 +2856,6 @@ echo Help: %mas%troubleshoot
) else ( ) else (
call :dk_color %Red% "Some errors were detected." call :dk_color %Red% "Some errors were detected."
if not defined ierror if not defined showfix call :dk_color %Blue% "%_fixmsg%" if not defined ierror if not defined showfix call :dk_color %Blue% "%_fixmsg%"
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
) )
@ -3721,7 +3701,6 @@ if %upk_result%==1 echo Uninstalling Other/Grace Keys [Successful]
if %upk_result%==2 ( if %upk_result%==2 (
call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
set showfix=1 set showfix=1
@ -4544,7 +4523,6 @@ echo:
if not defined results ( if not defined results (
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
call :dk_color %Blue% "After that, restart system and try activation again." call :dk_color %Blue% "After that, restart system and try activation again."
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
) )
@ -4558,7 +4536,6 @@ echo .NET 3.5 Framework is corrupt or missing. Aborting...
if exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-Embedded" ( if exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-Embedded" (
echo Install .NET Framework 4.8 and Windows Management Framework 5.1 echo Install .NET Framework 4.8 and Windows Management Framework 5.1
) )
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -4572,7 +4549,6 @@ if !errorlevel! EQU 1051 (
%eline% %eline%
echo Evaluation WLMS service is running, %_slser% service can not be stopped. Aborting... echo Evaluation WLMS service is running, %_slser% service can not be stopped. Aborting...
echo Install Non-Eval version for Windows build %winbuild%. echo Install Non-Eval version for Windows build %winbuild%.
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -5084,6 +5060,9 @@ f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-%w10EsuEditions%-%w10EsuE
1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% 1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-%w10EsuEditions%-%w10EsuEditionsLaterAdded%
83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% 83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-%w10EsuEditions%-%w10EsuEditionsLaterAdded%
0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% 0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-%w10EsuEditions%-%w10EsuEditionsLaterAdded%
REM WindowsServer2016
91bcac0a-d7d3-4d2b-bd0c-72fed675f01b_Server-ESU-Year3[1-3y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore-
4cd0ab30-73a4-4dde-972c-512f05be31df_Server-ESU-Year6[4-6y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore-
) do ( ) do (
for /f "tokens=1-3 delims=_" %%A in ("%%#") do ( for /f "tokens=1-3 delims=_" %%A in ("%%#") do (
echo "%allapps%" | find /i "%%A" %nul1% && ( echo "%allapps%" | find /i "%%A" %nul1% && (
@ -5139,7 +5118,7 @@ goto :ts_off
set esuavail= set esuavail=
if defined _vis if defined isServer set esuavail=1 if defined _vis if defined isServer set esuavail=1
if %winbuild% LEQ 7602 if not defined _vis if not defined isThinpc set esuavail=1 if %winbuild% LEQ 7602 if not defined _vis if not defined isThinpc set esuavail=1
if %winbuild% GTR 7602 if %winbuild% LSS 10240 if defined isServer set esuavail=1 if %winbuild% GTR 7602 if %winbuild% LSS 14393 if defined isServer set esuavail=1
if %winbuild% GEQ 10240 if %winbuild% LEQ 19045 if not defined isServer set esuavail=1 if %winbuild% GEQ 10240 if %winbuild% LEQ 19045 if not defined isServer set esuavail=1
if %winbuild% EQU 9600 set esuavail=1 if %winbuild% EQU 9600 set esuavail=1
@ -5257,9 +5236,9 @@ call :dk_color %Gray% "Checking Installed Office [Not Found]"
if defined ohub ( if defined ohub (
echo: 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.
) )
call :dk_color %Blue% "Download and install Office from below URL and try again." call :dk_color %Blue% "Download and install Office from the URL below, then try again."
if %_actwin%==0 set fixes=%fixes% %mas%genuine-installation-media if %_actwin%==0 set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
goto :ts_act goto :ts_act
@ -12215,7 +12194,6 @@ echo:
if not defined results ( if not defined results (
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
call :dk_color %Blue% "After that, restart system and try activation again." call :dk_color %Blue% "After that, restart system and try activation again."
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
) )
@ -12497,9 +12475,9 @@ call :dk_color %Red% "Checking Installed Office [Not Found]"
if defined ohub ( if defined ohub (
echo: 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.
) )
call :dk_color %Blue% "Download and install Office from below URL and try again." call :dk_color %Blue% "Download and install Office from the URL below, then try again."
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
goto :ks_activate goto :ks_activate
@ -12978,7 +12956,6 @@ call :ks_clearstuff
set error_=9 set error_=9
echo Failed to completely clear %KS% Cache. 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. 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%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) || ( ) || (
@ -16804,7 +16781,6 @@ sc query Winmgmt | find /i "STOPPED" %nul% && (
echo [Successful] echo [Successful]
) || ( ) || (
call :dk_color %Red% "[Failed]" call :dk_color %Red% "[Failed]"
echo:
call :dk_color %Blue% "Its recommended to select [Restart] option and then apply Fix WMI option again." call :dk_color %Blue% "Its recommended to select [Restart] option and then apply Fix WMI option again."
echo %line% echo %line%
echo: echo:
@ -17226,10 +17202,8 @@ dism.exe
if not exist %SysPath%\%%# ( if not exist %SysPath%\%%# (
%eline% %eline%
echo [%SysPath%\%%#] file is missing, aborting... echo [%SysPath%\%%#] file is missing, aborting...
echo:
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
call :dk_color %Blue% "After that, restart system and try activation again." call :dk_color %Blue% "After that, restart system and try activation again."
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -17262,7 +17236,6 @@ call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f
if not defined allapps ( if not defined allapps (
%eline% %eline%
echo Failed to find activation IDs. Aborting... echo Failed to find activation IDs. Aborting...
echo:
call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." call :dk_color %Blue% "To fix this issue, activate Windows from the main menu."
goto dk_done goto dk_done
) )
@ -17284,7 +17257,6 @@ if not defined osedition %chkedi% do if not errorlevel 1 (call set "osedition=%%
if not defined osedition ( if not defined osedition (
%eline% %eline%
echo Failed to detect OS edition, aborting... echo Failed to detect OS edition, aborting...
echo:
call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." call :dk_color %Blue% "To fix this issue, activate Windows from the main menu."
goto dk_done goto dk_done
) )
@ -17449,7 +17421,6 @@ if not defined key (
%eline% %eline%
echo [%targetedition% ^| %winbuild%] echo [%targetedition% ^| %winbuild%]
echo Failed to get product key from pkeyhelper.dll. echo Failed to get product key from pkeyhelper.dll.
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -17504,7 +17475,6 @@ echo:
call :dk_color %Gray% "Reboot is required to fully change the edition." call :dk_color %Gray% "Reboot is required to fully change the edition."
) else ( ) else (
call :dk_color %Red% "[Unsuccessful] [Error Code: !keyerror!]" call :dk_color %Red% "[Unsuccessful] [Error Code: !keyerror!]"
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
) )
@ -17585,7 +17555,6 @@ if not defined key (
%eline% %eline%
echo [%targetedition% ^| %winbuild%] echo [%targetedition% ^| %winbuild%]
echo Failed to get product key from pkeyhelper.dll. echo Failed to get product key from pkeyhelper.dll.
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -18120,7 +18089,6 @@ if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISE
if %osedition%==0 ( if %osedition%==0 (
%eline% %eline%
echo Failed to detect OS Edition. Aborting... echo Failed to detect OS Edition. Aborting...
echo:
call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." call :dk_color %Blue% "To fix this issue, activate Windows from the main menu."
goto dk_done goto dk_done
) )
@ -18140,7 +18108,6 @@ if not defined o16c2r_reg (
%eline% %eline%
echo Office C2R 2016 or later is not installed, which is required for this script. echo Office C2R 2016 or later is not installed, which is required for this script.
echo Download and install Office from below URL and try again. echo Download and install Office from below URL and try again.
echo:
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
goto dk_done goto dk_done
@ -18157,7 +18124,6 @@ if %verchk% LSS 9029 (
echo Installed Office version is %_version%. echo Installed Office version is %_version%.
echo Minimum required version is 16.0.9029.2167 echo Minimum required version is 16.0.9029.2167
echo Aborting... echo Aborting...
echo:
call :dk_color %Blue% "Download and install latest Office from below URL and try again." call :dk_color %Blue% "Download and install latest Office from below URL and try again."
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
@ -18180,7 +18146,6 @@ _masterxml
if not defined %%A ( if not defined %%A (
%eline% %eline%
echo Failed to find %%A. Aborting... echo Failed to find %%A. Aborting...
echo:
call :dk_color %Blue% "Download and install Office from below URL and try again." call :dk_color %Blue% "Download and install Office from below URL and try again."
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
@ -18193,7 +18158,6 @@ if %winbuild% LSS 10240 if defined ltscfound (
echo Installed Office appears to be from the Volume channel %ltsc19%%ltsc21%%ltsc24%, echo Installed Office appears to be from the Volume channel %ltsc19%%ltsc21%%ltsc24%,
echo which is not officially supported on your Windows build version %winbuild%. echo which is not officially supported on your Windows build version %winbuild%.
echo Aborting... echo Aborting...
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -18207,7 +18171,6 @@ if defined unsupbuild (
%eline% %eline%
echo Unsupported Office %verchk% is installed on your Windows build version %winbuild%. echo Unsupported Office %verchk% is installed on your Windows build version %winbuild%.
echo Aborting... echo Aborting...
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -18314,7 +18277,6 @@ mode 98, 45
if not exist %SystemRoot%\Temp\%list%.txt ( if not exist %SystemRoot%\Temp\%list%.txt (
%eline% %eline%
echo Failed to generate available editions list. echo Failed to generate available editions list.
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto :oe_goback goto :oe_goback
@ -18379,7 +18341,6 @@ set suites=1
if not exist %SystemRoot%\Temp\getAppIds.txt ( if not exist %SystemRoot%\Temp\getAppIds.txt (
%eline% %eline%
echo Failed to generate available apps list. echo Failed to generate available apps list.
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto :oe_goback goto :oe_goback
@ -18532,7 +18493,6 @@ if /i "%_lang%"=="%%#" set langmatched=1
if not defined langmatched ( if not defined langmatched (
%eline% %eline%
echo %_lang% language is not available for Project/Visio apps. echo %_lang% language is not available for Project/Visio apps.
echo:
call :dk_color %Blue% "Install Office in the supported language for Project/Visio from the below URL." call :dk_color %Blue% "Install Office in the supported language for Project/Visio from the below URL."
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
@ -18899,7 +18859,6 @@ goto :oe_goback
if not defined build ( if not defined build (
%eline% %eline%
call :dk_color %Red% "Failed to detect build number for the target FFN." call :dk_color %Red% "Failed to detect build number for the target FFN."
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto :oe_goback goto :oe_goback
@ -18937,7 +18896,6 @@ for /l %%i in (1,1,30) do (if !clverchk! LSS %buildchk% (call :ch_getinfo&timeou
if %clverchk% LSS %buildchk% ( if %clverchk% LSS %buildchk% (
echo: echo:
call :dk_color %Red% "Failed to update Office C2R client. Aborting..." call :dk_color %Red% "Failed to update Office C2R client. Aborting..."
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto :oe_goback goto :oe_goback

View File

@ -1,4 +1,4 @@
@set masver=3.9 @set masver=3.10
@echo off @echo off
@ -187,7 +187,6 @@ if %winbuild% LSS 10240 (
%eline% %eline%
echo Unsupported OS version detected [%winbuild%]. echo Unsupported OS version detected [%winbuild%].
echo HWID Activation is only supported on Windows 10/11. echo HWID Activation is only supported on Windows 10/11.
echo:
call :dk_color %Blue% "Use TSforge activation option from the main menu." call :dk_color %Blue% "Use TSforge activation option from the main menu."
goto dk_done goto dk_done
) )
@ -261,7 +260,6 @@ REM check LanguageMode
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo FullLanguage mode not found in PowerShell. Aborting... echo FullLanguage mode not found in PowerShell. Aborting...
echo If you have applied restrictions on Powershell then undo those changes. echo If you have applied restrictions on Powershell then undo those changes.
echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
goto dk_done goto dk_done
@ -271,7 +269,6 @@ REM check Powershell core version
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( 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 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 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -282,7 +279,6 @@ REM check for Mal-ware that may cause issues with Powershell
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
echo "%%f" echo "%%f"
echo Mal%blank%ware found, PowerShell is not working properly. echo Mal%blank%ware found, PowerShell is not working properly.
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
goto dk_done goto dk_done
@ -294,7 +290,6 @@ if /i "!tstresult2!"=="FullLanguage" (
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
if !errorlevel!==3 ( if !errorlevel!==3 (
echo Windows Powershell failed to load .NET command. Aborting... echo Windows Powershell failed to load .NET command. Aborting...
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -315,7 +310,6 @@ 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 ', '))}""" 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 set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -426,7 +420,6 @@ echo:
if not defined results ( if not defined results (
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
call :dk_color %Blue% "After that, restart system and try activation again." call :dk_color %Blue% "After that, restart system and try activation again."
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
) )
@ -473,7 +466,6 @@ echo [%winos% ^| %winbuild%]
echo: echo:
echo Evaluation editions cannot be activated outside of their evaluation period. 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." call :dk_color %Blue% "Use TSforge activation option from the main menu to reset evaluation period."
echo:
set fixes=%fixes% %mas%evaluation_editions set fixes=%fixes% %mas%evaluation_editions
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
goto dk_done goto dk_done
@ -674,7 +666,6 @@ call :dk_color %Red% "Checking Ticket Migration [Failed]"
if not defined altapplist if not defined showfix if defined rebuildinfo ( if not defined altapplist if not defined showfix if defined rebuildinfo (
set showfix=1 set showfix=1
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -746,7 +737,6 @@ licensing.mp.microsoft.com
findstr /i "%%#" "%SysPath%\drivers\etc\hosts" %nul1% && set "hosfail= [%%# Blocked in Hosts]" findstr /i "%%#" "%SysPath%\drivers\etc\hosts" %nul1% && set "hosfail= [%%# Blocked in Hosts]"
) )
call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]!hosfail!" call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]!hosfail!"
echo:
set fixes=%fixes% %mas%licensing-servers-issue set fixes=%fixes% %mas%licensing-servers-issue
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
echo: echo:
@ -762,7 +752,6 @@ 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 reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DoNotConnectToWindowsUpdateInternetLocations %nul2% | find /i "0x1" %nul% && set wublock=1
if defined wublock ( if defined wublock (
call :dk_color %Red% "Checking Update Blocker In Registry [Found]" 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." call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it."
echo: echo:
) )
@ -770,7 +759,6 @@ echo:
reg query "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v DisableStoreApps %nul2% | find /i "0x1" %nul% && ( reg query "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v DisableStoreApps %nul2% | find /i "0x1" %nul% && (
set storeblock=1 set storeblock=1
call :dk_color %Red% "Checking Store Blocker In Registry [Found]" 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." call :dk_color %Blue% "If you have used any tool to block Store, undo it."
echo: echo:
) )
@ -789,12 +777,10 @@ set error=1
call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]" call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]"
if !wcount! GTR 2 ( if !wcount! GTR 2 (
call :dk_color %Red% "Windows seems to be infected with Mal%w%ware." call :dk_color %Red% "Windows seems to be infected with Mal%w%ware."
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
echo: echo:
) else ( ) else (
echo:
call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it." call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it."
echo: echo:
) )
@ -805,7 +791,6 @@ set error=1
set wuerror=1 set wuerror=1
sc start wuauserv %nul% sc start wuauserv %nul%
call :dk_color %Red% "Starting Windows Update Service [Failed] [!errorlevel!]" 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." call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it."
echo: echo:
) )
@ -820,7 +805,6 @@ 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 ( 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% && ( echo "%error_code%" | findstr /i "0x80072e 0x80072f 0x800704cf 0x87e10bcf 0x800705b4" %nul% && (
call :dk_color %Red% "Checking Internet Issues [Found] %error_code%" call :dk_color %Red% "Checking Internet Issues [Found] %error_code%"
echo:
set fixes=%fixes% %mas%licensing-servers-issue set fixes=%fixes% %mas%licensing-servers-issue
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
echo: echo:
@ -1032,7 +1016,6 @@ echo %keyecho% %~1 [Successful]
call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%"
if not defined showfix ( if not defined showfix (
if defined altapplist call :dk_color %Red% "Activation ID not found for this key." if defined altapplist call :dk_color %Red% "Activation ID not found for this key."
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
set showfix=1 set showfix=1
@ -1158,7 +1141,6 @@ if %spperror% NEQ 1056 if %spperror% NEQ 0 (
%eline% %eline%
echo sc start %_slser% [Error Code: %spperror%] echo sc start %_slser% [Error Code: %spperror%]
if %spperror% EQU 1053 ( if %spperror% EQU 1053 (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and try again." 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." call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
) )
@ -1240,7 +1222,6 @@ if not "%results%%pupfound%"=="" (
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%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% "Checking Probable Mal%w%ware Infection..."
if defined results (call :dk_color %Red% "%results%"&set showfix=1) if defined results (call :dk_color %Red% "%results%"&set showfix=1)
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
echo: echo:
@ -1268,7 +1249,6 @@ call :dk_chkmal
sc query Null %nul% || ( sc query Null %nul% || (
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 ( if not defined showfix (
echo:
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
echo: echo:
) )
@ -1284,7 +1264,6 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot
call :dk_color %Red% "Checking WinPE [Found]" call :dk_color %Red% "Checking WinPE [Found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode."
echo: echo:
) )
@ -1299,7 +1278,6 @@ set showfix=1
if defined safeboot_option ( if defined safeboot_option (
call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode."
echo: echo:
) )
@ -1318,7 +1296,6 @@ if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]"
echo "%imagestate%" | find /i "RESEAL" %nul% && ( echo "%imagestate%" | find /i "RESEAL" %nul% && (
if not defined showfix ( 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." call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
echo: echo:
) )
@ -1327,7 +1304,6 @@ set showfix=1
) )
echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && (
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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 the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -1413,7 +1389,6 @@ if not defined showfix (
echo: echo:
echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && (
echo A registry fix has been applied to enable the disabled service. 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." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
) || ( ) || (
set fixes=%fixes% %mas%in-place_repair_upgrade set fixes=%fixes% %mas%in-place_repair_upgrade
@ -1454,7 +1429,6 @@ if not defined showfix (
set listwospp=%_serv:sppsvc=% set listwospp=%_serv:sppsvc=%
echo %serv_e% | findstr /i "!listwospp!" %nul% && ( echo %serv_e% | findstr /i "!listwospp!" %nul% && (
set showfix=1 set showfix=1
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
@ -1486,7 +1460,6 @@ if defined wmifailed (
call :dk_color %Red% "Checking WMI [Not Working]" call :dk_color %Red% "Checking WMI [Not Working]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option."
echo: echo:
) )
@ -1501,7 +1474,6 @@ set showfix=1
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% || ( 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]" call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers 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" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
echo: echo:
@ -1522,7 +1494,6 @@ if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\Net
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" ( 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!]" call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -1553,7 +1524,6 @@ call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creat
) else ( ) else (
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -1598,7 +1568,6 @@ if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
if defined permerror ( if defined permerror (
call :dk_color %Red% "Checking SPP Permissions [!permerror!]" call :dk_color %Red% "Checking SPP Permissions [!permerror!]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -1620,7 +1589,6 @@ if defined chkalp (
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
if not defined showfix ( if not defined showfix (
echo "%wpainfo%" | find /i "Error Found" %nul% && ( 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." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
echo: echo:
set error=1 set error=1
@ -1633,7 +1601,6 @@ set wpainfo=a
if not defined chkalp ( if not defined chkalp (
if %wpainfo% GEQ 5000 ( if %wpainfo% GEQ 5000 (
call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" 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% "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." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
echo: echo:
@ -1649,7 +1616,6 @@ echo Checking WPA Registry Count [%wpainfo%]
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
call :dk_color %Red% "Checking Rearm [System is Rearmed]" call :dk_color %Red% "Checking Rearm [System is Rearmed]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
echo: echo:
) )
@ -1661,7 +1627,6 @@ set showfix=1
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
echo: echo:
) )
@ -1676,7 +1641,6 @@ set showfix=1
if %error_code% NEQ 0 ( if %error_code% NEQ 0 (
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -1706,7 +1670,6 @@ call :dk_color %Gray% "Checking Activation IDs [Key Not Installe
if not defined apps if not defined allapps ( if not defined apps if not defined allapps (
call :dk_color %Red% "Checking Activation IDs [Not found]" call :dk_color %Red% "Checking Activation IDs [Not found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -1716,7 +1679,6 @@ set showfix=1
) )
if not defined showfix if defined rlicfailed ( if not defined showfix if defined rlicfailed (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -1734,7 +1696,6 @@ if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Win
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( 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]" call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]"
if not defined showfix ( 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." 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 set fixes=%fixes% %mas%evaluation_editions
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
@ -1752,7 +1713,6 @@ set showfix=1
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( 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]" call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -1790,6 +1750,13 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" (
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
if not defined showfix (
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
) )
) )
) )
@ -1836,7 +1803,6 @@ if defined _sppint (
echo %_sppint% | find /i "PerfOptions" %nul% && ( echo %_sppint% | find /i "PerfOptions" %nul% && (
call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -1871,7 +1837,6 @@ if "!taskinfo!"=="" set "taskinfo=Not Found"
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
if not defined showfix ( if not defined showfix (
echo:
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"

View File

@ -1,4 +1,4 @@
@set masver=3.9 @set masver=3.10
@echo off @echo off
@ -269,7 +269,6 @@ REM check LanguageMode
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo FullLanguage mode not found in PowerShell. Aborting... echo FullLanguage mode not found in PowerShell. Aborting...
echo If you have applied restrictions on Powershell then undo those changes. echo If you have applied restrictions on Powershell then undo those changes.
echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
goto dk_done goto dk_done
@ -279,7 +278,6 @@ REM check Powershell core version
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( 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 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 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -290,7 +288,6 @@ REM check for Mal-ware that may cause issues with Powershell
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
echo "%%f" echo "%%f"
echo Mal%blank%ware found, PowerShell is not working properly. echo Mal%blank%ware found, PowerShell is not working properly.
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
goto dk_done goto dk_done
@ -302,7 +299,6 @@ if /i "!tstresult2!"=="FullLanguage" (
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
if !errorlevel!==3 ( if !errorlevel!==3 (
echo Windows Powershell failed to load .NET command. Aborting... echo Windows Powershell failed to load .NET command. Aborting...
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -323,7 +319,6 @@ 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 ', '))}""" 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 set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -456,7 +451,6 @@ goto :oh_menu
cls cls
if not defined terminal ( if not defined terminal (
mode 140, 32 mode 140, 32
if exist "%SysPath%\spp\store_test\" mode 140, 32
%psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=32;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" %nul% %psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=32;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" %nul%
) )
title Ohook Activation %masver% title Ohook Activation %masver%
@ -472,7 +466,6 @@ echo:
if not defined results ( if not defined results (
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
call :dk_color %Blue% "After that, restart system and try activation again." call :dk_color %Blue% "After that, restart system and try activation again."
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
) )
@ -571,11 +564,9 @@ call :dk_color %Red% "Checking Installed Office [Not Found]"
if defined ohub ( if defined ohub (
echo: 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 URL below, then try again."
call :dk_color %Blue% "Download and install Office from the below URL and then try again."
echo:
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
goto dk_done goto dk_done
@ -601,6 +592,26 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2
::======================================================================================================================================== ::========================================================================================================================================
:: Check Smart App Control
set "sacstate="
if %winbuild% GEQ 22621 (
for /f "tokens=3" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\CI\Policy" /v VerifiedAndReputablePolicyState %nul6%') do set "sacstate=%%a"
)
if defined sacstate (
if "%sacstate%"=="0x1" (
call :dk_color %Gray% "Checking Smart App Control State [Enabled]"
call :dk_color %Blue% "Smart App Control may prevent you from opening Office after Ohook activation."
call :dk_color %Blue% "You will need to disable it from the Windows Defender settings if it does."
) else if "%sacstate%"=="0x2" (
call :dk_color %Gray% "Checking Smart App Control State [Evaluation]"
call :dk_color %Blue% "Smart App Control may prevent you from opening Office in the future if it enables itself after the evaluation period."
call :dk_color %Blue% "It is recommended that you disable it from the Windows Defender settings."
)
)
::========================================================================================================================================
:: Process Office 15.0 C2R :: Process Office 15.0 C2R
if not defined o15c2r goto :starto16c2r if not defined o15c2r goto :starto16c2r
@ -770,7 +781,6 @@ echo Help: %mas%troubleshoot
) else ( ) else (
call :dk_color %Red% "Some errors were detected." call :dk_color %Red% "Some errors were detected."
if not defined ierror if not defined showfix call :dk_color %Blue% "%_fixmsg%" if not defined ierror if not defined showfix call :dk_color %Blue% "%_fixmsg%"
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
) )
@ -1616,7 +1626,6 @@ if %upk_result%==1 echo Uninstalling Other/Grace Keys [Successful]
if %upk_result%==2 ( if %upk_result%==2 (
call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
set showfix=1 set showfix=1
@ -1765,7 +1774,6 @@ echo %keyecho% %~1 [Successful]
call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%"
if not defined showfix ( if not defined showfix (
if defined altapplist call :dk_color %Red% "Activation ID not found for this key." if defined altapplist call :dk_color %Red% "Activation ID not found for this key."
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
set showfix=1 set showfix=1
@ -1859,7 +1867,6 @@ if %spperror% NEQ 1056 if %spperror% NEQ 0 (
%eline% %eline%
echo sc start %_slser% [Error Code: %spperror%] echo sc start %_slser% [Error Code: %spperror%]
if %spperror% EQU 1053 ( if %spperror% EQU 1053 (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and try again." 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." call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
) )
@ -1926,7 +1933,6 @@ if not "%results%%pupfound%"=="" (
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%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% "Checking Probable Mal%w%ware Infection..."
if defined results (call :dk_color %Red% "%results%"&set showfix=1) if defined results (call :dk_color %Red% "%results%"&set showfix=1)
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
echo: echo:
@ -1954,7 +1960,6 @@ call :dk_chkmal
sc query Null %nul% || ( sc query Null %nul% || (
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 ( if not defined showfix (
echo:
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
echo: echo:
) )
@ -1970,7 +1975,6 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot
call :dk_color %Red% "Checking WinPE [Found]" call :dk_color %Red% "Checking WinPE [Found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode."
echo: echo:
) )
@ -1985,7 +1989,6 @@ set showfix=1
if defined safeboot_option ( if defined safeboot_option (
call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode."
echo: echo:
) )
@ -2004,7 +2007,6 @@ if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]"
echo "%imagestate%" | find /i "RESEAL" %nul% && ( echo "%imagestate%" | find /i "RESEAL" %nul% && (
if not defined showfix ( 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." call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
echo: echo:
) )
@ -2013,7 +2015,6 @@ set showfix=1
) )
echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && (
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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 the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -2099,7 +2100,6 @@ if not defined showfix (
echo: echo:
echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && (
echo A registry fix has been applied to enable the disabled service. 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." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
) || ( ) || (
set fixes=%fixes% %mas%in-place_repair_upgrade set fixes=%fixes% %mas%in-place_repair_upgrade
@ -2140,7 +2140,6 @@ if not defined showfix (
set listwospp=%_serv:sppsvc=% set listwospp=%_serv:sppsvc=%
echo %serv_e% | findstr /i "!listwospp!" %nul% && ( echo %serv_e% | findstr /i "!listwospp!" %nul% && (
set showfix=1 set showfix=1
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
@ -2172,7 +2171,6 @@ if defined wmifailed (
call :dk_color %Red% "Checking WMI [Not Working]" call :dk_color %Red% "Checking WMI [Not Working]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option."
echo: echo:
) )
@ -2187,7 +2185,6 @@ set showfix=1
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% || ( 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]" call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers 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" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
echo: echo:
@ -2208,7 +2205,6 @@ if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\Net
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" ( 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!]" call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -2239,7 +2235,6 @@ call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creat
) else ( ) else (
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -2284,7 +2279,6 @@ if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
if defined permerror ( if defined permerror (
call :dk_color %Red% "Checking SPP Permissions [!permerror!]" call :dk_color %Red% "Checking SPP Permissions [!permerror!]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -2306,7 +2300,6 @@ if defined chkalp (
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
if not defined showfix ( if not defined showfix (
echo "%wpainfo%" | find /i "Error Found" %nul% && ( 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." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
echo: echo:
set error=1 set error=1
@ -2319,7 +2312,6 @@ set wpainfo=a
if not defined chkalp ( if not defined chkalp (
if %wpainfo% GEQ 5000 ( if %wpainfo% GEQ 5000 (
call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" 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% "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." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
echo: echo:
@ -2335,7 +2327,6 @@ echo Checking WPA Registry Count [%wpainfo%]
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
call :dk_color %Red% "Checking Rearm [System is Rearmed]" call :dk_color %Red% "Checking Rearm [System is Rearmed]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
echo: echo:
) )
@ -2347,7 +2338,6 @@ set showfix=1
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
echo: echo:
) )
@ -2362,7 +2352,6 @@ set showfix=1
if %error_code% NEQ 0 ( if %error_code% NEQ 0 (
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -2392,7 +2381,6 @@ call :dk_color %Gray% "Checking Activation IDs [Key Not Installe
if not defined apps if not defined allapps ( if not defined apps if not defined allapps (
call :dk_color %Red% "Checking Activation IDs [Not found]" call :dk_color %Red% "Checking Activation IDs [Not found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -2402,7 +2390,6 @@ set showfix=1
) )
if not defined showfix if defined rlicfailed ( if not defined showfix if defined rlicfailed (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -2420,7 +2407,6 @@ if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Win
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( 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]" call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]"
if not defined showfix ( 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." 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 set fixes=%fixes% %mas%evaluation_editions
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
@ -2438,7 +2424,6 @@ set showfix=1
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( 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]" call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -2476,6 +2461,13 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" (
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
if not defined showfix (
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
) )
) )
) )
@ -2522,7 +2514,6 @@ if defined _sppint (
echo %_sppint% | find /i "PerfOptions" %nul% && ( echo %_sppint% | find /i "PerfOptions" %nul% && (
call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -2557,7 +2548,6 @@ if "!taskinfo!"=="" set "taskinfo=Not Found"
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
if not defined showfix ( if not defined showfix (
echo:
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"

View File

@ -1,4 +1,4 @@
@set masver=3.9 @set masver=3.10
@echo off @echo off
@ -300,7 +300,6 @@ REM check LanguageMode
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo FullLanguage mode not found in PowerShell. Aborting... echo FullLanguage mode not found in PowerShell. Aborting...
echo If you have applied restrictions on Powershell then undo those changes. echo If you have applied restrictions on Powershell then undo those changes.
echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
goto dk_done goto dk_done
@ -310,7 +309,6 @@ REM check Powershell core version
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( 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 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 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -321,7 +319,6 @@ REM check for Mal-ware that may cause issues with Powershell
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
echo "%%f" echo "%%f"
echo Mal%blank%ware found, PowerShell is not working properly. echo Mal%blank%ware found, PowerShell is not working properly.
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
goto dk_done goto dk_done
@ -333,7 +330,6 @@ if /i "!tstresult2!"=="FullLanguage" (
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
if !errorlevel!==3 ( if !errorlevel!==3 (
echo Windows Powershell failed to load .NET command. Aborting... echo Windows Powershell failed to load .NET command. Aborting...
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -354,7 +350,6 @@ 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 ', '))}""" 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 set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -534,7 +529,6 @@ echo:
if not defined results ( if not defined results (
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
call :dk_color %Blue% "After that, restart system and try activation again." call :dk_color %Blue% "After that, restart system and try activation again."
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
) )
@ -816,9 +810,9 @@ call :dk_color %Red% "Checking Installed Office [Not Found]"
if defined ohub ( if defined ohub (
echo: 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.
) )
call :dk_color %Blue% "Download and install Office from below URL and try again." call :dk_color %Blue% "Download and install Office from the URL below, then try again."
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
goto :ks_activate goto :ks_activate
@ -1594,7 +1588,6 @@ if %upk_result%==1 echo Uninstalling Other/Grace Keys [Successful]
if %upk_result%==2 ( if %upk_result%==2 (
call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
set showfix=1 set showfix=1
@ -1648,7 +1641,6 @@ call :ks_clearstuff
set error_=9 set error_=9
echo Failed to completely clear %KS% Cache. 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. 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%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) || ( ) || (
@ -2739,7 +2731,6 @@ echo %keyecho% %~1 [Successful]
call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%"
if not defined showfix ( if not defined showfix (
if defined altapplist call :dk_color %Red% "Activation ID not found for this key." if defined altapplist call :dk_color %Red% "Activation ID not found for this key."
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
set showfix=1 set showfix=1
@ -2860,7 +2851,6 @@ if %spperror% NEQ 1056 if %spperror% NEQ 0 (
%eline% %eline%
echo sc start %_slser% [Error Code: %spperror%] echo sc start %_slser% [Error Code: %spperror%]
if %spperror% EQU 1053 ( if %spperror% EQU 1053 (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and try again." 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." call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
) )
@ -2987,7 +2977,6 @@ if not "%results%%pupfound%"=="" (
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%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% "Checking Probable Mal%w%ware Infection..."
if defined results (call :dk_color %Red% "%results%"&set showfix=1) if defined results (call :dk_color %Red% "%results%"&set showfix=1)
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
echo: echo:
@ -3015,7 +3004,6 @@ call :dk_chkmal
sc query Null %nul% || ( sc query Null %nul% || (
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 ( if not defined showfix (
echo:
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
echo: echo:
) )
@ -3031,7 +3019,6 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot
call :dk_color %Red% "Checking WinPE [Found]" call :dk_color %Red% "Checking WinPE [Found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode."
echo: echo:
) )
@ -3046,7 +3033,6 @@ set showfix=1
if defined safeboot_option ( if defined safeboot_option (
call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode."
echo: echo:
) )
@ -3065,7 +3051,6 @@ if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]"
echo "%imagestate%" | find /i "RESEAL" %nul% && ( echo "%imagestate%" | find /i "RESEAL" %nul% && (
if not defined showfix ( 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." call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
echo: echo:
) )
@ -3074,7 +3059,6 @@ set showfix=1
) )
echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && (
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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 the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -3160,7 +3144,6 @@ if not defined showfix (
echo: echo:
echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && (
echo A registry fix has been applied to enable the disabled service. 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." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
) || ( ) || (
set fixes=%fixes% %mas%in-place_repair_upgrade set fixes=%fixes% %mas%in-place_repair_upgrade
@ -3201,7 +3184,6 @@ if not defined showfix (
set listwospp=%_serv:sppsvc=% set listwospp=%_serv:sppsvc=%
echo %serv_e% | findstr /i "!listwospp!" %nul% && ( echo %serv_e% | findstr /i "!listwospp!" %nul% && (
set showfix=1 set showfix=1
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
@ -3233,7 +3215,6 @@ if defined wmifailed (
call :dk_color %Red% "Checking WMI [Not Working]" call :dk_color %Red% "Checking WMI [Not Working]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option."
echo: echo:
) )
@ -3248,7 +3229,6 @@ set showfix=1
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% || ( 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]" call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers 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" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
echo: echo:
@ -3269,7 +3249,6 @@ if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\Net
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" ( 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!]" call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -3300,7 +3279,6 @@ call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creat
) else ( ) else (
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -3345,7 +3323,6 @@ if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
if defined permerror ( if defined permerror (
call :dk_color %Red% "Checking SPP Permissions [!permerror!]" call :dk_color %Red% "Checking SPP Permissions [!permerror!]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -3367,7 +3344,6 @@ if defined chkalp (
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
if not defined showfix ( if not defined showfix (
echo "%wpainfo%" | find /i "Error Found" %nul% && ( 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." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
echo: echo:
set error=1 set error=1
@ -3380,7 +3356,6 @@ set wpainfo=a
if not defined chkalp ( if not defined chkalp (
if %wpainfo% GEQ 5000 ( if %wpainfo% GEQ 5000 (
call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" 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% "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." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
echo: echo:
@ -3396,7 +3371,6 @@ echo Checking WPA Registry Count [%wpainfo%]
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
call :dk_color %Red% "Checking Rearm [System is Rearmed]" call :dk_color %Red% "Checking Rearm [System is Rearmed]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
echo: echo:
) )
@ -3408,7 +3382,6 @@ set showfix=1
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
echo: echo:
) )
@ -3423,7 +3396,6 @@ set showfix=1
if %error_code% NEQ 0 ( if %error_code% NEQ 0 (
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -3453,7 +3425,6 @@ call :dk_color %Gray% "Checking Activation IDs [Key Not Installe
if not defined apps if not defined allapps ( if not defined apps if not defined allapps (
call :dk_color %Red% "Checking Activation IDs [Not found]" call :dk_color %Red% "Checking Activation IDs [Not found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -3463,7 +3434,6 @@ set showfix=1
) )
if not defined showfix if defined rlicfailed ( if not defined showfix if defined rlicfailed (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -3481,7 +3451,6 @@ if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Win
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( 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]" call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]"
if not defined showfix ( 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." 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 set fixes=%fixes% %mas%evaluation_editions
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
@ -3499,7 +3468,6 @@ set showfix=1
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( 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]" call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -3537,6 +3505,13 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" (
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
if not defined showfix (
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
) )
) )
) )
@ -3583,7 +3558,6 @@ if defined _sppint (
echo %_sppint% | find /i "PerfOptions" %nul% && ( echo %_sppint% | find /i "PerfOptions" %nul% && (
call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -3618,7 +3592,6 @@ if "!taskinfo!"=="" set "taskinfo=Not Found"
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
if not defined showfix ( if not defined showfix (
echo:
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"

View File

@ -1,4 +1,4 @@
@set masver=3.9 @set masver=3.10
@echo off @echo off
@ -212,7 +212,6 @@ call :dk_setvar
if %winbuild% EQU 1 ( if %winbuild% EQU 1 (
%eline% %eline%
echo Failed to detect Windows build number. echo Failed to detect Windows build number.
echo:
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
@ -327,7 +326,6 @@ REM check LanguageMode
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo FullLanguage mode not found in PowerShell. Aborting... echo FullLanguage mode not found in PowerShell. Aborting...
echo If you have applied restrictions on Powershell then undo those changes. echo If you have applied restrictions on Powershell then undo those changes.
echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
goto dk_done goto dk_done
@ -337,7 +335,6 @@ REM check Powershell core version
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( 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 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 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -348,7 +345,6 @@ REM check for Mal-ware that may cause issues with Powershell
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
echo "%%f" echo "%%f"
echo Mal%blank%ware found, PowerShell is not working properly. echo Mal%blank%ware found, PowerShell is not working properly.
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
goto dk_done goto dk_done
@ -360,7 +356,6 @@ if /i "!tstresult2!"=="FullLanguage" (
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
if !errorlevel!==3 ( if !errorlevel!==3 (
echo Windows Powershell failed to load .NET command. Aborting... echo Windows Powershell failed to load .NET command. Aborting...
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -381,7 +376,6 @@ 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 ', '))}""" 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 set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -604,7 +598,6 @@ echo:
if not defined results ( if not defined results (
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
call :dk_color %Blue% "After that, restart system and try activation again." call :dk_color %Blue% "After that, restart system and try activation again."
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
) )
@ -618,7 +611,6 @@ echo .NET 3.5 Framework is corrupt or missing. Aborting...
if exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-Embedded" ( if exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-Embedded" (
echo Install .NET Framework 4.8 and Windows Management Framework 5.1 echo Install .NET Framework 4.8 and Windows Management Framework 5.1
) )
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -632,7 +624,6 @@ if !errorlevel! EQU 1051 (
%eline% %eline%
echo Evaluation WLMS service is running, %_slser% service can not be stopped. Aborting... echo Evaluation WLMS service is running, %_slser% service can not be stopped. Aborting...
echo Install Non-Eval version for Windows build %winbuild%. echo Install Non-Eval version for Windows build %winbuild%.
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -1144,6 +1135,9 @@ f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-%w10EsuEditions%-%w10EsuE
1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% 1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-%w10EsuEditions%-%w10EsuEditionsLaterAdded%
83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% 83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-%w10EsuEditions%-%w10EsuEditionsLaterAdded%
0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-%w10EsuEditions%-%w10EsuEditionsLaterAdded% 0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-%w10EsuEditions%-%w10EsuEditionsLaterAdded%
REM WindowsServer2016
91bcac0a-d7d3-4d2b-bd0c-72fed675f01b_Server-ESU-Year3[1-3y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore-
4cd0ab30-73a4-4dde-972c-512f05be31df_Server-ESU-Year6[4-6y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore-
) do ( ) do (
for /f "tokens=1-3 delims=_" %%A in ("%%#") do ( for /f "tokens=1-3 delims=_" %%A in ("%%#") do (
echo "%allapps%" | find /i "%%A" %nul1% && ( echo "%allapps%" | find /i "%%A" %nul1% && (
@ -1199,7 +1193,7 @@ goto :ts_off
set esuavail= set esuavail=
if defined _vis if defined isServer set esuavail=1 if defined _vis if defined isServer set esuavail=1
if %winbuild% LEQ 7602 if not defined _vis if not defined isThinpc set esuavail=1 if %winbuild% LEQ 7602 if not defined _vis if not defined isThinpc set esuavail=1
if %winbuild% GTR 7602 if %winbuild% LSS 10240 if defined isServer set esuavail=1 if %winbuild% GTR 7602 if %winbuild% LEQ 14393 if defined isServer set esuavail=1
if %winbuild% GEQ 10240 if %winbuild% LEQ 19045 if not defined isServer set esuavail=1 if %winbuild% GEQ 10240 if %winbuild% LEQ 19045 if not defined isServer set esuavail=1
if %winbuild% EQU 9600 set esuavail=1 if %winbuild% EQU 9600 set esuavail=1
@ -1317,9 +1311,9 @@ call :dk_color %Gray% "Checking Installed Office [Not Found]"
if defined ohub ( if defined ohub (
echo: 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.
) )
call :dk_color %Blue% "Download and install Office from below URL and try again." call :dk_color %Blue% "Download and install Office from the URL below, then try again."
if %_actwin%==0 set fixes=%fixes% %mas%genuine-installation-media if %_actwin%==0 set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
goto :ts_act goto :ts_act
@ -2557,7 +2551,6 @@ if %upk_result%==1 echo Uninstalling Other/Grace Keys [Successful]
if %upk_result%==2 ( if %upk_result%==2 (
call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]" call :dk_color %Red% "Uninstalling Other/Grace Keys [Failed]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
set showfix=1 set showfix=1
@ -2793,7 +2786,6 @@ echo %keyecho% %~1 [Successful]
call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%" call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%"
if not defined showfix ( if not defined showfix (
if defined altapplist call :dk_color %Red% "Activation ID not found for this key." if defined altapplist call :dk_color %Red% "Activation ID not found for this key."
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
set showfix=1 set showfix=1
@ -2917,7 +2909,6 @@ if %spperror% NEQ 1056 if %spperror% NEQ 0 (
%eline% %eline%
echo sc start %_slser% [Error Code: %spperror%] echo sc start %_slser% [Error Code: %spperror%]
if %spperror% EQU 1053 ( if %spperror% EQU 1053 (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and try again." 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." call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
) )
@ -2999,7 +2990,6 @@ if not "%results%%pupfound%"=="" (
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%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% "Checking Probable Mal%w%ware Infection..."
if defined results (call :dk_color %Red% "%results%"&set showfix=1) if defined results (call :dk_color %Red% "%results%"&set showfix=1)
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
echo: echo:
@ -3027,7 +3017,6 @@ call :dk_chkmal
sc query Null %nul% || ( sc query Null %nul% || (
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 ( if not defined showfix (
echo:
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
echo: echo:
) )
@ -3043,7 +3032,6 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot
call :dk_color %Red% "Checking WinPE [Found]" call :dk_color %Red% "Checking WinPE [Found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode." call :dk_color %Blue% "WinPE mode found. Reboot the system and run in normal mode."
echo: echo:
) )
@ -3058,7 +3046,6 @@ set showfix=1
if defined safeboot_option ( if defined safeboot_option (
call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]" call :dk_color %Red% "Checking Boot Mode [%safeboot_option%]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode." call :dk_color %Blue% "Safe mode found. Reboot the system and run in normal mode."
echo: echo:
) )
@ -3077,7 +3064,6 @@ if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]" call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]"
echo "%imagestate%" | find /i "RESEAL" %nul% && ( echo "%imagestate%" | find /i "RESEAL" %nul% && (
if not defined showfix ( 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." call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
echo: echo:
) )
@ -3086,7 +3072,6 @@ set showfix=1
) )
echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && ( echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && (
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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 the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -3172,7 +3157,6 @@ if not defined showfix (
echo: echo:
echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && ( echo %serv_cste% | findstr /i "ClipSVC sppsvc" %nul% && (
echo A registry fix has been applied to enable the disabled service. 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." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
) || ( ) || (
set fixes=%fixes% %mas%in-place_repair_upgrade set fixes=%fixes% %mas%in-place_repair_upgrade
@ -3213,7 +3197,6 @@ if not defined showfix (
set listwospp=%_serv:sppsvc=% set listwospp=%_serv:sppsvc=%
echo %serv_e% | findstr /i "!listwospp!" %nul% && ( echo %serv_e% | findstr /i "!listwospp!" %nul% && (
set showfix=1 set showfix=1
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again." call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If service error is still not fixed, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
@ -3245,7 +3228,6 @@ if defined wmifailed (
call :dk_color %Red% "Checking WMI [Not Working]" call :dk_color %Red% "Checking WMI [Not Working]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option."
echo: echo:
) )
@ -3260,7 +3242,6 @@ set showfix=1
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% || ( 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]" call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers 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" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
echo: echo:
@ -3281,7 +3262,6 @@ if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\Net
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" ( 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!]" call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -3312,7 +3292,6 @@ call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creat
) else ( ) else (
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -3357,7 +3336,6 @@ if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
if defined permerror ( if defined permerror (
call :dk_color %Red% "Checking SPP Permissions [!permerror!]" call :dk_color %Red% "Checking SPP Permissions [!permerror!]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -3379,7 +3357,6 @@ if defined chkalp (
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
if not defined showfix ( if not defined showfix (
echo "%wpainfo%" | find /i "Error Found" %nul% && ( 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." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
echo: echo:
set error=1 set error=1
@ -3392,7 +3369,6 @@ set wpainfo=a
if not defined chkalp ( if not defined chkalp (
if %wpainfo% GEQ 5000 ( if %wpainfo% GEQ 5000 (
call :dk_color %Gray% "Checking WPA Registry Count [%wpainfo%]" 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% "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." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
echo: echo:
@ -3408,7 +3384,6 @@ echo Checking WPA Registry Count [%wpainfo%]
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && ( reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
call :dk_color %Red% "Checking Rearm [System is Rearmed]" call :dk_color %Red% "Checking Rearm [System is Rearmed]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
echo: echo:
) )
@ -3420,7 +3395,6 @@ set showfix=1
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]" call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
echo: echo:
) )
@ -3435,7 +3409,6 @@ set showfix=1
if %error_code% NEQ 0 ( if %error_code% NEQ 0 (
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]" call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -3465,7 +3438,6 @@ call :dk_color %Gray% "Checking Activation IDs [Key Not Installe
if not defined apps if not defined allapps ( if not defined apps if not defined allapps (
call :dk_color %Red% "Checking Activation IDs [Not found]" call :dk_color %Red% "Checking Activation IDs [Not found]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -3475,7 +3447,6 @@ set showfix=1
) )
if not defined showfix if defined rlicfailed ( if not defined showfix if defined rlicfailed (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option." call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
echo: echo:
@ -3493,7 +3464,6 @@ if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Win
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || ( 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]" call :dk_color %Red% "Checking Eval Packages [License swapping found. Non-Eval licenses are installed in Eval Windows]"
if not defined showfix ( 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." 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 set fixes=%fixes% %mas%evaluation_editions
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
@ -3511,7 +3481,6 @@ set showfix=1
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( 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]" call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
if not defined showfix ( if not defined showfix (
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
echo: echo:
@ -3549,6 +3518,13 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" ( if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" (
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
if not defined showfix (
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
) )
) )
) )
@ -3595,7 +3571,6 @@ if defined _sppint (
echo %_sppint% | find /i "PerfOptions" %nul% && ( echo %_sppint% | find /i "PerfOptions" %nul% && (
call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]"
if not defined showfix ( if not defined showfix (
echo:
call :dk_color %Blue% "%_fixmsg%" call :dk_color %Blue% "%_fixmsg%"
echo: echo:
) )
@ -3630,7 +3605,6 @@ if "!taskinfo!"=="" set "taskinfo=Not Found"
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]" call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
if not defined showfix ( if not defined showfix (
echo:
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && ( echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"

View File

@ -1,4 +1,4 @@
@set masver=3.9 @set masver=3.10
@echo off @echo off
@ -214,7 +214,6 @@ REM check LanguageMode
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo FullLanguage mode not found in PowerShell. Aborting... echo FullLanguage mode not found in PowerShell. Aborting...
echo If you have applied restrictions on Powershell then undo those changes. echo If you have applied restrictions on Powershell then undo those changes.
echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
goto dk_done goto dk_done
@ -224,7 +223,6 @@ REM check Powershell core version
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( 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 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 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -235,7 +233,6 @@ REM check for Mal-ware that may cause issues with Powershell
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
echo "%%f" echo "%%f"
echo Mal%blank%ware found, PowerShell is not working properly. echo Mal%blank%ware found, PowerShell is not working properly.
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
goto dk_done goto dk_done
@ -247,7 +244,6 @@ if /i "!tstresult2!"=="FullLanguage" (
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
if !errorlevel!==3 ( if !errorlevel!==3 (
echo Windows Powershell failed to load .NET command. Aborting... echo Windows Powershell failed to load .NET command. Aborting...
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -268,7 +264,6 @@ 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 ', '))}""" 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 set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -397,7 +392,6 @@ if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISE
if %osedition%==0 ( if %osedition%==0 (
%eline% %eline%
echo Failed to detect OS Edition. Aborting... echo Failed to detect OS Edition. Aborting...
echo:
call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." call :dk_color %Blue% "To fix this issue, activate Windows from the main menu."
goto dk_done goto dk_done
) )
@ -417,7 +411,6 @@ if not defined o16c2r_reg (
%eline% %eline%
echo Office C2R 2016 or later is not installed, which is required for this script. echo Office C2R 2016 or later is not installed, which is required for this script.
echo Download and install Office from below URL and try again. echo Download and install Office from below URL and try again.
echo:
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
goto dk_done goto dk_done
@ -434,7 +427,6 @@ if %verchk% LSS 9029 (
echo Installed Office version is %_version%. echo Installed Office version is %_version%.
echo Minimum required version is 16.0.9029.2167 echo Minimum required version is 16.0.9029.2167
echo Aborting... echo Aborting...
echo:
call :dk_color %Blue% "Download and install latest Office from below URL and try again." call :dk_color %Blue% "Download and install latest Office from below URL and try again."
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
@ -457,7 +449,6 @@ _masterxml
if not defined %%A ( if not defined %%A (
%eline% %eline%
echo Failed to find %%A. Aborting... echo Failed to find %%A. Aborting...
echo:
call :dk_color %Blue% "Download and install Office from below URL and try again." call :dk_color %Blue% "Download and install Office from below URL and try again."
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
@ -470,7 +461,6 @@ if %winbuild% LSS 10240 if defined ltscfound (
echo Installed Office appears to be from the Volume channel %ltsc19%%ltsc21%%ltsc24%, echo Installed Office appears to be from the Volume channel %ltsc19%%ltsc21%%ltsc24%,
echo which is not officially supported on your Windows build version %winbuild%. echo which is not officially supported on your Windows build version %winbuild%.
echo Aborting... echo Aborting...
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -484,7 +474,6 @@ if defined unsupbuild (
%eline% %eline%
echo Unsupported Office %verchk% is installed on your Windows build version %winbuild%. echo Unsupported Office %verchk% is installed on your Windows build version %winbuild%.
echo Aborting... echo Aborting...
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -591,7 +580,6 @@ mode 98, 45
if not exist %SystemRoot%\Temp\%list%.txt ( if not exist %SystemRoot%\Temp\%list%.txt (
%eline% %eline%
echo Failed to generate available editions list. echo Failed to generate available editions list.
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto :oe_goback goto :oe_goback
@ -656,7 +644,6 @@ set suites=1
if not exist %SystemRoot%\Temp\getAppIds.txt ( if not exist %SystemRoot%\Temp\getAppIds.txt (
%eline% %eline%
echo Failed to generate available apps list. echo Failed to generate available apps list.
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto :oe_goback goto :oe_goback
@ -809,7 +796,6 @@ if /i "%_lang%"=="%%#" set langmatched=1
if not defined langmatched ( if not defined langmatched (
%eline% %eline%
echo %_lang% language is not available for Project/Visio apps. echo %_lang% language is not available for Project/Visio apps.
echo:
call :dk_color %Blue% "Install Office in the supported language for Project/Visio from the below URL." call :dk_color %Blue% "Install Office in the supported language for Project/Visio from the below URL."
set fixes=%fixes% %mas%genuine-installation-media set fixes=%fixes% %mas%genuine-installation-media
call :dk_color %_Yellow% "%mas%genuine-installation-media" call :dk_color %_Yellow% "%mas%genuine-installation-media"
@ -1176,7 +1162,6 @@ goto :oe_goback
if not defined build ( if not defined build (
%eline% %eline%
call :dk_color %Red% "Failed to detect build number for the target FFN." call :dk_color %Red% "Failed to detect build number for the target FFN."
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto :oe_goback goto :oe_goback
@ -1214,7 +1199,6 @@ for /l %%i in (1,1,30) do (if !clverchk! LSS %buildchk% (call :ch_getinfo&timeou
if %clverchk% LSS %buildchk% ( if %clverchk% LSS %buildchk% (
echo: echo:
call :dk_color %Red% "Failed to update Office C2R client. Aborting..." call :dk_color %Red% "Failed to update Office C2R client. Aborting..."
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto :oe_goback goto :oe_goback
@ -1617,7 +1601,6 @@ if %spperror% NEQ 1056 if %spperror% NEQ 0 (
%eline% %eline%
echo sc start %_slser% [Error Code: %spperror%] echo sc start %_slser% [Error Code: %spperror%]
if %spperror% EQU 1053 ( if %spperror% EQU 1053 (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and try again." 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." call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
) )

View File

@ -1,4 +1,4 @@
@set masver=3.9 @set masver=3.10
@echo off @echo off
@ -219,7 +219,6 @@ REM check LanguageMode
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo FullLanguage mode not found in PowerShell. Aborting... echo FullLanguage mode not found in PowerShell. Aborting...
echo If you have applied restrictions on Powershell then undo those changes. echo If you have applied restrictions on Powershell then undo those changes.
echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
goto dk_done goto dk_done
@ -229,7 +228,6 @@ REM check Powershell core version
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( 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 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 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -240,7 +238,6 @@ REM check for Mal-ware that may cause issues with Powershell
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
echo "%%f" echo "%%f"
echo Mal%blank%ware found, PowerShell is not working properly. echo Mal%blank%ware found, PowerShell is not working properly.
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
goto dk_done goto dk_done
@ -252,7 +249,6 @@ if /i "!tstresult2!"=="FullLanguage" (
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
if !errorlevel!==3 ( if !errorlevel!==3 (
echo Windows Powershell failed to load .NET command. Aborting... echo Windows Powershell failed to load .NET command. Aborting...
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -273,7 +269,6 @@ 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 ', '))}""" 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 set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -395,10 +390,8 @@ dism.exe
if not exist %SysPath%\%%# ( if not exist %SysPath%\%%# (
%eline% %eline%
echo [%SysPath%\%%#] file is missing, aborting... echo [%SysPath%\%%#] file is missing, aborting...
echo:
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options." call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
call :dk_color %Blue% "After that, restart system and try activation again." call :dk_color %Blue% "After that, restart system and try activation again."
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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" call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -431,7 +424,6 @@ call :dk_actids 55c92734-d682-4d71-983e-d6ec3f16059f
if not defined allapps ( if not defined allapps (
%eline% %eline%
echo Failed to find activation IDs. Aborting... echo Failed to find activation IDs. Aborting...
echo:
call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." call :dk_color %Blue% "To fix this issue, activate Windows from the main menu."
goto dk_done goto dk_done
) )
@ -453,7 +445,6 @@ if not defined osedition %chkedi% do if not errorlevel 1 (call set "osedition=%%
if not defined osedition ( if not defined osedition (
%eline% %eline%
echo Failed to detect OS edition, aborting... echo Failed to detect OS edition, aborting...
echo:
call :dk_color %Blue% "To fix this issue, activate Windows from the main menu." call :dk_color %Blue% "To fix this issue, activate Windows from the main menu."
goto dk_done goto dk_done
) )
@ -618,7 +609,6 @@ if not defined key (
%eline% %eline%
echo [%targetedition% ^| %winbuild%] echo [%targetedition% ^| %winbuild%]
echo Failed to get product key from pkeyhelper.dll. echo Failed to get product key from pkeyhelper.dll.
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -673,7 +663,6 @@ echo:
call :dk_color %Gray% "Reboot is required to fully change the edition." call :dk_color %Gray% "Reboot is required to fully change the edition."
) else ( ) else (
call :dk_color %Red% "[Unsuccessful] [Error Code: !keyerror!]" call :dk_color %Red% "[Unsuccessful] [Error Code: !keyerror!]"
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
) )
@ -754,7 +743,6 @@ if not defined key (
%eline% %eline%
echo [%targetedition% ^| %winbuild%] echo [%targetedition% ^| %winbuild%]
echo Failed to get product key from pkeyhelper.dll. echo Failed to get product key from pkeyhelper.dll.
echo:
set fixes=%fixes% %mas%troubleshoot set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -972,7 +960,6 @@ if %spperror% NEQ 1056 if %spperror% NEQ 0 (
%eline% %eline%
echo sc start %_slser% [Error Code: %spperror%] echo sc start %_slser% [Error Code: %spperror%]
if %spperror% EQU 1053 ( if %spperror% EQU 1053 (
echo:
call :dk_color %Blue% "Reboot your machine using the restart option and try again." 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." call :dk_color %Blue% "If it still does not work, go back to Main Menu, select Troubleshoot and run Fix WPA Registry option."
) )

View File

@ -1,9 +1,12 @@
@echo off @echo off
::============================================================================
::
:: Check-Activation-Status :: Check-Activation-Status
:: Written by @abbodi1406 :: Written by @abbodi1406
:: https://gravesoft.dev/cas ::
::============================================================================
:: Set Environment variables, it helps if they are misconfigured in the system :: Set Environment variables, it helps if they are misconfigured in the system

View File

@ -1,4 +1,4 @@
@set masver=3.9 @set masver=3.10
@echo off @echo off
@ -230,7 +230,6 @@ REM check LanguageMode
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo FullLanguage mode not found in PowerShell. Aborting... echo FullLanguage mode not found in PowerShell. Aborting...
echo If you have applied restrictions on Powershell then undo those changes. echo If you have applied restrictions on Powershell then undo those changes.
echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
goto done2 goto done2
@ -240,7 +239,6 @@ REM check Powershell core version
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( 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 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 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto done2 goto done2
@ -251,7 +249,6 @@ REM check for Mal-ware that may cause issues with Powershell
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
echo "%%f" echo "%%f"
echo Mal%blank%ware found, PowerShell is not working properly. echo Mal%blank%ware found, PowerShell is not working properly.
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
goto done2 goto done2
@ -263,7 +260,6 @@ if /i "!tstresult2!"=="FullLanguage" (
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
if !errorlevel!==3 ( if !errorlevel!==3 (
echo Windows Powershell failed to load .NET command. Aborting... echo Windows Powershell failed to load .NET command. Aborting...
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto done2 goto done2
@ -284,7 +280,6 @@ 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 ', '))}""" 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 set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto done2 goto done2

View File

@ -1,4 +1,4 @@
@set masver=3.9 @set masver=3.10
@echo off @echo off
@ -231,7 +231,6 @@ REM check LanguageMode
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && ( echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo FullLanguage mode not found in PowerShell. Aborting... echo FullLanguage mode not found in PowerShell. Aborting...
echo If you have applied restrictions on Powershell then undo those changes. echo If you have applied restrictions on Powershell then undo those changes.
echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
goto dk_done goto dk_done
@ -241,7 +240,6 @@ REM check Powershell core version
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && ( 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 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 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -252,7 +250,6 @@ REM check for Mal-ware that may cause issues with Powershell
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" ( for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
echo "%%f" echo "%%f"
echo Mal%blank%ware found, PowerShell is not working properly. echo Mal%blank%ware found, PowerShell is not working properly.
echo:
set fixes=%fixes% %mas%remove_mal%w%ware set fixes=%fixes% %mas%remove_mal%w%ware
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
goto dk_done goto dk_done
@ -264,7 +261,6 @@ if /i "!tstresult2!"=="FullLanguage" (
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul% cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
if !errorlevel!==3 ( if !errorlevel!==3 (
echo Windows Powershell failed to load .NET command. Aborting... echo Windows Powershell failed to load .NET command. Aborting...
echo:
set fixes=%fixes% %mas%in-place_repair_upgrade 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_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
goto dk_done goto dk_done
@ -285,7 +281,6 @@ 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 ', '))}""" 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 set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot" call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
@ -1165,7 +1160,6 @@ sc query Winmgmt | find /i "STOPPED" %nul% && (
echo [Successful] echo [Successful]
) || ( ) || (
call :dk_color %Red% "[Failed]" call :dk_color %Red% "[Failed]"
echo:
call :dk_color %Blue% "Its recommended to select [Restart] option and then apply Fix WMI option again." call :dk_color %Blue% "Its recommended to select [Restart] option and then apply Fix WMI option again."
echo %line% echo %line%
echo: echo:

View File

@ -80,5 +80,5 @@
--- ---
Latest Version: 3.9 Latest Version: 3.10
Release date: 19-Nov-2025 Release date: 19-Nov-2025