Sometimes I feel like uninstalls don't get the respect they deserve, and that's partially my fault. I spend much time teaching users how to install software and push out updates and not enough time demonstrating uninstalls. But today, I atone for my lack of uninstall content by dedicating an entire article to silent uninstalls!
Are uninstalls as important as installs?
Installs tend to get most of the attention around here, which makes sense. Installs happen way more frequently than uninstalls. And while I have no scientific evidence to support this theory, think about it. You install applications on your computer, and whether you use them or not, they tend to stay there. And don't even get me started on the constant barrage of updates we install. In most cases, applications and updates stay installed until our computers either get reimaged or the hard drive dies and goes to that big hard drive farm in the sky.
But just because installs happen more often, does that mean they're more important? Is the gas pedal in your car more important than the brake pedal just because you use it more? I think not. In fact, I'd argue the brake pedal is more important. When a deer decides to step onto the road while you're cruising in your Toyota Celica at 50 mph, you'll be extremely grateful for that brake pedal. The same can be said for uninstalls. Sure, an uninstall won't save your life. But if you need to remove an application with a vulnerability, that uninstall is suddenly very important.
How to silently uninstall applications with PDQ Inventory
PDQ Inventory automatically records the uninstall strings for applications on managed devices. But did you know that Inventory can also silently uninstall applications? It's one of Inventory's lesser-known features — and one of its most useful. Here's how it works.
PDQ Inventory retrieves uninstall strings from the registry. Depending on the application, this information may not always be accurate. Scan and verify the application has been removed after using this method.
In PDQ Inventory, double-click on a computer to open its details window.
Click on the Applications menu option. Here you'll find a list of installed applications and their uninstall strings.
Right-click on an application, then click Uninstall.
Review the settings on the remote run command window, then click Execute when ready. Note that the computer you are running the command against is shown in the bottom left corner of the remote command window.
Once the command finishes and the device is scanned, the application is removed from the applications list. With just a few clicks, we silently uninstalled an application from a managed device. However, while uninstalling applications with Inventory is quick and easy, it's not the most efficient option if you need to remove an application from many devices. For that, we'll want to look at a tool better suited for the job, like PDQ Deploy. Or, if you're managing remote devices, PDQ Connect.
How to find silent uninstall parameters
Before making an uninstall package, we first need to find the silent parameters for the application we're uninstalling. If you're dealing with an MSI file, you can skip this step. Since MSIs are standardized, PDQ Deploy automatically fills in your silent parameters.
If you're dealing with some other file type, like an EXE file, then you might have some detective work to do. Let's look at a few ways to find silent parameters.
Find silent parameters with PDQ Inventory
PDQ Inventory is a great place to start when looking for silent uninstall parameters. As shown in the example above, Inventory documents the uninstall strings for installed applications. You can copy the uninstall command, including the silent parameter, and put it into a custom deployment package.
Find silent parameters with usage statements
A usage statement provides instructions on invoking a program from a command-line interface (CLI). Usage statements include arguments that can be passed to the program, including silent parameters. Usage statements may also include detailed descriptions and examples. Many, but not all, applications provide usage statements.
Most usage statements can be displayed by appending "/?" to the end of the command invoking an application.
Find silent parameters on the internet
Though I probably don't need to mention this option, I will anyway. The internet is a great way to find silent parameters. I know it's shocking that the internet continues to be a great resource for information. Who knew?
Sarcasm aside, most developers understand the importance of silently installing and uninstalling applications and generally provide detailed usage information on their websites. And even if the developer doesn't provide the information, you'll often find other users that have already documented the silent uninstall process for a given application.
Find silent parameters using Universal Silent Switch Finder (USSF)
If you've used PDQ Inventory, the usage statement, and Google and still haven't found what you're looking for, give USSF a try. USSF is a dedicated application for finding silent parameters. While I've had mixed results using USSF, it's definitely worth a try if you're desperate to find a silent switch.
If you want more information on this topic, we're got an entire blog about finding silent parameters.
How to create an uninstall package with PDQ Inventory & Deploy
Creating a silent uninstall package with PDQ Inventory & Deploy is so easy it almost feels like cheating. Not only does Inventory provide us with the silent uninstall string, but it also gives us the option to create an uninstall package in Deploy automatically. Here's how.
In PDQ Inventory, double-click on a computer to open the computer details window.
Click on the Applications menu option.
Right-click on an application row you want to uninstall, then click Create Uninstall Package in PDQ Deploy.
PDQ Deploy automatically opens a custom package window containing the uninstall command. Review the package settings, then click Save.
Close the package window.
To deploy the newly created uninstall package:
Locate and right-click the newly created package in PDQ Deploy, then click Deploy Once.
Add targets to the deployment, then click Deploy Now.
At this point, you can grab some coffee and let PDQ Deploy do its thing. The deployment window lets you know when the uninstall package has finished deploying.
If we go back into PDQ Inventory, we can see that AutoHotkey is no longer listed as an installed application.
How to create a silent uninstall package with PDQ Connect
PDQ Connect is our agent-based solution designed to manage those hard-to-reach remote devices. True to our brand, Connect makes creating and deploying uninstall packages easy. Here's how to create and deploy a silent uninstall package in PDQ Connect.
In PDQ Connect, click on a device link.
Click on the Software menu option.
Locate the Uninstall string column, then copy the uninstall string for the application you want to remove.
Click Packages, then click Create package.
Name the package, then click the Add install step drop-down menu, and select Add PowerShell step.
Enter cmd.exe /c followed by the command you copied into the PowerShell command window. Ensure you add a space between /c and your command.
Click Save to save and close the package.
All that's left is to deploy the uninstall package. To do so, simply select the package, click Deploy, add your targets, then click Deploy.
When the deployment finishes, scan your devices, then confirm that the application has been uninstalled.
How to automate silent uninstalls
When I thought about why someone might want to automate an uninstall, it took me a while to come up with a good reason. But then it came to me. Have you ever had a user install an application they weren't supposed to? And even though you've threatened them and removed it, they install it again. That, my fellow sysadmins, is the use case for an automated uninstall.
Luckily, setting up automated uninstalls in PDQ Deploy and PDQ Connect is easy, especially if you've already created your uninstall package. Here's how to automate a silent uninstall in PDQ Deploy.
Right-click on the uninstall package in PDQ Deploy, then click New Schedule.
Give the schedule a name, then click the Triggers tab if it's not already selected.
Configure your deployment schedule. I'll set my schedule to run weekly using the Weekly trigger and configure it to run every Wednesday at 4:00 p.m.
Once you've got your schedule configured, click the Targets tab.
Enter the name of the computers you want to deploy this package to or click the Choose Targets button to select targets from a source like Active Directory or PDQ Inventory.
Click the Packages tab, and ensure your uninstall package is attached. If it's not attached, click Attach Packages and attach it.
Click the Options tab, then uncheck Stop deploying to targets once they succeed. This ensures the uninstall package is always sent to the targeted devices.
Click OK to save and close the Schedule window.
I recommend targeting a PDQ Inventory collection with this type of schedule because the computers are only targeted when they rejoin the application collection.
If you want to configure a similar setup in PDQ Connect, here's how to do it.
Click the Automation menu option.
Click Create automation.
Enter a name for the automation.
In the Packages search field, search for or enter the name of the package you want to automate.
Configure the deployment trigger and schedule to meet your needs.
In the Deploy to field, add your targets, then click Save.
Congrats! Your automated uninstall package is ready to teach your users a lesson about what they should and shouldn't install on their computers!
Give your uninstalls the attention they deserve
PDQ's products are designed to simplify your endpoint management needs, including your uninstalls. The Package Library in PDQ Deploy has over 90 prebuilt uninstall packages, and Connect's list of uninstall packages is rapidly growing. If you're struggling to manage your managed endpoints’ applications, try out PDQ Deploy & Inventory or PDQ Connect for free for 14 days. There's a good chance we've already built a package for whatever you're trying to uninstall.