Skip to main content

Worklet: Uninstall CCleaner on Windows


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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings