DNS Filter Uninstall

Currently DNS Filter Uninstall is using the MSI method but we have seen it fail and the service is still running which means its still checking into the portal.

I have been using this for the Non WhiteLabel Version:
wmic product where name=“DNSFilter Agent” call uninstall

This for the Whitelabel Version:
wmic product where name=“DNS Agent” call uninstall

I would also do a service check and confirm if DNS Agent or DNSFilter Agent service are still running if so I run:
sc stop “DNSFilter Agent”
sc delete “DNSFilter Agent”

sc stop “DNS Agent”
sc delete “DNS Agent”

Can you guys add this method to the uninstall process so we can fully remove DNS Filter.

I recommend not using the “product” wmi class. It causes a consistency check against all software, and if it finds anything reporting even the tiniest error it will perform a repair install on that program without warning. This occurs even for queries. The Microsoft documentation has this issue mentioned in detail on the Win32_Product documentation.

Alternatively, I would suggest finding and running the uninstall string manually from the registry, which isn’t too hard.
64-Bit apps can be found in:
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”

and 32-Bit apps can be found in:
“HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall”

Just look in each key until you find a display name value that matches your software. The uninstall string will be in the same key.

ImmyBot even has some functions that kind of automate this:
Uninstall-Software or Uninstall-MSI

For reference:
Win32_Product class (Windows) | Microsoft Learn

1 Like

@lht_ro if you uninstall the software manually from add/remove programs does it also leave the services behind?

If it does that might be something better suited to the vendor to resolve.

We could likely do a post uninstall script to help clean up after it, but I am curious if their installer even from the ui leaves it behind.

What @Dakota_Lewis said is right best to avoid where possible, DNS Filters uninstall does suggest what @lht_ro was saying and likely why he has been using it Windows Roaming Client Deployment Guide – DNSFilter