cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nadeem_m
Dynatrace Organizer
Dynatrace Organizer

Abstract

How to manually uninstall Dynatrace OneAgent on Windows hosts.

Problem

While trying to uninstall an old version of OneAgent on Windows you're getting an MSI error 1603

This generally happens if the old .msi package pertaining to the same old version has been removed or deleted from the machine. Windows installer requires the same MSI package to uninstall a product. 

https://learn.microsoft.com/en-us/troubleshoot/windows-server/application-management/msi-installatio... 

Troubleshooting steps

To solve this issue, you must find the exact installer from a different machine or request Dynatrace to provide it to you. Ensure that the version you're requesting is supported at that moment, otherwise, it will require manual uninstallation from the machine.

If you do not have access to the MSI package yet, please manually uninstall OneAgent from the Windows host.
 
Follow the steps below with admin rights or get help from a local Windows administrator to execute the steps:

Manual uninstall of OneAgent in case of msi 1603 error:


In the command prompt, please run the following command to find IdentifyingNumber
>wmic product where name='Dynatrace OneAgent' get IdentifyingNumber

Follow the steps below with admin rights or get help from a local Windows administrator to execute the steps:
After following the steps, in the last please remove all the registry entries with IdentifyingNumber

  1. Uninstall the agent (if uninstall does not work, see the manual cleanup procedure below) 
  2. Reboot (to remove all the injected code)
  3. Delete the INSTALL_DIR and RUNTIME_DIR directories [1].
    Default INSTALL_DIR = C:\Program Files\dynatrace\oneagent
    Default RUNTIME_DIR = %PROGRAMDATA%\dynatrace\oneagent
  4. Delete the following subfolders in %APPDATA%:
    1. OneAgent
    2. ruxit (if present)
  5. Delete %SYSTEMDRIVE%\AI_RecycleBin (if present)
  6. Delete the following file: %SystemRoot%\System32\drivers\oneagentmon.sys
  7. Using pnputil.exe, delete driver from DriverStore
    1. Run pnputil.exe /enum-drivers
    2. Locate driver with the provider name Dynatrace LLC, note the "published name" (e.g. oem2.inf)
    3. Delete driver with pnputil.exe /delete-driver <published name>
  8. Delete the oneagentmon service:
    1. Run sc stop oneagentmon
    2. Run sc delete oneagentmon
    3. If deleting the service with sc.exe fails for whatever reason, you can manually delete the service's registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\oneagentmon
      In case you delete the key manually, be sure to reboot the machine after the last step. Otherwise the service control manager will think the service still exists and re-creating it will fail if the machine is not rebooted in between.
  9. Remove WinPcap by running C:\Program Files\WinPcap\uninstall.exe (note that the OneAgent uninstaller removes WinPcap but keeps uninstall.exe, this step will remove that as well)
  10. Reboot (optional) - needed for Windows to delete registry keys for paths that were removed.

Resolution

Hopefully, you will be able to uninstall the old OneAgent version by following the manual uninstallation steps.

What's next

However, if the steps provided did not work, please contact Product Specialist/Technical Support at Dynatrace, mention that this article was used, and provide the following in the ticket:

Version history
Last update:
‎03 Mar 2025 01:55 PM
Updated by:
Comments
dannemca
DynaMight Guru
DynaMight Guru

Been there, WILL do that, next time. I was like crazy looking for old packages in others hosts lol.

DavidRitter
Dynatrace Helper
Dynatrace Helper

This is very helpful! Thank you!

Romanenkov_Al3x
DynaMight Champion
DynaMight Champion

Thanks for sharing! Briliant!

nadeem_m
Dynatrace Organizer
Dynatrace Organizer

Hi,

For better results, it is advisable to run the following command in command prompt and get the identifying number:

wmic product where name='Dynatrace OneAgent' get IdentifyingNumber

After following the steps, in the last please remove all the registry entries with IdentifyingNumber

Br/Nadeem 

Kenny_Gillette
DynaMight Leader
DynaMight Leader

Hi, assume same instructions today?

nadeem_m
Dynatrace Organizer
Dynatrace Organizer

Yes, it should still work.