Uninstalling multiple programs in Windows 7?

4

3

This question has a different intent than "Why can't you uninstall multiple programs at once in Windows?"

The answers in that question focused strictly on why windows doesn't allow "simultaneous" de-installation of programs.

I am interested in how to uninstall multiple programs WITHOUT clicking on endless "are you sure?" or dialogs nagging me about dependencies for each item I intend to delete. I don't care if the programs are removed one at a time, or simultaneously as long as I don't have to sit there, selecting each program and answering dialogs about it. In a situation where you need to remove 20+ items, this can add up to a lot of time.

There has to be some simple way to do this, right?

The way that I do it now is I go to Control panel, type in a search term in the "Search Programs and Features" textbox, and then individually delete each item that I need to delete. This is fine for 1 or 2 items, but If there are many then what are the options? I wish I could just make multiple selections and have it non-interactively uninstall (after perhaps asking if I am super-duper-sure).

Although this question is similar to "Uninstalling programs silently via CMD", the accepted answer here provides a method to easily search-for and uninstall programs. This is substantially different than creating a script to delete any one program "silently" via a script. One of the other answers also gives a GUI alternative for deleting multiple programs-- again, very different from the other question.

Angelo

Posted 2015-03-23T16:11:44.643

Reputation: 765

possible duplicate of Uninstalling programs silently via CMD

– TheUser1024 – 2015-03-23T16:18:40.523

1@TheUser1024, thanks, I have made the question more specific. Although scripting the de-installation is certainly possible, there would be a lot of set-up time/work to create the script. That is OK for for the use-case of having to repeatedly delete the same things. – Angelo – 2015-03-23T16:34:55.873

Answers

9

You could use PowerShell and WMI to find programs based on search patterns, and then issue an uninstall.

Here's an example script I've used successfully many times:

$apps = Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name like '%Partial Product Name%'"

foreach ($app in $apps) {
    "Name = " + $app.name
    $app.Uninstall()
}

So, for example, changing the filter to '%Microsoft%' would attempt to uninstall every program listed in Add/Remove programs that has the word "Microsoft" in its name.

You could also expand on WMI query (WQL) with OR commands to search for more than one pattern at the same time.

More info:

Ƭᴇcʜιᴇ007

Posted 2015-03-23T16:11:44.643

Reputation: 103 763

Thanks, that doesn't look too painful. Will try it ! – Angelo – 2015-03-23T20:14:50.937

@Techie007 thanks but, how do you do that? I could not past the whole code into the powershell, (it only takes the first line). So I put your code in a script with a .ps1 extension. I then droped it on the pows windows. gives me a restriction error. I wrote on it Set-ExecutionPolicy Unrestricted, the restriction is gone. But when I double click on the link it opens it on notepad. When I write the path to the script and press enter nothing happens. (Right click/run in powershell opens a blank windows). – JinSnow – 2017-02-16T18:00:05.220

I also did set-executionpolicy remotesigned just in case... – JinSnow – 2017-02-16T18:12:34.650

1By the way, if you want to uninstall Items from a specific date use a select like: $apps = Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE InstallDate like '20170119'" to get all items installed on 19.01.2017 use AND and OR – Feirell – 2018-01-23T19:49:37.273

1

According to here, Get-WmiObject has been deprecated in recent versions of Powershell, and the command to use now is Get-CimInstance -ClassName Win32_Product

– jat255 – 2019-01-31T19:06:11.497

1

It's possible but not via Windows. You would need 3rd party software to uninstall in bulk. Here is a list of some good ones: http://www.makeuseof.com/tag/install-uninstall-programs-bulk-windows/

Zvi Twersky

Posted 2015-03-23T16:11:44.643

Reputation: 252

2Welcome to Super User! Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change. – DavidPostill – 2015-03-24T08:23:02.447

0

Using a 3rd party program like RevoUninstaller Pro is more efficient. You just shift+ left click on the programs you want to uninstall, and then press "quick uninstall" and it will go through each one in order and prompt the uninstall process.

You also get the additional service of additional search after each uninstall to completely clean the registry and such of leftover files.

It doesn't matter if you originally used RevoUninstall to record the original installation.

Jon Grah

Posted 2015-03-23T16:11:44.643

Reputation: 346