Compare commits
7 Commits
416b4f2142
...
5ebc9f71a8
Author | SHA1 | Date |
---|---|---|
WindowsAddict | 5ebc9f71a8 | |
WindowsAddict | be0e5b8f19 | |
WindowsAddict | 6e2324416c | |
WindowsAddict | 2674528a55 | |
WindowsAddict | 242badaa1c | |
WindowsAddict | 97251fa6a6 | |
WindowsAddict | 7733f6ccda |
|
@ -104,7 +104,7 @@ set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/"
|
|||
sc query Null | find /i "RUNNING"
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo:
|
||||
echo The Null service, which is required for the script to operate, is not running.
|
||||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -119,7 +119,7 @@ cls
|
|||
pushd "%~dp0"
|
||||
>nul findstr /v "$" "%~nx0" && (
|
||||
echo:
|
||||
echo Error - The script either has an LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -236,7 +236,7 @@ goto dk_done
|
|||
%nul1% fltmc || (
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs administrator rights.
|
||||
echo This script needs admin rights.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto dk_done
|
||||
)
|
||||
|
@ -450,7 +450,7 @@ if not defined key call :hwidfallback
|
|||
if defined altkey (set key=%altkey%&set changekey=1&set notworking=)
|
||||
|
||||
if defined notworking if defined notfoundaltactID (
|
||||
call :dk_color %Red% "Checking for Alternate Edition to Use for HWID [%altedition% Activation ID Not Found]"
|
||||
call :dk_color %Red% "Checking Alternate Edition For HWID [%altedition% Activation ID Not Found]"
|
||||
)
|
||||
|
||||
if not defined key (
|
||||
|
@ -484,7 +484,7 @@ echo:
|
|||
)
|
||||
|
||||
if defined winsub (
|
||||
call :dk_color %Blue% "Windows Subscription edition [SKU ID-%slcSKU%] detected. The script will activate the base edition [SKU ID-%regSKU%]."
|
||||
call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] detected. Script will activate base edition [SKU ID-%regSKU%]."
|
||||
echo:
|
||||
)
|
||||
|
||||
|
@ -502,9 +502,9 @@ if not "%name%"=="US" (
|
|||
set regionchange=1
|
||||
%psc% "Set-WinHomeLocation -GeoId 244" %nul%
|
||||
if !errorlevel! EQU 0 (
|
||||
echo Changing the Windows Region to USA [Successful]
|
||||
echo Changing Windows Region To USA [Successful]
|
||||
) else (
|
||||
call :dk_color %Red% "Changing the Windows Region to USA [Failed]"
|
||||
call :dk_color %Red% "Changing Windows Region To USA [Failed]"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -639,7 +639,7 @@ if not defined resfail (
|
|||
if defined resfail (
|
||||
set error=1
|
||||
echo:
|
||||
call :dk_color %Red% "Connecting to Licensing Servers [Failed to Connect]"
|
||||
call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]"
|
||||
set fixes=%fixes% %mas%licensing-servers-issue
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%licensing-servers-issue"
|
||||
)
|
||||
|
@ -657,11 +657,11 @@ call :dk_color %Red% "Generating New IdentityCRL Registry [Failed] [%_ident%
|
|||
|
||||
reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DisableWindowsUpdateAccess %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 call :dk_color %Red% "Checking for Windows Update Blocker in Registry [Found]"
|
||||
if defined wublock call :dk_color %Red% "Checking Update Blocker In Registry [Found]"
|
||||
|
||||
reg query "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v DisableStoreApps %nul2% | find /i "0x1" %nul% && (
|
||||
set storeblock=1
|
||||
call :dk_color %Red% "Checking for Microsoft Store Blocker in Registry [Found]"
|
||||
call :dk_color %Red% "Checking Store Blocker In Registry [Found]"
|
||||
)
|
||||
|
||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type ServiceSidType RequiredPrivileges FailureActions) do if not defined wucorrupt (
|
||||
|
@ -687,7 +687,7 @@ REM Check Internet related error codes
|
|||
|
||||
if not defined wucorrupt if not defined wublock if not defined wuerror if not defined storeblock (
|
||||
echo "%error_code%" | findstr /i "0x80072e 0x80072f 0x800704cf 0x87e10bcf 0x800705b4" %nul% && (
|
||||
call :dk_color %Red% "Checking for Internet Issues [Found] %error_code%"
|
||||
call :dk_color %Red% "Checking Internet Issues [Found] %error_code%"
|
||||
set fixes=%fixes% %mas%licensing-servers-issue
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%licensing-servers-issue"
|
||||
)
|
||||
|
@ -720,9 +720,9 @@ echo:
|
|||
if defined regionchange (
|
||||
%psc% "Set-WinHomeLocation -GeoId %nation%" %nul%
|
||||
if !errorlevel! EQU 0 (
|
||||
echo Restoring the Windows Region [Successful]
|
||||
echo Restoring Windows Region [Successful]
|
||||
) else (
|
||||
call :dk_color %Red% "Restoring the Windows Region [Failed] [%name% - %nation%]"
|
||||
call :dk_color %Red% "Restoring Windows Region [Failed] [%name% - %nation%]"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -931,7 +931,7 @@ exit /b
|
|||
|
||||
:dk_reeval
|
||||
|
||||
:: This key is left by the system during the rearm process and sppsvc sometimes fails to delete it, it causes severe issues with SPP's scheduled tasks leading to random deactivations.
|
||||
:: This key is left by the system in rearm process and sppsvc sometimes fails to delete it, it causes issues in working of the Scheduled Tasks of SPP
|
||||
|
||||
set "ruleskey=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedSystemState"
|
||||
reg delete "%ruleskey%" /v "State" /f %nul%
|
||||
|
@ -1072,7 +1072,7 @@ set pupfound=%pupfound1%%pupfound2%
|
|||
set hcount=0
|
||||
for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
||||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[Antivirus URL's are blocked in hosts]"
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
|
@ -1091,8 +1091,9 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=%
|
|||
)
|
||||
|
||||
if not "%results%%pupfound%"=="" (
|
||||
if defined pupfound call :dk_color %Gray% "Checking for PUP Activators [Found%pupfound%]"
|
||||
if defined results call :dk_color %Red% "Checking for Probable Mal%w%ware Infection %results%"
|
||||
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
|
||||
if defined results call :dk_color %Red% "%results%"
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
|
@ -1111,7 +1112,7 @@ call :dk_chkmal
|
|||
sc query Null %nul% || (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking for Sandboxing [Found, script may not work properly.]"
|
||||
call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]"
|
||||
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
|
||||
echo:
|
||||
)
|
||||
|
@ -1136,7 +1137,7 @@ if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#") else (s
|
|||
if defined serv_cor (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking for Corrupt Services [%serv_cor%]"
|
||||
call :dk_color %Red% "Checking Corrupt Services [%serv_cor%]"
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -1200,7 +1201,7 @@ if defined checkerror if defined serv_e (set "serv_e=!serv_e!, %%#-!errorcode!")
|
|||
|
||||
if defined serv_e (
|
||||
set error=1
|
||||
call :dk_color %Red% "Starting Services [Failed] [%serv_e%]"
|
||||
call :dk_color %Red% "Starting Services [Failed] [%serv_e%]"
|
||||
echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && (
|
||||
call :dk_color %Blue% "Restart your system to fix this error."
|
||||
set showfix=1
|
||||
|
@ -1214,17 +1215,17 @@ set showfix=1
|
|||
if defined safeboot_option (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option%] " %Blue% "[Safe mode detected. Run the script in normal mode.]"
|
||||
call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option%] " %Blue% "[Safe mode found. Run in normal mode.]"
|
||||
)
|
||||
|
||||
|
||||
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
|
||||
if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Windows Setup State [%imagestate%]"
|
||||
call :dk_color %Red% "Checking Windows Setup State [%imagestate%]"
|
||||
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
||||
set showfix=1
|
||||
call :dk_color %Blue% "You need to run the script in normal mode if you are running the script in Audit Mode."
|
||||
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -1232,7 +1233,7 @@ call :dk_color %Blue% "You need to run the script in normal mode if you are runn
|
|||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color2 %Red% "Checking for WinPE mode " %Blue% "[WinPE mode detected. Run the script in normal mode.]"
|
||||
call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1242,16 +1243,16 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w
|
|||
echo "%wpainfo%" | find /i "Error Found" %nul% && (
|
||||
set error=1
|
||||
set wpaerror=1
|
||||
call :dk_color %Red% "Checking for WPA Registry Errors [%wpainfo%]"
|
||||
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
|
||||
) || (
|
||||
echo Checking WPA Registry Count [%wpainfo%]
|
||||
echo Checking WPA Registry Count [%wpainfo%]
|
||||
)
|
||||
|
||||
|
||||
if not defined officeact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for Evaluation Packages [Non-Evaluation Licenses are installed in Evaluation Windows]"
|
||||
call :dk_color %Red% "Checking Eval Packages [Non-Eval Licenses are installed in Eval Windows]"
|
||||
set fixes=%fixes% %mas%evaluation_editions
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%evaluation_editions"
|
||||
)
|
||||
|
@ -1270,18 +1271,18 @@ if "%osSKU%"=="165" set osedition=ProfessionalEducationN
|
|||
|
||||
if not defined officeact (
|
||||
if %osedition%==0 (
|
||||
call :dk_color %Red% "Checking for Edition Name [Not Found In Registry]"
|
||||
call :dk_color %Red% "Checking Edition Name [Not Found In Registry]"
|
||||
) else (
|
||||
|
||||
if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" (
|
||||
set error=1
|
||||
set skunotfound=1
|
||||
call :dk_color %Red% "Checking for License Files [Not Found] [%osedition%]"
|
||||
call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]"
|
||||
)
|
||||
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for Package Files [Not Found] [%osedition%]"
|
||||
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1293,7 +1294,7 @@ cmd /c exit /b %error_code%
|
|||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||
if %error_code% NEQ 0 (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%"
|
||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1305,7 +1306,7 @@ if %errorlevel% NEQ 0 set wmifailed=1
|
|||
echo "%error_code%" | findstr /i "0x800410 0x800440" %nul1% && set wmifailed=1& :: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-error-constants
|
||||
if defined wmifailed (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking WMI [Not Working]"
|
||||
call :dk_color %Red% "Checking WMI [Not Working]"
|
||||
if not defined showfix call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run Fix WMI option."
|
||||
set showfix=1
|
||||
)
|
||||
|
@ -1330,14 +1331,14 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color2 %Red% "Checking for Rearm " %Blue% "[System Restart is Required]"
|
||||
call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]"
|
||||
)
|
||||
|
||||
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color2 %Red% "Checking for ClipSVC Volatile Key " %Blue% "[System Restart is Required]"
|
||||
call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1345,14 +1346,14 @@ call :dk_color2 %Red% "Checking for ClipSVC Volatile Key " %Blue% "[System
|
|||
|
||||
if exist "%SysPath%\wlms\wlms.exe" (
|
||||
sc query wlms | find /i "RUNNING" %nul% && (
|
||||
echo Checking for Evaluation WLMS Service [Found]
|
||||
echo Checking Eval WLMS Service [Found]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
set error=1
|
||||
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]"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
@ -1362,20 +1363,20 @@ for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do (
|
|||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#"))
|
||||
)
|
||||
if defined _sppint (
|
||||
echo Checking for SPP Interference In IFEO [%_sppint%]
|
||||
echo Checking SPP Interference In IFEO [%_sppint%]
|
||||
)
|
||||
|
||||
|
||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
||||
call :dk_color %Red% "Checking for SkipRearm Registry Key [Default 0 Value Not Found. Changing to 0]"
|
||||
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null"
|
||||
set error=1
|
||||
)
|
||||
|
||||
|
||||
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 for SPP Registry Key [Incorrect ModuleId Found]"
|
||||
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]"
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
set error=1
|
||||
|
@ -1390,7 +1391,7 @@ if %winbuild% GEQ 9200 if /i not "%tokenstore%"=="%SysPath%\spp\store" if /i not
|
|||
set toerr=1
|
||||
set error=1
|
||||
set showfix=1
|
||||
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%]"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
@ -1407,9 +1408,9 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);"
|
|||
set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;"
|
||||
%psc% "!d!" %nul%
|
||||
if exist "%tokenstore%\" (
|
||||
call :dk_color %Gray% "Checking for SPP Token Folder [Not Found, Creating Now] [%tokenstore%\]"
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]"
|
||||
) else (
|
||||
call :dk_color %Red% "Checking for SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
|
@ -1427,14 +1428,14 @@ if not defined allapps (
|
|||
set "_notfoundids=Not found"
|
||||
)
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for Activation IDs [!_notfoundids!]"
|
||||
call :dk_color %Red% "Checking Activation IDs [!_notfoundids!]"
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1448,7 +1449,7 @@ call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]"
|
|||
)
|
||||
|
||||
|
||||
:: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by HWID spoofers.
|
||||
:: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers.
|
||||
|
||||
set permerror=
|
||||
if %winbuild% GEQ 9200 (
|
||||
|
@ -1591,7 +1592,7 @@ if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
|||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press [0] to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
|
|
|
@ -30,7 +30,7 @@ set "_debug=0"
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Set Environment variables, it helps if they are misconfigured in the system
|
||||
:: Set environment variables, it helps if they are misconfigured in the system
|
||||
|
||||
setlocal EnableExtensions
|
||||
setlocal DisableDelayedExpansion
|
||||
|
@ -107,7 +107,7 @@ set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/"
|
|||
sc query Null | find /i "RUNNING"
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo:
|
||||
echo The Null service, which is required for the script to operate, is not running.
|
||||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -122,7 +122,7 @@ cls
|
|||
pushd "%~dp0"
|
||||
>nul findstr /v "$" "%~nx0" && (
|
||||
echo:
|
||||
echo Error - The script either has an LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -178,7 +178,7 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Fix special characters limitation in path name
|
||||
:: Fix special character limitations in path name
|
||||
|
||||
set "_work=%~dp0"
|
||||
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
||||
|
@ -239,7 +239,7 @@ goto dk_done
|
|||
%nul1% fltmc || (
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs administrator rights.
|
||||
echo This script needs admin rights.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto dk_done
|
||||
)
|
||||
|
@ -556,7 +556,7 @@ if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic path %spp% where (App
|
|||
if %_wmic% EQU 0 for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT ID FROM %spp% WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND Description like ''%%KMSCLIENT%%'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).ID | %% {echo ('ID='+$_)}" %nul6%') do call set "app=%%a"
|
||||
|
||||
if not defined app (
|
||||
call :dk_color %Red% "Checking for Installed GVLK Activation ID [Not Found] Aborting..."
|
||||
call :dk_color %Red% "Checking Installed GVLK Activation ID [Not Found] Aborting..."
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :dk_done
|
||||
|
@ -629,7 +629,7 @@ set "sessionId=TwBTAE0AYQBqAG8AcgBWAGUAcgBzAGkAbwBuAD0ANQA7AE8AUwBNAGkAbgBvAHIAV
|
|||
copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul%
|
||||
|
||||
if not exist "%tdir%\GenuineTicket.xml" (
|
||||
call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting the process]"
|
||||
call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting...]"
|
||||
if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul%
|
||||
goto :k_final
|
||||
) else (
|
||||
|
@ -656,7 +656,7 @@ call :dk_color %Gray% "Stopping sppsvc Service [Failed]"
|
|||
%_xmlexist% (
|
||||
set error=1
|
||||
if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul%
|
||||
call :dk_color %Red% "Installing GenuineTicket.xml [Failed With ClipSVC Service Restart, Wait...]"
|
||||
call :dk_color %Red% "Installing GenuineTicket.xml [Failed with ClipSVC service restart, wait...]"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -680,7 +680,7 @@ call :dk_color %Red% "Installing GenuineTicket.xml [Failed With clipu
|
|||
if exist "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*.xml" (
|
||||
set error=1
|
||||
set rebuildinfo=1
|
||||
call :dk_color %Red% "Checking for Ticket Migration [Failed]"
|
||||
call :dk_color %Red% "Checking Ticket Migration [Failed]"
|
||||
)
|
||||
|
||||
if not defined showfix if defined rebuildinfo (
|
||||
|
@ -798,9 +798,9 @@ title Remove KMS38 Protection %masver%
|
|||
|
||||
echo:
|
||||
%nul% reg query "HKLM\%specific_kms%" && (
|
||||
call :dk_color %Red% "Removing the Specific KMS Host [Failed]"
|
||||
call :dk_color %Red% "Removing Specific KMS Host [Failed]"
|
||||
) || (
|
||||
echo Removing the Specific KMS Host [Successful]
|
||||
echo Removing Specific KMS Host [Successful]
|
||||
)
|
||||
|
||||
goto :dk_done
|
||||
|
@ -1215,7 +1215,7 @@ set pupfound=%pupfound1%%pupfound2%
|
|||
set hcount=0
|
||||
for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
||||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[AV URLs are blocked in hosts]"
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
|
@ -1224,7 +1224,7 @@ for %%G in (DependOnService Description DisplayName ErrorControl ImagePath Objec
|
|||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1)
|
||||
)
|
||||
)
|
||||
if %wucount% GEQ 1 set "results=%results%[WU registry is corrupt]"
|
||||
if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]"
|
||||
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
|
@ -1234,8 +1234,9 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=%
|
|||
)
|
||||
|
||||
if not "%results%%pupfound%"=="" (
|
||||
if defined pupfound call :dk_color %Gray% "Checking for PUP Activators [Found%pupfound%]"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection %results%"
|
||||
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
|
||||
if defined results call :dk_color %Red% "%results%"
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
|
@ -1254,7 +1255,7 @@ call :dk_chkmal
|
|||
sc query Null %nul% || (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking for Sandboxing [Found, the script may not work properly.]"
|
||||
call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]"
|
||||
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
|
||||
echo:
|
||||
)
|
||||
|
@ -1279,7 +1280,7 @@ if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#") else (s
|
|||
if defined serv_cor (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking for Corrupt Services [%serv_cor%]"
|
||||
call :dk_color %Red% "Checking Corrupt Services [%serv_cor%]"
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -1345,7 +1346,7 @@ if defined serv_e (
|
|||
set error=1
|
||||
call :dk_color %Red% "Starting Services [Failed] [%serv_e%]"
|
||||
echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && (
|
||||
call :dk_color %Blue% "Restart the system to fix this error."
|
||||
call :dk_color %Blue% "Restart your system to fix this error."
|
||||
set showfix=1
|
||||
)
|
||||
)
|
||||
|
@ -1367,7 +1368,7 @@ set error=1
|
|||
call :dk_color %Red% "Checking Windows Setup State [%imagestate%]"
|
||||
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
||||
set showfix=1
|
||||
call :dk_color %Blue% "You need to run it in normal mode in case you are running the script in Audit Mode."
|
||||
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -1375,7 +1376,7 @@ call :dk_color %Blue% "You need to run it in normal mode in case you are running
|
|||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color2 %Red% "Checking for WinPE mode " %Blue% "[WinPE mode found. Run in normal mode.]"
|
||||
call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1385,7 +1386,7 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w
|
|||
echo "%wpainfo%" | find /i "Error Found" %nul% && (
|
||||
set error=1
|
||||
set wpaerror=1
|
||||
call :dk_color %Red% "Checking for WPA Registry Errors [%wpainfo%]"
|
||||
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
|
||||
) || (
|
||||
echo Checking WPA Registry Count [%wpainfo%]
|
||||
)
|
||||
|
@ -1394,7 +1395,7 @@ echo Checking WPA Registry Count [%wpainfo%]
|
|||
if not defined officeact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for Evaluation Packages [Non-Evaluation Licenses are installed in Evaluation Windows]"
|
||||
call :dk_color %Red% "Checking Eval Packages [Non-Eval Licenses are installed in Eval Windows]"
|
||||
set fixes=%fixes% %mas%evaluation_editions
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%evaluation_editions"
|
||||
)
|
||||
|
@ -1413,18 +1414,18 @@ if "%osSKU%"=="165" set osedition=ProfessionalEducationN
|
|||
|
||||
if not defined officeact (
|
||||
if %osedition%==0 (
|
||||
call :dk_color %Red% "Checking for Edition Name [Not Found in Registry]"
|
||||
call :dk_color %Red% "Checking Edition Name [Not Found In Registry]"
|
||||
) else (
|
||||
|
||||
if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" (
|
||||
set error=1
|
||||
set skunotfound=1
|
||||
call :dk_color %Red% "Checking for License Files [Not Found] [%osedition%]"
|
||||
call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]"
|
||||
)
|
||||
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for Package Files [Not Found] [%osedition%]"
|
||||
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1473,7 +1474,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color2 %Red% "Checking for Rearm " %Blue% "[System Restart Is Required]"
|
||||
call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1488,14 +1489,14 @@ call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System
|
|||
|
||||
if exist "%SysPath%\wlms\wlms.exe" (
|
||||
sc query wlms | find /i "RUNNING" %nul% && (
|
||||
echo Checking for Evaluation WLMS Service [Found]
|
||||
echo Checking Eval WLMS Service [Found]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
set error=1
|
||||
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]"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
@ -1505,13 +1506,13 @@ for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do (
|
|||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#"))
|
||||
)
|
||||
if defined _sppint (
|
||||
echo Checking for SPP Interference in IFEO [%_sppint%]
|
||||
echo Checking SPP Interference In IFEO [%_sppint%]
|
||||
)
|
||||
|
||||
|
||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
||||
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing to 0]"
|
||||
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null"
|
||||
set error=1
|
||||
)
|
||||
|
@ -1520,7 +1521,7 @@ set error=1
|
|||
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]"
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Possibly Caused By Gaming Spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
|
@ -1550,9 +1551,9 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);"
|
|||
set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;"
|
||||
%psc% "!d!" %nul%
|
||||
if exist "%tokenstore%\" (
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found. Created Now] [%tokenstore%\]"
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]"
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found. Failed to Create] [%tokenstore%\]"
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
|
@ -1577,7 +1578,7 @@ call :dk_color %Red% "Checking Activation IDs [!_notfoundids!]"
|
|||
|
||||
if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1670,7 +1671,7 @@ if ($osVersion.Build -ge $minBuildNumber) {
|
|||
}
|
||||
for ($i=1; $i -le $count; $i++) {
|
||||
if (-not $subkeyHashTable.ContainsKey("$i")) {
|
||||
Write-Output "Total Keys $count. Error Found - $i key does not exist"
|
||||
Write-Output "Total Keys $count. Error Found - $i key does not exist."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
|
@ -1681,7 +1682,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
|||
if ($PSVersionTable.PSVersion.Major -lt 3) {
|
||||
cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
|
@ -1689,7 +1690,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
|||
$subkey = $wpaKey.OpenSubKey($_)
|
||||
$p = $subkey.GetValueNames()
|
||||
if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) {
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
|
@ -1728,13 +1729,13 @@ echo:
|
|||
if %_unattended%==1 timeout /t 2 & exit /b
|
||||
|
||||
if defined fixes (
|
||||
call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore"
|
||||
call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
|
|
|
@ -27,7 +27,7 @@ set "_debug=0"
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Set Environment variables, it helps if they are misconfigured in the system
|
||||
:: Set environment variables, it helps if they are misconfigured in the system
|
||||
|
||||
setlocal EnableExtensions
|
||||
setlocal DisableDelayedExpansion
|
||||
|
@ -104,7 +104,7 @@ set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/"
|
|||
sc query Null | find /i "RUNNING"
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo:
|
||||
echo The Null service, which is required for the script to operate, is not running.
|
||||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -119,7 +119,7 @@ cls
|
|||
pushd "%~dp0"
|
||||
>nul findstr /v "$" "%~nx0" && (
|
||||
echo:
|
||||
echo Error - The script either has an LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -168,7 +168,7 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Fix special characters limitation in path name
|
||||
:: Fix special character limitations in path name
|
||||
|
||||
set "_work=%~dp0"
|
||||
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
||||
|
@ -229,7 +229,7 @@ goto dk_done
|
|||
%nul1% fltmc || (
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs administrator rights.
|
||||
echo This script needs admin rights.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto dk_done
|
||||
)
|
||||
|
@ -414,7 +414,7 @@ if %winbuild% GEQ 10240 %psc% "Get-AppxPackage -name "Microsoft.Office.Desktop""
|
|||
|
||||
if not "%o14msi%%o14c2r%%o16uwp%"=="" (
|
||||
echo:
|
||||
call :dk_color %Red% "Checking for Unsupported Office Installs [%o14msi%%o14c2r%%o16uwp%]"
|
||||
call :dk_color %Red% "Checking Unsupported Office Install [ %o14msi%%o14c2r%%o16uwp%]"
|
||||
)
|
||||
|
||||
if %winbuild% GEQ 10240 %psc% "Get-AppxPackage -name "Microsoft.MicrosoftOfficeHub"" | find /i "Office" %nul1% && (
|
||||
|
@ -431,7 +431,7 @@ sc query ClickToRunSvc %nul%
|
|||
set error1=%errorlevel%
|
||||
|
||||
if defined o16c2r if %error1% EQU 1060 (
|
||||
call :dk_color %Red% "Checking for ClickToRun Service [Not found, Office 16.0 files found]"
|
||||
call :dk_color %Red% "Checking ClickToRun Service [Not found, Office 16.0 files found]"
|
||||
set o16c2r=
|
||||
set error=1
|
||||
)
|
||||
|
@ -440,7 +440,7 @@ sc query OfficeSvc %nul%
|
|||
set error2=%errorlevel%
|
||||
|
||||
if defined o15c2r if %error1% EQU 1060 if %error2% EQU 1060 (
|
||||
call :dk_color %Red% "Checking for ClickToRun Service [Not found, Office 15.0 files found]"
|
||||
call :dk_color %Red% "Checking ClickToRun Service [Not found, Office 15.0 files found]"
|
||||
set o15c2r=
|
||||
set error=1
|
||||
)
|
||||
|
@ -449,9 +449,9 @@ if "%o16c2r%%o15c2r%%o16msi%%o15msi%"=="" (
|
|||
set error=1
|
||||
echo:
|
||||
if not "%o14msi%%o14c2r%%o16uwp%"=="" (
|
||||
call :dk_color %Red% "Checking for Supported Office Installs [Not Found]"
|
||||
call :dk_color %Red% "Checking Supported Office Install [Not Found]"
|
||||
) else (
|
||||
call :dk_color %Red% "Checking for Installed Office [Not Found]"
|
||||
call :dk_color %Red% "Checking Installed Office [Not Found]"
|
||||
)
|
||||
|
||||
if defined ohub (
|
||||
|
@ -471,7 +471,7 @@ if not "%o16c2r%%o15c2r%%o16msi%%o15msi%"=="1" set multioffice=1
|
|||
if not "%o14msi%%o14c2r%%o16uwp%"=="" set multioffice=1
|
||||
|
||||
if defined multioffice (
|
||||
call :dk_color %Gray% "Checking for Multiple Office Installs [Found, it's recommended to install only one version]"
|
||||
call :dk_color %Gray% "Checking Multiple Office Install [Found, its recommended to install only one version]"
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -533,7 +533,7 @@ echo:
|
|||
echo Activating Office... [C2R ^| %_version% ^| %_oArch%]
|
||||
|
||||
if not defined _oIds (
|
||||
call :dk_color %Red% "Checking for Installed Products' ID's [Product IDs not found, aborting...]"
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found. Aborting activation...]"
|
||||
set error=1
|
||||
goto :starto16c2r
|
||||
)
|
||||
|
@ -583,7 +583,7 @@ echo:
|
|||
echo Activating Office... [C2R ^| %_version% %_AudienceData%^| %_oArch%]
|
||||
|
||||
if not defined _oIds (
|
||||
call :dk_color %Red% "Checking for Installed Products' ID's [Product IDs not found, aborting...]"
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found. Aborting activation...]"
|
||||
set error=1
|
||||
goto :startmsi
|
||||
)
|
||||
|
@ -600,7 +600,7 @@ call :oh_hookinstall
|
|||
|
||||
if defined _sublic (
|
||||
if not exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (
|
||||
call :dk_color %Gray% "Checking for Old Office With Sub License [Found, Update Office otherwise it may show a licensing issue-related banner.]"
|
||||
call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Office, otherwise, it may show a licensing issue-related banner.]"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -619,7 +619,7 @@ reg add "%kmskey%" /f /v KeyManagementServiceName /t REG_SZ /d "10.0.0.10" /reg:
|
|||
)
|
||||
reg delete "%kmskey%" /f %nul%
|
||||
reg add "%kmskey%" /f /v KeyManagementServiceName /t REG_SZ /d "10.0.0.10" %nul%
|
||||
echo Adding a Registry Key to Prevent Banner [Successful]
|
||||
echo Adding a Registry to Prevent Banner [Successful]
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -641,7 +641,7 @@ call :oh_licrefresh
|
|||
echo:
|
||||
if not defined error (
|
||||
call :dk_color %Green% "Office is permanently activated."
|
||||
if defined ohub call :dk_color %Gray% "Office apps such as Word, Excel are activated. Search for them and use them directly. Ignore the 'Buy' button in the Office dashboard app."
|
||||
if defined ohub call :dk_color %Gray% "Office apps such as Word, Excel are activated, use them directly. Ignore 'Buy' button in Office dashboard app."
|
||||
echo Help: %mas%troubleshoot
|
||||
) else (
|
||||
call :dk_color %Red% "Some errors were detected."
|
||||
|
@ -808,7 +808,7 @@ exit /b
|
|||
:oh_fixprids
|
||||
|
||||
if not defined _prids (
|
||||
call :dk_color %Gray% "Checking for ProductReleaseIds Registry [Not Found]"
|
||||
call :dk_color %Gray% "Checking ProductReleaseIds In Registry [Not Found]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
|
@ -919,7 +919,7 @@ if not exist "%_hookPath%\sppc.dll" (if not defined ierror set ierror=Copy)
|
|||
|
||||
echo:
|
||||
if not defined ierror (
|
||||
echo Symlinking System sppc.dll to ["%_hookPath%\sppcs.dll"] [Successful]
|
||||
echo Symlinking System's sppc.dll to ["%_hookPath%\sppcs.dll"] [Successful]
|
||||
if defined exhook (
|
||||
echo Copying Custom %_hook% to ["%_hookPath%\sppc.dll"] [Successful]
|
||||
) else (
|
||||
|
@ -981,7 +981,7 @@ echo "!allapps!" | find /i "!_actid!" %nul1% || call :oh_installlic
|
|||
call :dk_inskey "[!key!] [!_prod!] [!_lic!]"
|
||||
) else (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for the Product in the Script [Office %oVer%.0 !_prod! Not Found]"
|
||||
call :dk_color %Red% "Checking Product In Script [Office %oVer%.0 !_prod! not found in script]"
|
||||
call :dk_color %Blue% "Make sure you are using the latest version of MAS."
|
||||
set fixes=%fixes% %mas%
|
||||
call :dk_color %_Yellow% "%mas%"
|
||||
|
@ -996,7 +996,7 @@ if defined winserver if defined _config (
|
|||
echo %_oIds% | find /i "Retail" %nul1% && (
|
||||
set scaIsNeeded=1
|
||||
reg add %_config% /v SharedComputerLicensing /t REG_SZ /d "1" /f %nul1%
|
||||
echo Adding SharedComputerLicensing Registry [Successful] [Needed on Windows Server With Retail Office]"
|
||||
echo Adding SharedComputerLicensing Reg [Successful] [Needed on Server With Retail Office]"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -1043,13 +1043,13 @@ echo Activating Office... [MSI ^| %_version% ^| %_oArch%]
|
|||
|
||||
if not defined _oBranding (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for BRANDING.XML [Not Found, aborting...]"
|
||||
call :dk_color %Red% "Checking BRANDING.XML [Not Found, aborting activation...]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
if not defined _oIds (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for Installed Product ID's [Product IDs not found, aborting...]"
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found, aborting activation...]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
|
@ -1110,7 +1110,7 @@ for /f "tokens=* delims=" %%a in ('%psc% "$p = 'HKLM:\SOFTWARE\Microsoft\Windows
|
|||
|
||||
if not defined _sidlist (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for User Account SID's [Not Found]"
|
||||
call :dk_color %Red% "Checking User Accounts SID [Not Found]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
|
@ -1118,7 +1118,7 @@ set /a counter=0
|
|||
for %%# in (%_sidlist%) do set /a counter+=1
|
||||
|
||||
if %counter% GTR 10 (
|
||||
call :dk_color %Gray% "Checking Total User Account Count [%counter%]"
|
||||
call :dk_color %Gray% "Checking Total User Accounts [%counter%]"
|
||||
)
|
||||
|
||||
::==========================
|
||||
|
@ -1400,7 +1400,7 @@ echo Installing Generic Product Key %~1 [Successful]
|
|||
) else (
|
||||
call :dk_color %Red% "Installing Generic Product Key %~1 [Failed] %keyerror%"
|
||||
if not defined error (
|
||||
if defined altapplist call :dk_color %Red% "No Activation ID was found for this key."
|
||||
if defined altapplist call :dk_color %Red% "Activation ID not found for this key."
|
||||
call :dk_color %Blue% "%_fixmsg%"
|
||||
set showfix=1
|
||||
)
|
||||
|
@ -1524,7 +1524,7 @@ set pupfound=%pupfound1%%pupfound2%
|
|||
set hcount=0
|
||||
for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
||||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[AV URLs are blocked in hosts]"
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
|
@ -1543,8 +1543,9 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=%
|
|||
)
|
||||
|
||||
if not "%results%%pupfound%"=="" (
|
||||
if defined pupfound call :dk_color %Gray% "Checking for PUP Activators [Found%pupfound%]"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection %results%"
|
||||
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
|
||||
if defined results call :dk_color %Red% "%results%"
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
|
@ -1563,7 +1564,7 @@ call :dk_chkmal
|
|||
sc query Null %nul% || (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking for Sandboxing [Found, the script may not work properly.]"
|
||||
call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]"
|
||||
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
|
||||
echo:
|
||||
)
|
||||
|
@ -1588,7 +1589,7 @@ if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#") else (s
|
|||
if defined serv_cor (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking for Corrupt Services [%serv_cor%]"
|
||||
call :dk_color %Red% "Checking Corrupt Services [%serv_cor%]"
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -1666,7 +1667,7 @@ set showfix=1
|
|||
if defined safeboot_option (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option%] " %Blue% "[Safe mode detected, run in normal mode.]"
|
||||
call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option%] " %Blue% "[Safe mode found. Run in normal mode.]"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1676,7 +1677,7 @@ set error=1
|
|||
call :dk_color %Red% "Checking Windows Setup State [%imagestate%]"
|
||||
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
||||
set showfix=1
|
||||
call :dk_color %Blue% "You need to run the script 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."
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -1684,7 +1685,7 @@ call :dk_color %Blue% "You need to run the script in normal mode in case you are
|
|||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color2 %Red% "Checking for WinPE Mode " %Blue% "[WinPE mode found. Run in normal mode.]"
|
||||
call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1694,7 +1695,7 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w
|
|||
echo "%wpainfo%" | find /i "Error Found" %nul% && (
|
||||
set error=1
|
||||
set wpaerror=1
|
||||
call :dk_color %Red% "Checking for WPA Registry Errors [%wpainfo%]"
|
||||
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
|
||||
) || (
|
||||
echo Checking WPA Registry Count [%wpainfo%]
|
||||
)
|
||||
|
@ -1703,7 +1704,7 @@ echo Checking WPA Registry Count [%wpainfo%]
|
|||
if not defined officeact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for Evaluation Packages [Non-Evaluation Licenses are installed in Evaluation Windows]"
|
||||
call :dk_color %Red% "Checking Eval Packages [Non-Eval Licenses are installed in Eval Windows]"
|
||||
set fixes=%fixes% %mas%evaluation_editions
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%evaluation_editions"
|
||||
)
|
||||
|
@ -1722,18 +1723,18 @@ if "%osSKU%"=="165" set osedition=ProfessionalEducationN
|
|||
|
||||
if not defined officeact (
|
||||
if %osedition%==0 (
|
||||
call :dk_color %Red% "Checking for Edition Name [Not Found in Registry]"
|
||||
call :dk_color %Red% "Checking Edition Name [Not Found In Registry]"
|
||||
) else (
|
||||
|
||||
if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" (
|
||||
set error=1
|
||||
set skunotfound=1
|
||||
call :dk_color %Red% "Checking for License Files [Not Found] [%osedition%]"
|
||||
call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]"
|
||||
)
|
||||
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for Package Files [Not Found] [%osedition%]"
|
||||
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1782,14 +1783,14 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color2 %Red% "Checking for Rearm " %Blue% "[System Restart is Required]"
|
||||
call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]"
|
||||
)
|
||||
|
||||
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color2 %Red% "Checking for Volatile ClipSVC Key " %Blue% "[System Restart is Required]"
|
||||
call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1797,14 +1798,14 @@ call :dk_color2 %Red% "Checking for Volatile ClipSVC Key " %Blue% "[System
|
|||
|
||||
if exist "%SysPath%\wlms\wlms.exe" (
|
||||
sc query wlms | find /i "RUNNING" %nul% && (
|
||||
echo Checking for Evaluation WLMS Service [Found]
|
||||
echo Checking Eval WLMS Service [Found]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for HKU\S-1-5-20 Registry [Not Found]"
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
@ -1814,13 +1815,13 @@ for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do (
|
|||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#"))
|
||||
)
|
||||
if defined _sppint (
|
||||
echo Checking for SPP Interference in IFEO [%_sppint%]
|
||||
echo Checking SPP Interference In IFEO [%_sppint%]
|
||||
)
|
||||
|
||||
|
||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
||||
call :dk_color %Red% "Checking for SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
||||
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null"
|
||||
set error=1
|
||||
)
|
||||
|
@ -1829,7 +1830,7 @@ set error=1
|
|||
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]"
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Possibly Caused By HWID Spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
|
@ -1859,7 +1860,7 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);"
|
|||
set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;"
|
||||
%psc% "!d!" %nul%
|
||||
if exist "%tokenstore%\" (
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creating Now] [%tokenstore%\]"
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]"
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
set error=1
|
||||
|
@ -1879,14 +1880,14 @@ if not defined allapps (
|
|||
set "_notfoundids=Not found"
|
||||
)
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Activation ID's [!_notfoundids!]"
|
||||
call :dk_color %Red% "Checking Activation IDs [!_notfoundids!]"
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking for SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1979,7 +1980,7 @@ if ($osVersion.Build -ge $minBuildNumber) {
|
|||
}
|
||||
for ($i=1; $i -le $count; $i++) {
|
||||
if (-not $subkeyHashTable.ContainsKey("$i")) {
|
||||
Write-Output "Total Keys $count. Error Found - $i key does not exist"
|
||||
Write-Output "Total Keys $count. Error Found - $i key does not exist."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
|
@ -1990,7 +1991,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
|||
if ($PSVersionTable.PSVersion.Major -lt 3) {
|
||||
cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
|
@ -1998,7 +1999,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
|||
$subkey = $wpaKey.OpenSubKey($_)
|
||||
$p = $subkey.GetValueNames()
|
||||
if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) {
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
|
@ -2037,13 +2038,13 @@ echo:
|
|||
if %_unattended%==1 timeout /t 2 & exit /b
|
||||
|
||||
if defined fixes (
|
||||
call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore"
|
||||
call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
|
|
|
@ -52,7 +52,7 @@ set "_debug=0"
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Set Environment variables, it helps if they are misconfigured in the system
|
||||
:: Set environment variables, it helps if they are misconfigured in the system
|
||||
|
||||
setlocal EnableExtensions
|
||||
setlocal DisableDelayedExpansion
|
||||
|
@ -129,7 +129,7 @@ set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/"
|
|||
sc query Null | find /i "RUNNING"
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo:
|
||||
echo the Null service, which is required for the script to operate, is not running.
|
||||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -144,7 +144,7 @@ cls
|
|||
pushd "%~dp0"
|
||||
>nul findstr /v "$" "%~nx0" && (
|
||||
echo:
|
||||
echo Error - The script either has an LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -197,7 +197,7 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Fix special characters limitation in path name
|
||||
:: Fix special character limitations in path name
|
||||
|
||||
set "_work=%~dp0"
|
||||
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
||||
|
@ -258,7 +258,7 @@ goto dk_done
|
|||
%nul1% fltmc || (
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs administrator rights.
|
||||
echo This script needs admin rights.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto dk_done
|
||||
)
|
||||
|
@ -551,7 +551,7 @@ call :dk_color %Blue% "Windows must be updated to build 19044.2788 or higher for
|
|||
)
|
||||
|
||||
if not defined key if defined notfoundaltactID (
|
||||
call :dk_color %Red% "Checking Alternate Edition for %KS% [%altedition% Activation ID Not Found]"
|
||||
call :dk_color %Red% "Checking Alternate Edition For %KS% [%altedition% Activation ID Not Found]"
|
||||
)
|
||||
|
||||
if not defined key if not defined _gvlk (
|
||||
|
@ -579,7 +579,7 @@ echo:
|
|||
)
|
||||
|
||||
if defined winsub (
|
||||
call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] found. The script will activate the base edition [SKU ID-%regSKU%]."
|
||||
call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] found. Script will activate base edition [SKU ID-%regSKU%]."
|
||||
echo:
|
||||
)
|
||||
|
||||
|
@ -1291,7 +1291,7 @@ reg delete "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwarePr
|
|||
reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\0ff1ce15-a989-479d-af46-f275c6370663" /f %nul%
|
||||
reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\59a52881-a989-479d-af46-f275c6370663" /f %nul%
|
||||
|
||||
echo Clearing Office License Blocks [Successfully Cleared From All %counter% Useraccounts]
|
||||
echo Clearing Office License Blocks [Successfully cleared from all %counter% user accounts]
|
||||
|
||||
::==========================
|
||||
|
||||
|
@ -1309,7 +1309,7 @@ for %%# in (%_sidlist%) do (
|
|||
reg delete HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /f %nul%
|
||||
reg add HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /v "TimeOfLastHeartbeatFailure" /t REG_SZ /d "2040-01-01T00:00:00Z" /f %nul%
|
||||
)
|
||||
echo Adding Reg Keys To Skip License Check [Successfully Added To All %counter% ^& Future New Useraccounts]
|
||||
echo Adding Reg Keys to Skip License Check [Successfully added to all %counter% ^& future new user accounts]
|
||||
)
|
||||
|
||||
::==========================
|
||||
|
@ -1323,14 +1323,14 @@ reg query HKU\%%# %nul% && set failedtounload=1
|
|||
|
||||
if defined failedtoload (
|
||||
set error=1
|
||||
call :dk_color %Red% "Loading Unloaded accounts Registry [Failed For Some Useraccounts]"
|
||||
call :dk_color %Blue% "Restart the system and try again."
|
||||
call :dk_color %Red% "Loading Unloaded Accounts Registry [Failed for some user accounts]"
|
||||
call :dk_color %Blue% "Restart your system and try again."
|
||||
)
|
||||
|
||||
if defined failedtounload (
|
||||
set error=1
|
||||
call :dk_color %Red% "Unloading loaded accounts Registry [Failed For Some Useraccounts]"
|
||||
call :dk_color %Blue% "Restart the system and try again."
|
||||
call :dk_color %Red% "Unloading Loaded Account Registries [Failed for some user accounts]"
|
||||
call :dk_color %Blue% "Restart your system and try again."
|
||||
)
|
||||
|
||||
exit /b
|
||||
|
@ -2573,7 +2573,7 @@ set pupfound=%pupfound1%%pupfound2%
|
|||
set hcount=0
|
||||
for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
||||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[AV URLs are blocked in hosts]"
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
|
@ -2582,7 +2582,7 @@ for %%G in (DependOnService Description DisplayName ErrorControl ImagePath Objec
|
|||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1)
|
||||
)
|
||||
)
|
||||
if %wucount% GEQ 1 set "results=%results%[WU registry is corrupt]"
|
||||
if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]"
|
||||
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
|
@ -2593,7 +2593,8 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=%
|
|||
|
||||
if not "%results%%pupfound%"=="" (
|
||||
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection %results%"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
|
||||
if defined results call :dk_color %Red% "%results%"
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
|
@ -2612,7 +2613,7 @@ call :dk_chkmal
|
|||
sc query Null %nul% || (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking Sandboxing [Found. Script may not work properly.]"
|
||||
call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]"
|
||||
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
|
||||
echo:
|
||||
)
|
||||
|
@ -2703,7 +2704,7 @@ if defined serv_e (
|
|||
set error=1
|
||||
call :dk_color %Red% "Starting Services [Failed] [%serv_e%]"
|
||||
echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && (
|
||||
call :dk_color %Blue% "Restart the system to fix this error."
|
||||
call :dk_color %Blue% "Restart your system to fix this error."
|
||||
set showfix=1
|
||||
)
|
||||
)
|
||||
|
@ -2743,7 +2744,7 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w
|
|||
echo "%wpainfo%" | find /i "Error Found" %nul% && (
|
||||
set error=1
|
||||
set wpaerror=1
|
||||
call :dk_color %Red% "Checking WPA Registry Error [%wpainfo%]"
|
||||
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
|
||||
) || (
|
||||
echo Checking WPA Registry Count [%wpainfo%]
|
||||
)
|
||||
|
@ -2782,7 +2783,7 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed
|
|||
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Package File [Not Found] [%osedition%]"
|
||||
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -2853,7 +2854,7 @@ echo Checking Eval WLMS Service [Found]
|
|||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Reg [Not Found]"
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
@ -2878,7 +2879,7 @@ set error=1
|
|||
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]"
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Possibly Caused By Gaming Spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
|
@ -2908,9 +2909,9 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);"
|
|||
set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;"
|
||||
%psc% "!d!" %nul%
|
||||
if exist "%tokenstore%\" (
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found. Created Now] [%tokenstore%\]"
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]"
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found. Failed To Create] [%tokenstore%\]"
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
|
@ -3028,7 +3029,7 @@ if ($osVersion.Build -ge $minBuildNumber) {
|
|||
}
|
||||
for ($i=1; $i -le $count; $i++) {
|
||||
if (-not $subkeyHashTable.ContainsKey("$i")) {
|
||||
Write-Output "Total Keys $count. Error Found- $i key does not exist"
|
||||
Write-Output "Total Keys $count. Error Found - $i key does not exist."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
|
@ -3039,7 +3040,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
|||
if ($PSVersionTable.PSVersion.Major -lt 3) {
|
||||
cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Total Keys $count. Error Found- Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
|
@ -3047,7 +3048,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
|||
$subkey = $wpaKey.OpenSubKey($_)
|
||||
$p = $subkey.GetValueNames()
|
||||
if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) {
|
||||
Write-Host "Total Keys $count. Error Found- Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
|
@ -3086,13 +3087,13 @@ echo:
|
|||
if %_unattended%==1 timeout /t 2 & exit /b
|
||||
|
||||
if defined fixes (
|
||||
call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore"
|
||||
call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
|
|
|
@ -69,7 +69,7 @@ set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/"
|
|||
sc query Null | find /i "RUNNING"
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo:
|
||||
echo The Null service, which is required for the script to operate, is not running.
|
||||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -84,7 +84,7 @@ cls
|
|||
pushd "%~dp0"
|
||||
>nul findstr /v "$" "%~nx0" && (
|
||||
echo:
|
||||
echo Error - The script either has an LF line ending issue or the empty line at the end of the script is missing.
|
||||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -127,7 +127,7 @@ set "line=echo _________________________________________________________________
|
|||
if %winbuild% LSS 7600 (
|
||||
%nceline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo MAS only supports Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -153,7 +153,7 @@ setlocal EnableDelayedExpansion
|
|||
echo "!_batf!" | find /i "!_ttemp!" %nul1% && (
|
||||
if /i not "!_work!"=="!_ttemp!" (
|
||||
%eline%
|
||||
echo Script is launched from the temp folder.
|
||||
echo The script was launched from the temp folder.
|
||||
echo You are most likely running the script directly from the archive file.
|
||||
echo:
|
||||
echo Extract the archive file and launch the script from the extracted folder.
|
||||
|
@ -178,7 +178,7 @@ echo:
|
|||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
) || (
|
||||
echo PowerShell is not working, aborting...
|
||||
echo PowerShell is not working. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
|
@ -194,7 +194,7 @@ goto dk_done
|
|||
%nul1% fltmc || (
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs administrator rights.
|
||||
echo This script needs admin rights.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto dk_done
|
||||
)
|
||||
|
@ -302,7 +302,7 @@ dism.exe
|
|||
) do (
|
||||
if not exist %SysPath%\%%# (
|
||||
%eline%
|
||||
echo [%SysPath%\%%#] file is missing. Aborting...
|
||||
echo [%SysPath%\%%#] file is missing, aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
|
@ -335,7 +335,7 @@ if defined UBR (set "fullbuild=%%G.!UBR!") else (set "fullbuild=%%G.%%H")
|
|||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||
if not defined apps (
|
||||
%eline%
|
||||
echo Either a key is not installed or MAS failed to get installed keys' activation ID, aborting...
|
||||
echo Either key is not insalled or script failed to get installed key's activation ID. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
|
@ -423,9 +423,9 @@ echo %%# | findstr /i "CountrySpecific CloudEdition" %nul% || (set "_ntarget=!_n
|
|||
if not defined _ntarget (
|
||||
%line%
|
||||
echo:
|
||||
if defined dismnotworking call :dk_color %Red% "DISM is not working."
|
||||
if defined dismnotworking call :dk_color %Red% "DISM.exe is not working."
|
||||
call :dk_color %Gray% "Target editions not found."
|
||||
echo Current edition [%osedition% ^| %winbuild%] cannot be changed.
|
||||
echo Current Edition [%osedition% ^| %winbuild%] can not be changed to any other Edition.
|
||||
%line%
|
||||
goto dk_done
|
||||
)
|
||||
|
@ -443,11 +443,11 @@ set targetedition=
|
|||
|
||||
%line%
|
||||
echo:
|
||||
call :dk_color %Gray% "You can change the current edition [%osedition%] [%fullbuild%] to one of the following:"
|
||||
call :dk_color %Gray% "You can change the edition [%osedition%] [%fullbuild%] to one of the following."
|
||||
%showeditionerror%
|
||||
if defined dismnotworking (
|
||||
call :dk_color %_Yellow% "Note - DISM is not working."
|
||||
if /i "%osedition:~0,4%"=="Core" call :dk_color %_Yellow% " - You will see more editions to choose from once you've changed to Professional."
|
||||
call :dk_color %_Yellow% "Note - DISM.exe is not working."
|
||||
if /i "%osedition:~0,4%"=="Core" call :dk_color %_Yellow% " - You will see more edition options to choose once its changed to Pro."
|
||||
)
|
||||
%line%
|
||||
echo:
|
||||
|
@ -543,7 +543,7 @@ cls
|
|||
%line%
|
||||
echo:
|
||||
%showeditionerror%
|
||||
if defined dismnotworking call :dk_color %_Yellow% "DISM is not working."
|
||||
if defined dismnotworking call :dk_color %_Yellow% "DISM.exe is not working."
|
||||
echo Changing the current edition [%osedition%] %fullbuild% to [%targetedition%]...
|
||||
echo:
|
||||
|
||||
|
@ -613,7 +613,7 @@ if defined rebootreq goto dk_done
|
|||
|
||||
echo:
|
||||
%showeditionerror%
|
||||
if defined dismnotworking call :dk_color %_Yellow% "Note - DISM is not working."
|
||||
if defined dismnotworking call :dk_color %_Yellow% "Note - DISM.exe is not working."
|
||||
echo Changing the current edition [%osedition%] %fullbuild% to [%targetedition%]...
|
||||
echo:
|
||||
call :dk_color %Blue% "Important - Save your work before continuing, the system will auto-restart."
|
||||
|
@ -670,7 +670,7 @@ if defined rebootreq goto dk_done
|
|||
cls
|
||||
echo:
|
||||
%showeditionerror%
|
||||
if defined dismnotworking call :dk_color %_Yellow% "Note - DISM is not working."
|
||||
if defined dismnotworking call :dk_color %_Yellow% "Note - DISM.exe is not working."
|
||||
echo Changing the current edition [%osedition%] %fullbuild% to [%targetedition%]...
|
||||
echo:
|
||||
|
||||
|
@ -987,13 +987,13 @@ echo:
|
|||
if %_unattended%==1 timeout /t 2 & exit /b
|
||||
|
||||
if defined fixes (
|
||||
call :dk_color2 %Blue% "Press [1] to open troubleshoot page " %Gray% " Press [0] to ignore"
|
||||
call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press [0] to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
|
|
|
@ -64,7 +64,7 @@ set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/"
|
|||
sc query Null | find /i "RUNNING"
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo:
|
||||
echo The Null service, which is required for the script to operate, is not running.
|
||||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -79,7 +79,7 @@ cls
|
|||
pushd "%~dp0"
|
||||
>nul findstr /v "$" "%~nx0" && (
|
||||
echo:
|
||||
echo Error - Script either has an LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -121,7 +121,7 @@ call :dk_setvar
|
|||
if %winbuild% LSS 7600 (
|
||||
%nceline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo MAS only supports Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
goto done2
|
||||
)
|
||||
|
||||
|
@ -147,7 +147,7 @@ setlocal EnableDelayedExpansion
|
|||
echo "!_batf!" | find /i "!_ttemp!" %nul1% && (
|
||||
if /i not "!_work!"=="!_ttemp!" (
|
||||
%eline%
|
||||
echo Script is launched from the temp folder.
|
||||
echo The script was launched from the temp folder.
|
||||
echo You are most likely running the script directly from the archive file.
|
||||
echo:
|
||||
echo Extract the archive file and launch the script from the extracted folder.
|
||||
|
@ -188,7 +188,7 @@ goto done2
|
|||
%nul1% fltmc || (
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs administrator rights.
|
||||
echo This script needs admin rights.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto done2
|
||||
)
|
||||
|
@ -681,7 +681,7 @@ cd \
|
|||
:errorfound
|
||||
|
||||
%eline%
|
||||
echo The script failed to create the $OEM$ folder successfully.
|
||||
echo The script failed to create the $OEM$ folder.
|
||||
goto :done2
|
||||
|
||||
:done
|
||||
|
@ -689,11 +689,11 @@ goto :done2
|
|||
echo ______________________________________________________________
|
||||
echo:
|
||||
call :dk_color %Blue% "%oem%"
|
||||
call :dk_color %Green% "The $OEM$ folder was successfully created on your Desktop."
|
||||
call :dk_color %Green% "$OEM$ folder was successfully created on your Desktop."
|
||||
echo "%oem%" | find /i "38" %nul% && (
|
||||
echo:
|
||||
echo If you want to activate Server Cor/Acor editions ^(No GUI Versions^) using KMS38,
|
||||
echo refer to this page for instructions: %mas%oem-folder
|
||||
echo To KMS38 activate Server Cor/Acor editions ^(No GUI Versions^),
|
||||
echo Check this page %mas%oem-folder
|
||||
)
|
||||
echo ______________________________________________________________
|
||||
|
||||
|
@ -701,13 +701,13 @@ echo ______________________________________________________________
|
|||
|
||||
echo:
|
||||
if defined fixes (
|
||||
call :dk_color2 %Blue% "Press [1] to open the Troubleshoot page " %Gray% " Press [0] to ignore"
|
||||
call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press [0] to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
|
|
|
@ -64,7 +64,7 @@ set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/"
|
|||
sc query Null | find /i "RUNNING"
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo:
|
||||
echo The Null service, which is required for the script to operate, is not running.
|
||||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -79,7 +79,7 @@ cls
|
|||
pushd "%~dp0"
|
||||
>nul findstr /v "$" "%~nx0" && (
|
||||
echo:
|
||||
echo Error - Script either has an LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot
|
||||
|
@ -122,7 +122,7 @@ set "line=______________________________________________________________________
|
|||
if %winbuild% LSS 7600 (
|
||||
%nceline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo MAS only supports Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -148,7 +148,7 @@ setlocal EnableDelayedExpansion
|
|||
echo "!_batf!" | find /i "!_ttemp!" %nul1% && (
|
||||
if /i not "!_work!"=="!_ttemp!" (
|
||||
%eline%
|
||||
echo Script is launched from the temp folder,
|
||||
echo The script was launched from the temp folder.
|
||||
echo You are most likely running the script directly from the archive file.
|
||||
echo:
|
||||
echo Extract the archive file and launch the script from the extracted folder.
|
||||
|
@ -189,7 +189,7 @@ goto dk_done
|
|||
%nul1% fltmc || (
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs admininistrator rights.
|
||||
echo This script needs admin rights.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto dk_done
|
||||
)
|
||||
|
@ -436,7 +436,7 @@ copy /y /b "%SystemRoot%\logs\cbs\cbs.log" "%SystemRoot%\logs\cbs\backup_cbs_%_t
|
|||
del /f /q "%SystemRoot%\logs\cbs\cbs.log" %nul%
|
||||
|
||||
echo:
|
||||
echo Applying the command,..
|
||||
echo Applying the command...
|
||||
echo sfc /scannow
|
||||
sfc /scannow
|
||||
|
||||
|
@ -470,7 +470,7 @@ echo %line%
|
|||
echo:
|
||||
echo Notes:
|
||||
echo:
|
||||
echo - This option helps in troubleshooting generic activation issues.
|
||||
echo - This option helps in troubleshooting activation issues.
|
||||
echo:
|
||||
echo - This option will:
|
||||
echo - Deactivate Windows and Office, you may need to reactivate.
|
||||
|
@ -554,7 +554,7 @@ echo [Successful]
|
|||
:: Clear HWID token related registry to fix activation incase there is any corruption
|
||||
|
||||
echo:
|
||||
echo Deleting IdentityCRL...
|
||||
echo Deleting IdentityCRL Registry Key...
|
||||
echo [%_ident%]
|
||||
reg delete "%_ident%" /f %nul%
|
||||
reg query "%_ident%" %nul% && (
|
||||
|
@ -609,7 +609,7 @@ echo:
|
|||
call :scandat check
|
||||
|
||||
if not defined token (
|
||||
call :dk_color %Red% "tokens.dat file was not found."
|
||||
call :dk_color %Red% "tokens.dat file not found."
|
||||
) else (
|
||||
echo tokens.dat file: [%token%]
|
||||
)
|
||||
|
@ -620,14 +620,14 @@ for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT
|
|||
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" (
|
||||
set badregistry=1
|
||||
echo:
|
||||
call :dk_color %Red% "Correct path was not found in the TokenStore registry. [%tokenstore%]"
|
||||
call :dk_color %Red% "Correct path not found in TokenStore Registry [%tokenstore%]"
|
||||
)
|
||||
|
||||
:: Check sppsvc permissions and apply fixes
|
||||
|
||||
if %winbuild% GEQ 9200 if not defined badregistry (
|
||||
echo:
|
||||
echo Checking for SPP permission related issues...
|
||||
echo Checking SPP permission related issues...
|
||||
call :checkperms
|
||||
if defined permerror (
|
||||
call :dk_color %Red% "[!permerror!]"
|
||||
|
@ -651,7 +651,7 @@ if %winbuild% LSS 9200 (
|
|||
REM Fix issues caused by Update KB971033 in Windows 7
|
||||
REM https://support.microsoft.com/help/4487266
|
||||
echo:
|
||||
echo Checking for update KB971033...
|
||||
echo Checking Update KB971033...
|
||||
%psc% "if (Get-Hotfix -Id KB971033 -ErrorAction SilentlyContinue) {Exit 3}" %nul%
|
||||
if !errorlevel!==3 (
|
||||
echo Found, uninstalling it...
|
||||
|
@ -726,13 +726,13 @@ goto :repairoffice
|
|||
call :scandatospp check
|
||||
|
||||
if not defined token (
|
||||
call :dk_color %Red% "tokens.dat file was not found."
|
||||
call :dk_color %Red% "tokens.dat file not found."
|
||||
) else (
|
||||
echo tokens.dat file: [%token%]
|
||||
)
|
||||
|
||||
echo:
|
||||
echo Stopping the osppsvc service...
|
||||
echo Stopping osppsvc service...
|
||||
%psc% Stop-Service osppsvc -force %nul%
|
||||
|
||||
echo:
|
||||
|
@ -746,7 +746,7 @@ echo:
|
|||
)
|
||||
|
||||
echo:
|
||||
echo Starting the osppsvc service to generate tokens.dat...
|
||||
echo Starting osppsvc service to generate tokens.dat...
|
||||
%psc% Start-Service osppsvc %nul%
|
||||
call :scandatospp check
|
||||
if not defined token (
|
||||
|
@ -929,7 +929,7 @@ goto :at_back
|
|||
)
|
||||
|
||||
echo:
|
||||
echo Checking WMI...
|
||||
echo Checking WMI
|
||||
call :checkwmi
|
||||
|
||||
:: Apply basic fix first and check
|
||||
|
@ -961,18 +961,18 @@ echo Winmgmt service is corrupted, aborting...
|
|||
goto :at_back
|
||||
)
|
||||
|
||||
echo Disabling Winmgmt service...
|
||||
echo Disabling Winmgmt service
|
||||
sc config Winmgmt start= disabled %nul%
|
||||
if %errorlevel% EQU 0 (
|
||||
echo [Successful]
|
||||
) else (
|
||||
call :dk_color %Red% "[Failed, aborting...]"
|
||||
call :dk_color %Red% "[Failed] Aborting..."
|
||||
sc config Winmgmt start= auto %nul%
|
||||
goto :at_back
|
||||
)
|
||||
|
||||
echo:
|
||||
echo Stopping Winmgmt service...
|
||||
echo Stopping Winmgmt service
|
||||
%psc% Stop-Service Winmgmt -force %nul%
|
||||
%psc% Stop-Service Winmgmt -force %nul%
|
||||
%psc% Stop-Service Winmgmt -force %nul%
|
||||
|
@ -981,7 +981,7 @@ echo [Successful]
|
|||
) || (
|
||||
call :dk_color %Red% "[Failed]"
|
||||
echo:
|
||||
call :dk_color %Blue% "It is 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:
|
||||
choice /C:21 /N /M "> [1] Restart [2] Revert Back Changes :"
|
||||
|
@ -993,7 +993,7 @@ exit
|
|||
)
|
||||
|
||||
echo:
|
||||
echo Deleting WMI repository...
|
||||
echo Deleting WMI repository
|
||||
rmdir /s /q "%SysPath%\wbem\repository\" %nul%
|
||||
if exist "%SysPath%\wbem\repository\" (
|
||||
call :dk_color %Red% "[Failed]"
|
||||
|
@ -1002,7 +1002,7 @@ echo [Successful]
|
|||
)
|
||||
|
||||
echo:
|
||||
echo Enabling Winmgmt service...
|
||||
echo Enabling Winmgmt service
|
||||
sc config Winmgmt start= auto %nul%
|
||||
if %errorlevel% EQU 0 (
|
||||
echo [Successful]
|
||||
|
@ -1013,17 +1013,17 @@ call :dk_color %Red% "[Failed]"
|
|||
call :checkwmi
|
||||
if not defined error (
|
||||
echo:
|
||||
echo Checking WMI...
|
||||
echo Checking WMI
|
||||
call :dk_color %Green% "[Working]"
|
||||
goto :at_back
|
||||
)
|
||||
|
||||
echo:
|
||||
echo Registering .dll's, compiling .mof's and .mfl's...
|
||||
echo Registering .dll's and Compiling .mof's, .mfl's
|
||||
call :registerobj %nul%
|
||||
|
||||
echo:
|
||||
echo Checking WMI...
|
||||
echo Checking WMI
|
||||
call :checkwmi
|
||||
if defined error (
|
||||
call :dk_color %Red% "[Not Responding]"
|
||||
|
@ -1079,7 +1079,7 @@ echo:
|
|||
echo %line%
|
||||
echo:
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press [0] to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
|
@ -1123,7 +1123,7 @@ exit /b
|
|||
|
||||
:checkperms
|
||||
|
||||
:: This code checks if SPP has permission access to tokens folder and required registry keys. Incorrect permissions are often set by HWID gaming spoofers.
|
||||
:: This code checks if SPP has permission access to tokens folder and required registry keys. Incorrect permissions are often set by gaming spoofers.
|
||||
|
||||
set permerror=
|
||||
if not exist "%tokenstore%\" set "permerror=Error Found In Token Folder"
|
||||
|
@ -1138,7 +1138,7 @@ if !errorlevel!==2 (
|
|||
if "%%A"=="%tokenstore%" (
|
||||
set "permerror=Error Found In Token Folder"
|
||||
) else (
|
||||
set "permerror=Error Found In SPP registries"
|
||||
set "permerror=Error Found In SPP Registries"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1191,7 +1191,7 @@ if ($env:permerror -eq 'Error Found In SPP Registries') {
|
|||
# Fix perms for SPP in HKU\S-1-5-20
|
||||
# https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
|
||||
|
||||
if ($env:permerror -ne 'Error found in S-1-5-20 SPP') {
|
||||
if ($env:permerror -ne 'Error Found In S-1-5-20 SPP') {
|
||||
exit
|
||||
}
|
||||
if (-not (Test-Path 'Registry::HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform')) {
|
||||
|
@ -1377,7 +1377,7 @@ if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
|||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press [0] to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
|
|
Loading…
Reference in New Issue