mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2026-02-04 06:03:24 +08:00
Compare commits
No commits in common. "d33dfc9ce69cf4b758076decd65e9ee18c882313" and "da9358e4d8db97e0bd2b05aa783cede36372680b" have entirely different histories.
d33dfc9ce6
...
da9358e4d8
@ -1,5 +1,5 @@
|
|||||||
@::ab7249d77random13141b5922144806de5d43f
|
@::ab7249d77random13141b5922144806de5d43f
|
||||||
@set masver=3.10
|
@set masver=3.9
|
||||||
@setlocal DisableDelayedExpansion
|
@setlocal DisableDelayedExpansion
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
@ -239,6 +239,7 @@ 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
|
||||||
@ -248,6 +249,7 @@ 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
|
||||||
@ -258,6 +260,7 @@ 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
|
||||||
@ -269,6 +272,7 @@ 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
|
||||||
@ -289,6 +293,7 @@ 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
|
||||||
@ -674,6 +679,7 @@ 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
|
||||||
)
|
)
|
||||||
@ -711,6 +717,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -757,6 +764,7 @@ 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
|
||||||
@ -957,6 +965,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1028,6 +1037,7 @@ 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:
|
||||||
@ -1043,6 +1053,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1050,6 +1061,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1068,10 +1080,12 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1082,6 +1096,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1096,6 +1111,7 @@ 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:
|
||||||
@ -1307,6 +1323,7 @@ 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
|
||||||
@ -1448,6 +1465,7 @@ 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."
|
||||||
)
|
)
|
||||||
@ -1529,6 +1547,7 @@ 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:
|
||||||
@ -1556,6 +1575,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1571,6 +1591,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1585,6 +1606,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1603,6 +1625,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1611,6 +1634,7 @@ 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:
|
||||||
@ -1696,6 +1720,7 @@ 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
|
||||||
@ -1736,6 +1761,7 @@ 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"
|
||||||
@ -1767,6 +1793,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1781,6 +1808,7 @@ 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:
|
||||||
@ -1801,6 +1829,7 @@ 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:
|
||||||
@ -1831,6 +1860,7 @@ 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:
|
||||||
@ -1875,6 +1905,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1896,6 +1927,7 @@ 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
|
||||||
@ -1908,6 +1940,7 @@ 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:
|
||||||
@ -1923,6 +1956,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1934,6 +1968,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1948,6 +1983,7 @@ 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:
|
||||||
@ -1977,6 +2013,7 @@ 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:
|
||||||
@ -1986,6 +2023,7 @@ 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:
|
||||||
@ -2003,6 +2041,7 @@ 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"
|
||||||
@ -2020,6 +2059,7 @@ 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:
|
||||||
@ -2057,13 +2097,6 @@ 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
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -2110,6 +2143,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -2144,6 +2178,7 @@ 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"
|
||||||
@ -2524,6 +2559,7 @@ 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%
|
||||||
@ -2539,6 +2575,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -2639,9 +2676,11 @@ 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 the URL below, then try again."
|
echo:
|
||||||
|
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
|
||||||
@ -2667,26 +2706,6 @@ 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
|
||||||
@ -2856,6 +2875,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -3701,6 +3721,7 @@ 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
|
||||||
@ -4523,6 +4544,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -4536,6 +4558,7 @@ 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
|
||||||
@ -4549,6 +4572,7 @@ 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
|
||||||
@ -5060,9 +5084,6 @@ 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% && (
|
||||||
@ -5118,7 +5139,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 14393 if defined isServer set esuavail=1
|
if %winbuild% GTR 7602 if %winbuild% LSS 10240 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
|
||||||
|
|
||||||
@ -5236,9 +5257,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 the URL below, then try again."
|
call :dk_color %Blue% "Download and install Office from below URL and 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
|
||||||
@ -12194,6 +12215,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -12475,9 +12497,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 the URL below, then 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"
|
||||||
goto :ks_activate
|
goto :ks_activate
|
||||||
@ -12956,6 +12978,7 @@ 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:
|
||||||
) || (
|
) || (
|
||||||
@ -16781,6 +16804,7 @@ 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:
|
||||||
@ -17202,8 +17226,10 @@ 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
|
||||||
@ -17236,6 +17262,7 @@ 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
|
||||||
)
|
)
|
||||||
@ -17257,6 +17284,7 @@ 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
|
||||||
)
|
)
|
||||||
@ -17421,6 +17449,7 @@ 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
|
||||||
@ -17475,6 +17504,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -17555,6 +17585,7 @@ 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
|
||||||
@ -18089,6 +18120,7 @@ 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
|
||||||
)
|
)
|
||||||
@ -18108,6 +18140,7 @@ 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
|
||||||
@ -18124,6 +18157,7 @@ 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"
|
||||||
@ -18146,6 +18180,7 @@ _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"
|
||||||
@ -18158,6 +18193,7 @@ 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
|
||||||
@ -18171,6 +18207,7 @@ 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
|
||||||
@ -18277,6 +18314,7 @@ 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
|
||||||
@ -18341,6 +18379,7 @@ 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
|
||||||
@ -18493,6 +18532,7 @@ 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"
|
||||||
@ -18859,6 +18899,7 @@ 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
|
||||||
@ -18896,6 +18937,7 @@ 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
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.10
|
@set masver=3.9
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -187,6 +187,7 @@ 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
|
||||||
)
|
)
|
||||||
@ -260,6 +261,7 @@ 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
|
||||||
@ -269,6 +271,7 @@ 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
|
||||||
@ -279,6 +282,7 @@ 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
|
||||||
@ -290,6 +294,7 @@ 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
|
||||||
@ -310,6 +315,7 @@ 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
|
||||||
@ -420,6 +426,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -466,6 +473,7 @@ 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
|
||||||
@ -666,6 +674,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -737,6 +746,7 @@ 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:
|
||||||
@ -752,6 +762,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -759,6 +770,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -777,10 +789,12 @@ 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:
|
||||||
)
|
)
|
||||||
@ -791,6 +805,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -805,6 +820,7 @@ 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:
|
||||||
@ -1016,6 +1032,7 @@ 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
|
||||||
@ -1141,6 +1158,7 @@ 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."
|
||||||
)
|
)
|
||||||
@ -1222,6 +1240,7 @@ 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:
|
||||||
@ -1249,6 +1268,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1264,6 +1284,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1278,6 +1299,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1296,6 +1318,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1304,6 +1327,7 @@ 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:
|
||||||
@ -1389,6 +1413,7 @@ 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
|
||||||
@ -1429,6 +1454,7 @@ 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"
|
||||||
@ -1460,6 +1486,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1474,6 +1501,7 @@ 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:
|
||||||
@ -1494,6 +1522,7 @@ 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:
|
||||||
@ -1524,6 +1553,7 @@ 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:
|
||||||
@ -1568,6 +1598,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1589,6 +1620,7 @@ 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
|
||||||
@ -1601,6 +1633,7 @@ 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:
|
||||||
@ -1616,6 +1649,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1627,6 +1661,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1641,6 +1676,7 @@ 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:
|
||||||
@ -1670,6 +1706,7 @@ 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:
|
||||||
@ -1679,6 +1716,7 @@ 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:
|
||||||
@ -1696,6 +1734,7 @@ 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"
|
||||||
@ -1713,6 +1752,7 @@ 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:
|
||||||
@ -1750,13 +1790,6 @@ 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
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -1803,6 +1836,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1837,6 +1871,7 @@ 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"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.10
|
@set masver=3.9
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -269,6 +269,7 @@ 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
|
||||||
@ -278,6 +279,7 @@ 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
|
||||||
@ -288,6 +290,7 @@ 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
|
||||||
@ -299,6 +302,7 @@ 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
|
||||||
@ -319,6 +323,7 @@ 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
|
||||||
@ -451,6 +456,7 @@ 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%
|
||||||
@ -466,6 +472,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -564,9 +571,11 @@ 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 the URL below, then try again."
|
echo:
|
||||||
|
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
|
||||||
@ -592,26 +601,6 @@ 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
|
||||||
@ -781,6 +770,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -1626,6 +1616,7 @@ 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
|
||||||
@ -1774,6 +1765,7 @@ 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
|
||||||
@ -1867,6 +1859,7 @@ 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."
|
||||||
)
|
)
|
||||||
@ -1933,6 +1926,7 @@ 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:
|
||||||
@ -1960,6 +1954,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1975,6 +1970,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -1989,6 +1985,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -2007,6 +2004,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -2015,6 +2013,7 @@ 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:
|
||||||
@ -2100,6 +2099,7 @@ 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,6 +2140,7 @@ 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"
|
||||||
@ -2171,6 +2172,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -2185,6 +2187,7 @@ 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:
|
||||||
@ -2205,6 +2208,7 @@ 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:
|
||||||
@ -2235,6 +2239,7 @@ 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:
|
||||||
@ -2279,6 +2284,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -2300,6 +2306,7 @@ 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
|
||||||
@ -2312,6 +2319,7 @@ 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:
|
||||||
@ -2327,6 +2335,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -2338,6 +2347,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -2352,6 +2362,7 @@ 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:
|
||||||
@ -2381,6 +2392,7 @@ 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:
|
||||||
@ -2390,6 +2402,7 @@ 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:
|
||||||
@ -2407,6 +2420,7 @@ 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"
|
||||||
@ -2424,6 +2438,7 @@ 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:
|
||||||
@ -2461,13 +2476,6 @@ 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
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -2514,6 +2522,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -2548,6 +2557,7 @@ 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"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.10
|
@set masver=3.9
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -300,6 +300,7 @@ 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
|
||||||
@ -309,6 +310,7 @@ 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
|
||||||
@ -319,6 +321,7 @@ 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
|
||||||
@ -330,6 +333,7 @@ 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
|
||||||
@ -350,6 +354,7 @@ 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
|
||||||
@ -529,6 +534,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -810,9 +816,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 the URL below, then 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"
|
||||||
goto :ks_activate
|
goto :ks_activate
|
||||||
@ -1588,6 +1594,7 @@ 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
|
||||||
@ -1641,6 +1648,7 @@ 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:
|
||||||
) || (
|
) || (
|
||||||
@ -2731,6 +2739,7 @@ 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
|
||||||
@ -2851,6 +2860,7 @@ 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."
|
||||||
)
|
)
|
||||||
@ -2977,6 +2987,7 @@ 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:
|
||||||
@ -3004,6 +3015,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3019,6 +3031,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3033,6 +3046,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3051,6 +3065,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3059,6 +3074,7 @@ 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:
|
||||||
@ -3144,6 +3160,7 @@ 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
|
||||||
@ -3184,6 +3201,7 @@ 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"
|
||||||
@ -3215,6 +3233,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3229,6 +3248,7 @@ 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:
|
||||||
@ -3249,6 +3269,7 @@ 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:
|
||||||
@ -3279,6 +3300,7 @@ 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:
|
||||||
@ -3323,6 +3345,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3344,6 +3367,7 @@ 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
|
||||||
@ -3356,6 +3380,7 @@ 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:
|
||||||
@ -3371,6 +3396,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3382,6 +3408,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3396,6 +3423,7 @@ 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:
|
||||||
@ -3425,6 +3453,7 @@ 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:
|
||||||
@ -3434,6 +3463,7 @@ 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:
|
||||||
@ -3451,6 +3481,7 @@ 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"
|
||||||
@ -3468,6 +3499,7 @@ 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:
|
||||||
@ -3505,13 +3537,6 @@ 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
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -3558,6 +3583,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3592,6 +3618,7 @@ 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"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.10
|
@set masver=3.9
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -212,6 +212,7 @@ 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"
|
||||||
@ -326,6 +327,7 @@ 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
|
||||||
@ -335,6 +337,7 @@ 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
|
||||||
@ -345,6 +348,7 @@ 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
|
||||||
@ -356,6 +360,7 @@ 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
|
||||||
@ -376,6 +381,7 @@ 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
|
||||||
@ -598,6 +604,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -611,6 +618,7 @@ 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
|
||||||
@ -624,6 +632,7 @@ 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
|
||||||
@ -1135,9 +1144,6 @@ 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% && (
|
||||||
@ -1193,7 +1199,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% LEQ 14393 if defined isServer set esuavail=1
|
if %winbuild% GTR 7602 if %winbuild% LSS 10240 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
|
||||||
|
|
||||||
@ -1311,9 +1317,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 the URL below, then try again."
|
call :dk_color %Blue% "Download and install Office from below URL and 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
|
||||||
@ -2551,6 +2557,7 @@ 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
|
||||||
@ -2786,6 +2793,7 @@ 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
|
||||||
@ -2909,6 +2917,7 @@ 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."
|
||||||
)
|
)
|
||||||
@ -2990,6 +2999,7 @@ 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:
|
||||||
@ -3017,6 +3027,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3032,6 +3043,7 @@ 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,6 +3058,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3064,6 +3077,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3072,6 +3086,7 @@ 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:
|
||||||
@ -3157,6 +3172,7 @@ 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
|
||||||
@ -3197,6 +3213,7 @@ 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"
|
||||||
@ -3228,6 +3245,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3242,6 +3260,7 @@ 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:
|
||||||
@ -3262,6 +3281,7 @@ 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:
|
||||||
@ -3292,6 +3312,7 @@ 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:
|
||||||
@ -3336,6 +3357,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3357,6 +3379,7 @@ 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
|
||||||
@ -3369,6 +3392,7 @@ 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:
|
||||||
@ -3384,6 +3408,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3395,6 +3420,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3409,6 +3435,7 @@ 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:
|
||||||
@ -3438,6 +3465,7 @@ 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:
|
||||||
@ -3447,6 +3475,7 @@ 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:
|
||||||
@ -3464,6 +3493,7 @@ 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"
|
||||||
@ -3481,6 +3511,7 @@ 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:
|
||||||
@ -3518,13 +3549,6 @@ 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
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -3571,6 +3595,7 @@ 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:
|
||||||
)
|
)
|
||||||
@ -3605,6 +3630,7 @@ 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"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.10
|
@set masver=3.9
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -214,6 +214,7 @@ 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
|
||||||
@ -223,6 +224,7 @@ 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
|
||||||
@ -233,6 +235,7 @@ 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
|
||||||
@ -244,6 +247,7 @@ 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
|
||||||
@ -264,6 +268,7 @@ 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
|
||||||
@ -392,6 +397,7 @@ 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
|
||||||
)
|
)
|
||||||
@ -411,6 +417,7 @@ 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
|
||||||
@ -427,6 +434,7 @@ 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"
|
||||||
@ -449,6 +457,7 @@ _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"
|
||||||
@ -461,6 +470,7 @@ 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
|
||||||
@ -474,6 +484,7 @@ 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
|
||||||
@ -580,6 +591,7 @@ 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
|
||||||
@ -644,6 +656,7 @@ 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
|
||||||
@ -796,6 +809,7 @@ 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"
|
||||||
@ -1162,6 +1176,7 @@ 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
|
||||||
@ -1199,6 +1214,7 @@ 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
|
||||||
@ -1601,6 +1617,7 @@ 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."
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.10
|
@set masver=3.9
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -219,6 +219,7 @@ 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
|
||||||
@ -228,6 +229,7 @@ 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
|
||||||
@ -238,6 +240,7 @@ 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
|
||||||
@ -249,6 +252,7 @@ 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
|
||||||
@ -269,6 +273,7 @@ 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
|
||||||
@ -390,8 +395,10 @@ 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
|
||||||
@ -424,6 +431,7 @@ 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
|
||||||
)
|
)
|
||||||
@ -445,6 +453,7 @@ 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
|
||||||
)
|
)
|
||||||
@ -609,6 +618,7 @@ 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
|
||||||
@ -663,6 +673,7 @@ 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"
|
||||||
)
|
)
|
||||||
@ -743,6 +754,7 @@ 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
|
||||||
@ -960,6 +972,7 @@ 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."
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,12 +1,9 @@
|
|||||||
@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
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.10
|
@set masver=3.9
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -230,6 +230,7 @@ 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
|
||||||
@ -239,6 +240,7 @@ 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
|
||||||
@ -249,6 +251,7 @@ 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
|
||||||
@ -260,6 +263,7 @@ 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
|
||||||
@ -280,6 +284,7 @@ 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
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@set masver=3.10
|
@set masver=3.9
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
@ -231,6 +231,7 @@ 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
|
||||||
@ -240,6 +241,7 @@ 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
|
||||||
@ -250,6 +252,7 @@ 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
|
||||||
@ -261,6 +264,7 @@ 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
|
||||||
@ -281,6 +285,7 @@ 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
|
||||||
@ -1160,6 +1165,7 @@ 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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user