2022-12-25 20:52:46 +01:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
|
2023-01-22 15:35:39 +01:00
|
|
|
if EXIST "%ProgramFiles%\Microsoft Update Health Tools" (
|
|
|
|
sc stop uhssvc
|
|
|
|
sc delete uhssvc
|
|
|
|
|
|
|
|
echo removing PC health update folder ...
|
2024-07-18 14:18:49 +02:00
|
|
|
superuser /sw cmd.exe /C rd /S /Q "%ProgramFiles%\Microsoft Update Health Tools" 2>nul
|
2023-01-22 15:35:39 +01:00
|
|
|
)
|
|
|
|
|
2022-12-26 19:04:35 +01:00
|
|
|
if NOT exist "%ProgramFiles%\PCHealthCheck\PCHealthCheck.exe" (
|
|
|
|
echo PC health check is NOT installed!
|
|
|
|
echo ####### %0 #######
|
|
|
|
exit /b
|
|
|
|
)
|
|
|
|
|
2022-12-25 20:52:46 +01:00
|
|
|
echo KILLING PC health check ...
|
|
|
|
taskkill /f /im PCHealthCheck.exe > NUL 2>&1
|
|
|
|
|
|
|
|
echo DELETING PC health check folder ...
|
|
|
|
rd "%ProgramFiles%\PCHealthCheck" /Q /S > NUL 2>&1
|
|
|
|
|
|
|
|
echo remove PC health check from application list ...
|
2022-12-26 19:04:35 +01:00
|
|
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7B1FCD52-8F6B-4F12-A143-361EA39F5E7C}" /f > NUL 2>&1
|
|
|
|
rem ... also the german registry entry ...
|
|
|
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B3956CF3-F6C5-4567-AC38-1FD4432B319C}" /f > NUL 2>&1
|
2022-12-25 20:52:46 +01:00
|
|
|
|
|
|
|
echo removing PC health check registry keys ...
|
2022-12-26 19:04:35 +01:00
|
|
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealthCheck" /f > NUL 2>&1
|
|
|
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHC" /f > NUL 2>&1
|
|
|
|
|
|
|
|
echo blocking Microsoft reinstall attempts ...
|
|
|
|
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealthCheck" ^
|
|
|
|
/v "installed" /t REG_DWORD /d 1 /f > NUL 2>&1
|
|
|
|
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHC" ^
|
|
|
|
/v "PreviousUninstall" /t REG_DWORD /d 1 /f > NUL 2>&1
|
2022-12-25 20:52:46 +01:00
|
|
|
|
|
|
|
echo removing link in Start menu ...
|
2023-02-24 12:22:13 +01:00
|
|
|
del /F /Q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\PC Health Check.lnk" 2>nul
|
2022-12-25 20:52:46 +01:00
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
|