Uninstalling Msi package with MSIEXEC

13

6

I need to uninstall a MSI package through command line. So i used:

msiexec /x package.msi

But this command requires the package.msi to be present in the local machine.

I want to uninstall the msi even if the msi file is missing.

How can I do that?

Sandeep

Posted 2011-06-06T13:19:34.100

Reputation: 370

See here for a list of different ways to uninstall an MSI: http://stackoverflow.com/a/1055933/129130

– Stein Åsmul – 2014-04-18T21:44:23.107

Answers

12

You can uninstall it using the product code:

msiexec.exe /x {your-product-code-guid}

You would obtain this code from the MSI itself, or whatever tool you are using to build the MSI.

Note that when you uninstall a product, it uses a cached MSI, since only the original MSI knows how to uninstall itself. When you use the product code, it uses the cached MSI from C:\WINDOWS\Installer.

vcsjones

Posted 2011-06-06T13:19:34.100

Reputation: 2 433

what if you don't have the product id and it doesn't show up under "program and features" after you added the "product id" column? – Tomas Jansson – 2015-05-13T14:04:37.110

Unfortunately, this still shows "Locate MSI file" dialog – Ivan Nikitin – 2016-05-11T21:15:10.013

How can I find the product GUID of an installed MSI setup?. Just in case you don't have the tools to view the MSI file itself. – Stein Åsmul – 2017-08-05T21:18:44.787

6

See my answer on stackoverflow.com for various ways to uninstall MSI files / Windows Installer Packages from your computer.

You can uninstall via: msiexec, ARP, WMI, PowerShell, Deployment Systems such as SCCM, VBScript / COM Automation, DTF, or via hidden Windows cache folders, and a few other options.

Stein Åsmul

Posted 2011-06-06T13:19:34.100

Reputation: 969