From f9f386a896f1b4233b806d28d7901b942aff6329 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 30 Aug 2024 02:58:38 +0530 Subject: [PATCH] Detect SPP's PerfOptions registry in IFEO, and remove it in troubleshoot script --- .../MAS_AIO-CRC32_43EF5026.cmd | 21 ++++++++++++++++--- .../Activators/HWID_Activation.cmd | 12 ++++++++--- .../Activators/KMS38_Activation.cmd | 12 ++++++++--- .../Activators/Ohook_Activation_AIO.cmd | 12 ++++++++--- .../Activators/Online_KMS_Activation.cmd | 12 ++++++++--- MAS/Separate-Files-Version/Troubleshoot.cmd | 9 ++++++++ 6 files changed, 63 insertions(+), 15 deletions(-) diff --git a/MAS/All-In-One-Version/MAS_AIO-CRC32_43EF5026.cmd b/MAS/All-In-One-Version/MAS_AIO-CRC32_43EF5026.cmd index 848cc7d..069f43c 100644 --- a/MAS/All-In-One-Version/MAS_AIO-CRC32_43EF5026.cmd +++ b/MAS/All-In-One-Version/MAS_AIO-CRC32_43EF5026.cmd @@ -1594,11 +1594,17 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) -for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do ( +for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) ) if defined _sppint ( -echo Checking SPP Interference In IFEO [%_sppint%] +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +if not defined showfix call :dk_color %Blue% "%_fixmsg%" +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) ) @@ -1679,7 +1685,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" ) ) @@ -7848,6 +7854,15 @@ echo: echo Stopping sppsvc service... %psc% Stop-Service sppsvc -force %nul% +set w= +set _sppint= +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% && (set _sppint=1)) +if defined _sppint ( +echo: +echo Removing SPP IFEO registry keys... +for %%# in (SppE%w%xtComObj.exe sppsvc.exe) do (reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" /f %nul%) +) + if %winbuild% LSS 9200 ( REM Fix issues caused by Update KB971033 in Windows 7 REM https://support.microsoft.com/help/4487266 diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 04d0023..c520226 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1359,11 +1359,17 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) -for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do ( +for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) ) if defined _sppint ( -echo Checking SPP Interference In IFEO [%_sppint%] +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +if not defined showfix call :dk_color %Blue% "%_fixmsg%" +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) ) @@ -1444,7 +1450,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" ) ) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 20f3766..ff2db4d 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1502,11 +1502,17 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) -for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do ( +for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) ) if defined _sppint ( -echo Checking SPP Interference In IFEO [%_sppint%] +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +if not defined showfix call :dk_color %Blue% "%_fixmsg%" +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) ) @@ -1587,7 +1593,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" ) ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 78e7912..f15a121 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1811,11 +1811,17 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) -for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do ( +for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) ) if defined _sppint ( -echo Checking SPP Interference In IFEO [%_sppint%] +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +if not defined showfix call :dk_color %Blue% "%_fixmsg%" +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) ) @@ -1896,7 +1902,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" ) ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 70f1359..f5eaf72 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -2860,11 +2860,17 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) -for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do ( +for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) ) if defined _sppint ( -echo Checking SPP Interference In IFEO [%_sppint%] +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +if not defined showfix call :dk_color %Blue% "%_fixmsg%" +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) ) @@ -2945,7 +2951,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" ) ) diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 84e9f65..ae67278 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -648,6 +648,15 @@ echo: echo Stopping sppsvc service... %psc% Stop-Service sppsvc -force %nul% +set w= +set _sppint= +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% && (set _sppint=1)) +if defined _sppint ( +echo: +echo Removing SPP IFEO registry keys... +for %%# in (SppE%w%xtComObj.exe sppsvc.exe) do (reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" /f %nul%) +) + if %winbuild% LSS 9200 ( REM Fix issues caused by Update KB971033 in Windows 7 REM https://support.microsoft.com/help/4487266