From 97cd0a8cdf7fc17dce9301d42a729ddecf8ce7af Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sun, 22 Jan 2023 15:35:39 +0100 Subject: [PATCH] yes - pc health is a pest, and i am the pest patrol... --- scripts/uninstall-pchealth.cmd | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/uninstall-pchealth.cmd b/scripts/uninstall-pchealth.cmd index a58d504..064e3bd 100644 --- a/scripts/uninstall-pchealth.cmd +++ b/scripts/uninstall-pchealth.cmd @@ -2,6 +2,14 @@ echo ####### %0 ####### +if EXIST "%ProgramFiles%\Microsoft Update Health Tools" ( + sc stop uhssvc + sc delete uhssvc + + echo removing PC health update folder ... + nsudo -U:T -P:E cmd.exe /C rd /S /Q "%ProgramFiles%\Microsoft Update Health Tools" 2>nul +) + if NOT exist "%ProgramFiles%\PCHealthCheck\PCHealthCheck.exe" ( echo PC health check is NOT installed! echo ####### %0 ####### @@ -32,8 +40,5 @@ reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHC" ^ echo removing link in Start menu ... del /F "%ProgramData%\Microsoft\Windows\Start Menu\Programs\PC Health Check.lnk" 2>nul -echo removing PC health update folder ... -nsudo -U:T -P:E cmd.exe /C rd /S /Q "%ProgramFiles%\Microsoft Update Health Tools" 2>nul - echo ####### %0 #######