Worklet: Uninstall CCleaner on Windows

  • 17 March 2021
  • 0 replies
  • 78 views

Userlevel 4

Hi all, sharing another worklet we used to uninstall CCleaner, not a common everyday application but might be useful to some.


Evaluation:


if (Test-Path -Path "C:\Program Files\CCleaner") 
{
Write-Output "CCleaner not installed, skipping"
exit 0
}
else
{
Write-Output "CCleaner installed, we will remove"
Exit 1
}

Remediation:


Write-Output "CCleaner installed, now removing" 
Start-Process -FilePath "c:\program files\ccleaner\uninst.exe" -ArgumentList "/S" -WindowStyle Hidden

0 replies

Be the first to reply!

Reply