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 #######