Hi all, here’s a Worklet to uninstall Notepad++ (we now use Visual Studio Code)
Evaluation:
if (Test-Path -Path "C:\Program Files\Notepad++")
{
Write-Output "Notepad++ not installed, skipping"
exit 0
}
else
{
Write-Output "Notepad++ installed, we will uninstall"
Exit 1
}
Remediation:
Write-Output "Notepad++ installed, now removing"
Start-Process -FilePath "C:\program files\notepad++\uninstall.exe" -ArgumentList "/S" -WindowStyle Hidden -Verbose
Remove-Item "C:\program files\notepad++" -Confirm:$false -Verbose
Write-Output "Notepad++ uninstalled"