Uninstalling Msi package with MSIEXEC

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?


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.


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.