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

How to manually uninstall Dynatrace OneAgent on Windows

While trying to uninstall an old version of OneAgent on Windows you are 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... 

To solve this issue, either you have to find the exact installer from a different machine or request Dynatrace to provide it to you. Make sure that the version you are 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 do a manual uninstall of OneAgent from the Windows host.
 
Follow the steps below with admin rights or take help from a local Windows administrator to execute the steps:

Manual uninstall of oneagent in case of msi 1603 error:
 

  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 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 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.

Hopefully, by following the manual uninstallation steps, you will be able to uninstall the old OneAgent version. However, if the steps provided did not work, please get in touch with product/tech support at Dynatrace. 

Version history
Last update:
‎05 Jun 2023 09:03 AM
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 Enthusiast
Dynatrace Enthusiast

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