Agent Uninstallation

Agent Uninstallation

Uninstall the agent if you encounter problems with the agent program and then reinstall it immediately.

When you query agents from Threat Mitigator’s Threat Management screen, uninstalled agents may appear in the query result and their status is Disconnected. These agents will automatically be removed from the Threat Mitigator database if the agents are not reinstalled within 7 days.

Uninstallation from the TMAgent Manager Console

Agents installed remotely from the TMAgent Manager console can also be uninstalled from the same console. During agent uninstallation, TMAgent Manager client is also uninstalled.

  1. Select the endpoints from which the agent will be uninstalled.

  2. Click Uninstall TMAgent. A confirmation message displays.

  3. Check the uninstallation status under the Status column. After the agent uninstalls, "N/A" displays under the TMAgent Version and Server Address columns.

Uninstallation from Control Panel

Like most Windows-based applications, you can uninstall the agent from Control Panel.

  1. Click Start > Control Panel > Add or Remove Programs. The Add or Remove Programs screen appears.

  2. Locate Trend Micro Threat Management Agent, and then click Remove. A confirmation dialog box appears.

  3. Click Yes. The Threat Management Agent uninstaller checks and removes related settings before removing the files.

Uninstallation using a Logon Script

Create a logon script that uninstalls the agent when the endpoint joins a domain.

For example:

@ECHO OFF

if exist %windir%\PEAgent\PEAgentMonitor.exe msiexec /uninstall "\\x.x.x.x\PEAgent.msi" /quiet

Replace x.x.x.x with the IP address of the computer where PEAgent.msi is located.

Uninstallation from a Command Line Interface

On the endpoint from which the agent will be uninstalled, open a command prompt, change the directory to %windir%\PEAgent and then run the following command:

PEAgent.exe /uninstall

This command notifies the Threat Management Agent to unregister from Threat Mitigator and then uninstall itself. Check the resulting uninstallation log in:

%windir\PEAgent\msiRemoteUninstallTMAgent.log

Uninstallation from Trend Micro Endpoint Security Platform

Create a task that silently uninstalls the agent from the endpoint. The script for the task can check whether the following key exists before uninstallation:

HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\Policyenforcer\ProductCode

The following is a sample script for this task:

Relevance:

(name of it = "Win2000" OR name of it = "WinXP" OR name of it = "Win2003" OR (name of it = "WinVista" and product type of it = nt workstation product type) OR (name of it = "Win2008" or (name of it = "WinVista" and product type of it != nt workstation product type))) of operating system AND TRUE AND (if (exists file "msiexec.exe" of system folder) then true else false) AND  (if (exists key "HKEY_LOCAL_MACHINE\Software\TrendMicro\Policyenforcer" whose (exists value "ProductCode" of it) of registry) then TRUE else FALSE)

Actions:

wait "{pathname of system folder & "\msiexec.exe"}" /x "{(value "ProductCode" of key "HKEY_LOCAL_MACHINE\Software\TrendMicro\Policyenforcer" of registry as string)}" /qn

See also: