Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Uninstall Software

$
0
0

Many years ago I used to use a kick-a$$ tool called Wise Script Editor.  It was probably the best scriting tool I've ever worked with.  Using this I wrote a script that would Prompt the user to enter a "partial" or "full" name of software you wanted to uninstall as it appeared in Add/Remove.   It would then search the Uninstall Key in the registry, locate the UninstallString, parse out the product code and then run msiexec /x{product code}  
I want to do the same thing with PowerShell so I wanted to find out what keys were avabile.

$get = Get-WmiObject Win32_Product
$get | get-member *

This returns a lot of information but it does NOT have a value for UninstallString.  How come?  

I then ran this code:

$app = Get-WmiObject -Class Win32_Product `
                     -Filter "Name like '%McAfee%'"

$app

It returns information about McAfee but again there is no UninstallString.   So how do you solve this?


Viewing all articles
Browse latest Browse all 6937

Trending Articles