How to uninstall software with PDQ Inventory

Shane head shot
Shane Corellian|Updated May 17, 2021
Generic blog header
Generic blog header
Sections
    No Data

    One of the coolest features in PDQ Inventory 1.1.3 is the ability to uninstall software on your managed computers. This feature is available when running PDQ Inventory.

    Under the covers

    When PDQ Inventory scans for installed software it will also look in the registry to see if the software vendor included an Uninstall command. This is the command that is executed when you go into Control Panel > Programs > Programs and Features (or Add/Remove Software in XP) and you select the application you want to remove. The problem, however is that the vast majority of the time this included command does not run the uninstallation silently. Just like with deploying software we have to find the quiet (or silent) method for uninstalling the software.

    Most of the time the uninstall command will simply be calling MsiExec.exe. If we see the uninstall is called via MsiExec.exe we will automatically place the commands needed to run silently. For example, the Uninstall command included with Adobe Reader X (EN-US) is:

    MsiExec.exe /I{AC76BA86-7AD7-1033-7B44-AA1000000001}

    Since this command will not quietly remove Adobe Reader we simply replace the /I with /qn /X

    MsiExec.exe /qn /X{AC76BA86-7AD7-1033-7B44-AA1000000001}

    See the example below where I go to the computer, Archer, and in the Applications pane I right-click on Adobe Reader X and select Uninstall.

    uninstall software with PDQ inventory

    When I select Uninstall the Uninstall string is sent to a Remote Command window.

    Remote Command - ARCHER

    OK, but what about those Uninstall commands that don't include msiexec? Well, this is where you need to do some research. 

    It's all about homework

    Let's look at an example. The computer, Archer, has an old version of Foxit Reader installed. The Uninstall string stored in the registry is:

    "C:\Program Files (x86)\Foxit Software\Foxit Reader\unins000.exe"

    Once again, chances are very good that this command needs to be modified to run silently. A simple google search for

    silent uninstall foxit 5 unins000.exe

    and I was able to quickly determine that I needed to pass the command line parameter: /silent

    "C:\Program Files (x86)\Foxit Software\Foxit Reader\unins000.exe" /silent

    Remote Command - ARCHER - silent

    After I ran a new inventory scan on Archer I verified that both Adobe Reader X and Foxit Reader 5 were no longer installed.

    A few additional points

    If the Uninstall string contains a path with spaces but is not enclosed in quotes, you will receive an error. In the next release we will add quotes to paths that we detect contain spaces but for now, beware. Also, when you add quotes make certain that only the path is enclosed. Do not enclose any parameters in quotes. See the example above where /silent is outside of the end quotes.

    Some applications (such as Microsoft Office) may contain Uninstall strings that have MsiExec however there is additional info needed. To remove Office products you need to include a config.xml file. In these cases we recommend using PDQ Deploy to uninstall. Follow this link for an example of uninstalling Visio 2007.

    Shane head shot
    Shane Corellian

    Shane is the co-founder of PDQ.

    Related articles