AutomoxAutomox

Worklet: Uninstall CCleaner on Windows

vienna
March 17, 2021 at 5:29 pm UTC

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

Evaluation:

powershell10 lines
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:

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

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack