Using msiexec to uninstall programs
5,629
You can list all products and their corresponding Product IDs with the following command:
wmic product get name, IdentifyingNumber
It may take a couple minutes to run and gather the info depending on how many programs you have installed. Once complete, it will output a list like:
{789A5B64-9DD9-4BA5-915A-F0FC0A1B7BFE} Java Auto Updater
{26A24AE4-039D-4CA4-87B4-2F03217071FF} MSXML 4.0 SP2
{46F044A5-CE8B-4196-984E-5BD6525E361D} Apple Software Update
{AC76BA86-7AD7-1033-7B44-AB0000000001} Adobe Reader XI (11.0.10)
etc...
etc...
You can then run the following command to uninstall. Just replace the product key in the example with the product you want to uninstall:
msiexec /x {123A4B56-7CD8-9EF0-123G-H4IJ5K6L7MN8} /q
Related videos on Youtube
Author by
Stian Størstfeskar Andersen
Updated on September 18, 2022Comments
-
Stian Størstfeskar Andersen over 1 year
I have found a batch file that removes a lot of bloatware etc.
Example:
start /wait MsiExec.exe /I{DB731A07-34DE-4BE0-AE94-45C83E28A56C} /quiet
I guess the
{DB731A07-34DE-4BE0-AE94-45C83E28A56C}
is the program. If I have more programs to add to the batch, how can I find this key for them?-
DrColossos over 9 yearsThis should help: stackoverflow.com/questions/450027/…
-
Daniel B over 9 yearsPlease note that this command only applies to programs using Windows Installer. It’s entirely possible (and likely!) for unwanted software to use another installer or even roll their own.
-
-
Stian Størstfeskar Andersen over 9 yearsI see in batch: only for win7. does it work in win8?
-
JSanchez over 9 years@StianStørstfeskarAndersen: Should work. The check is for a "Windows_NT" based OS, which should work. But I can't test as I currently don't have a Win 8.x based system handy. Try it. If not, try the VBScript version.