Remotely uninstall unwanted software
Hello All,

I'm currently working on a way to uninstall non-IT approved software from any computer with the SCCM Client installed.  I thought this was simple at first... but am finding a few issues, using a few different methods.

Main problem is that using either Powershell, WMIC or the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall 

It doesn't show every program listed in the "Programs and Features"

For example:  I installed Vuze on my computer to test the Uninstall.  

Powershell script:  Get-WmiObject -class Win32_Product | Where-object { $_.name -match "vuze"}  - Doesn't show it

WMIC scipt:  wmic product get name - Doesn't list it, and just typing in wmic product where name="vuze" call uninstall says "No Instance(s) Available.

and am unable to find it in the proper registry key.

Now, I know what you're thinking, "Why don't you push the software with the msiexec /x {Package | ProductCode}?" 

It would mean I would have to download each and every single program I want to be uninstalled, and keep them in my distribution point (and working at a school, that means a lot of programs to download, and a lot of "junk" software as well)

I'm sure this has been done somewhere else before, and I'm going at it the wrong way.  Any help would be appreciated


April 24th, 2015 9:05am

Not sure if this is the reason why I'm not seeing all the programs from "Programs and Features" from any other means, but I've noticed that only programs installed with a .msi extension shows up, anything with a .exe doesn't... or maybe it's just a coincidence
Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 9:13am

Hello,

As I understand it though, your initial question is: How do I get a list of all programs installed on a computer?

If an application is registered in "Programs and Features", the ConfigMgr will collect the information, including the uninstall string (if written in the registry) during the Hardware Inventory.

Not really sure, but I might be missing something here. How will you attempt to do the actual uninstall the applications? If you were to attempt to use the uninstall string, you might still need the source files in some cases in order for a successful uninstall.

April 24th, 2015 9:32am

Hello David,

Thanks for the quick response.  Sorry I wasn't clear, my initial question is "How to uninstall non IT approved software" 

Our users are teenagers, and they all have administrative rights on their computers, and tend to install things by clicking next next next without unchecking things like "Conduit Search Protect" and PC Backup.

I'm trying to make a script to scan the computers and remove the programs everyday

Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 9:42am


 Sorry I wasn't clear, my initial question is "How to uninstall non IT approved software" 

Hello Jacky,

My point was that, since you say that the ConfigMgr client is installed (unless I misunderstood that part), you could use the intentory data to locate both the software, and their uninstall strings and then trigger the uninstalls using this data.

This way, you would not need to invent the inventory part yourself.

April 24th, 2015 9:50am

Try and avoid using WMI to remove applications.

http://gregramsey.net/2012/02/20/win32_product-is-evil/

Windows installer caches a local copy of each MSI on the client machine C:\windows\installer

You do not need to download the application again to remove it from a device.

There are MSI's that don't add themselves to Programs and features.

You might be better limiting who can install software, this will not prevent them from using applications that run from source, I am sure you have come across counter strike portable edition :)

Then there are applications that install to the profile which don't require admin rights.

You will be better spending your time removing admin rights to everyone that doesn't need it then chase up the odd issue afterwards.

Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 10:00am

That sound quite ambitious to me.

If I'm not making even the uninstall key in registry for application doesn't have silent switch meaning you must add that switch manually and it could be different for each application. So it should be quite difficult to automate.

Why don't you take a look at Applocker GPO which allows you to create a whitelist of authorized applications instead ?

April 24th, 2015 11:03am


 Sorry I wasn't clear, my initial question is "How to uninstall non IT approved software" 

Hello Jacky,

My point was that, since you say that the ConfigMgr client is installed (unless I misunderstood that part), you could use the intentory data to locate both the software, and their uninstall strings and then trigger the uninstalls using this data.

This way, you would not need to invent the inventory part you

Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 11:17am

That sound quite ambitious to me.

If I'm not making even the uninstall key in registry for application doesn't have silent switch meaning you must add that switch manually and it could be different for each application. So it should be quite difficult to automate.

Why don't you take a look at Applocker GPO which allows you to create a whitelist of authorized applications ins

April 24th, 2015 11:35am

Hi Jacky,

Please ensure you have enabled the "Installed Software - Asset Intelligence (SMS_InstalledSoftware)" class in your Hardware Inventory Client Settings.

Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 11:36am

Try and avoid using WMI to remove applications.

http://gregramsey.net/2012/02/20/win32_product-is-evil/

Windows installer caches a local copy of each MSI on the client machine C:\windows\installer

You do not need to download the application again to remove it from a device.

There are MSI's that don't add themselves to Programs and features.

You might be better limiting who can install software, this will not prevent them from using applications that run from source, I am sure you have come across counter strike portable edition :)

Then there are applications that install to the profile which don't require admin rights.

You will be better spending your time removing admin rights to everyone that doesn't need it then chase up the odd issue afterwards.

Thanks for the reply.  There's nothing I want to do more than to remove admin rights from all our users, but company policy dictates that they all need it... which makes my job very difficult.

April 24th, 2015 11:39am

Hi Jacky,

Please ensure you have enabled the "Installed Software - Asset Intelligence (SMS_InstalledSoftware)" class in your Hardware Inventory Client Settings.

Hi,

Yes, that has already been enabled

Thanks

Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 11:47am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics