Loading

Follow Us

Follow us on Spiceworks

Subscribe by Email

Your email:

Browse by Tag

Current Articles | RSS Feed RSS Feed

Uninstall Software with PDQ Inventory

  
  
  
  

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 in Pro mode.

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 Adobe Reader

 

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

Remote Command window

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

Silently Uninstall Foxit

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.

try-pdq-inventory-pro-mode

Comments

Finally! I've been wanting this feature for a while. Can't wait to try it. My uninstall finger is itching. Thanks.
Posted @ Thursday, June 28, 2012 8:33 AM by jonathan plaza
My previous comment still hasn't been approved?  
 
Well tried out the uninstall & it works for the most part. Removed "acrobat.com" & old java version. Couldn't get "adobe air" to uninstall. Then I remembered I had to put quotes on. Still couldn't get it to uninstall. The "timeout", as I understood it was meant to timeout if the command hadn't reached the computer in that time? It seems it means if the uninstall hasn't completed by that timeout then the uninstall aborts? Trying it with 5 minute timeout now but I don't think it should take that long to adobe air to uninstall. Hopefully I didn't corrupt it with the previous 3 uninstalls with 60 seconds.  
 
What happens if you run the uninstall command & then close the window?
Posted @ Friday, June 29, 2012 8:53 AM by jonathan plaza
Ok I noticed one thing with the uninstall. It won't work on multiple computers at once. I once used a program called purgos (now dead). It allowed you to remove programs from a bunch of computers at once by listing the software that all of them had in common. So when you removed one piece of software it did it to all that had that software. This would be a great feature if you guys could add it.
Posted @ Friday, June 29, 2012 8:57 AM by jonathan plaza
Good questions. 
 
The timeout is for the command to complete, it's there to prevent waiting forever for a command that's waiting for user input. If this happens depends on the uninstaller. Not all uninstallers work silently, even though they may have a silent option. 
 
Closing the command window will abort the command, or at least, PDQ Inventory will send an abort to the computer. It may not get there in time to do anything, though. 
 
If you want to uninstall several at a time you can copy/paste the uninstall string to a new remote command window opened for several computers at once. You can select multiple computers in the collection list or select a collection in the tree on the left.  
 
Additionally you can copy/paste the uninstall string to PDQ Deploy into an installer with a Command step. We'll be adding a way to do this directly in the future without having to copy and paste.
Posted @ Friday, June 29, 2012 1:35 PM by Adam Ruth
Comments have been closed for this article.