-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUninstall Malwarebytes.ps1
More file actions
20 lines (18 loc) · 1.05 KB
/
Copy pathUninstall Malwarebytes.ps1
File metadata and controls
20 lines (18 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Uninstall MalwareBytes Anti-Malware silently if it is installed.
# This script checks for the presence of Malwarebytes Anti-Malware executables and uninstalls them silently if found.
# Check if the following path and executable exist, and then execute them with the arguments "/uninstall /silent /verysilent": "C:\Program Files\Malwarebytes\Anti-Malware\mbuns.exe", "C:\Program Files\Malwarebytes\Anti-Malware\mb4uns.exe", "C:\Program Files\Malwarebytes\Anti-Malware\mb5uns.exe"
$executables = @(
"C:\Program Files\Malwarebytes\Anti-Malware\mbuns.exe",
"C:\Program Files\Malwarebytes\Anti-Malware\mb4uns.exe",
"C:\Program Files\Malwarebytes\Anti-Malware\mb5uns.exe"
)
foreach ($exe in $executables) {
if (Test-Path $exe) {
Write-Host "Found executable: $exe. Attempting to uninstall..."
Start-Process -FilePath $exe -ArgumentList "/uninstall /silent /verysilent /NORESTART" -NoNewWindow -Wait
Write-Host "Uninstall process completed for: $exe"
break
} else {
Write-Host "Executable not found: $exe"
}
}