Skip to main content

Trend Micro Uninstall bypass script to adjust registry

# NOTE: YOU PROBABLY HAVE TO STOP TREND MICRO SERVICES FIRST TO ALLOW REGISTRY CHANGE
# Check for Administrator privileges
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)

if (-not $isAdmin) {
    # Restart the script with Admin privileges
    Start-Process powershell.exe -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
    Exit
}

# Define registry paths and values
$registryPath = "HKLM:\SOFTWARE\Wow6432Node\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc"Misc."
$valueName    = "Allow Uninstall"
$valueData    = 1

# Check if the registry key path exists
if (Test-Path $registryPath) {
    # Set or create the registry value
    Set-ItemProperty -Path $registryPath -Name $valueName -Value $valueData -Type DWord -Force
    Write-Host "Success: '$valueName' set to $valueData." -ForegroundColor Green
} else {
    Write-Warning "Error: Registry path not found."
}

REFERENCE: https://www.dell.com/support/kbdoc/en-us/000134500/uninstalling-trend-micro-client-server-security-agent-and-a-password-is-requested