Skip to main content

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
Be the first to reply!

Reply