AutomoxAutomox

Worklet - Uninstall Notepad++

vienna
April 22, 2021 at 2:58 pm UTC

Hi all, here’s a Worklet to uninstall Notepad++ (we now use Visual Studio Code)

Evaluation:

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

powershell4 lines
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"

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

Discuss on Slack