Question: How can I find the GUID of an MSI package? I would like to script the removal of a program on a large number of desktops by using: 

> 
> msiexec.exe /x *ProductCode*
> 
> 
> 

Any reason why this would not work for any applications listed in "Add/Remove Programs?"

Answer: 
**UPDATE**: Try this stackoverflow.com answer instead: [**How can I find the product GUID of an installed MSI setup?**](https://stackoverflow.com/questions/29937568/how-can-i-find-the-product-guid-of-an-installed-msi-setup) or even this one: [Find GUID From MSI File](https://stackoverflow.com/questions/11251034/find-guid-from-msi-file).

---

The **Windows SDK** tool **Orca** will allow you to open and view all tables in an MSI file. Once you have the MSI open, you can either navigate to the Property table and look for the "product code" entry, or you can select "View => Summary Information..." and look for the "package code" entry. Either the package or the product guid can be used for uninstall.

See an **Orca screenshot** of how to find the product code in the MSI: [WiX - Doing a major upgrade on a multi instance install](https://stackoverflow.com/questions/22860622/wix-doing-a-major-upgrade-on-a-multi-instance-install/22862283#22862283)

There are also **other ways** to find the GUID:

> 
> **`HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall`**
> 
> 
> **`HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall`**
> 
> 
> **`HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall`**
> 
> 
> 

It still appears you have to download the MSI SDK to obtain Orca. If you don't have access to Orca and can't be bothered downloading the SDK, any viewer capable of reading a MSSQL database file (com stuctured storage file), should be able to open the MSI file and view the contents. Make a copy of the MSI before opening it in a viewer and open the copy. Just to be sure. Once open you navigate to the Property table and look for the product GUID.

**UPDATE**: [**A list of free MSI viewers (towards bottom)**](https://stackoverflow.com/questions/48482545/how-can-i-compare-the-content-of-two-or-more-msi-files/48482546#48482546).

Also check these posts on **stackoverflow.com** with information on how to uninstall via **Powershell**:

* [How to uninstall with msiexec using product id guid without .msi file present](https://stackoverflow.com/questions/21491631/how-to-uninstall-with-msiexec-using-product-id-guid-without-msi-file-present/21502621#21502621)
* [Uninstall script not performing correctly](https://stackoverflow.com/questions/25364258/uninstall-script-not-performing-correctly/25374825#25374825)
* [**How can I find the product GUID of an installed MSI setup?**](https://stackoverflow.com/questions/29937568/how-can-i-find-the-product-guid-of-an-installed-msi-setup/29937569)
* [Find GUID From MSI File](https://stackoverflow.com/questions/11251034/find-guid-from-msi-file/29938049#29938049)
In Powershell you can query wmi for installations

```
$program = Get-WmiObject -class Win32_Product | ? {$_.Name -eq "Java Auto Updater"} 
$program.IdentifyingNumber #IdentifyingNumber is the guid

```

example to repair

```
msiexec /fa $program.IdentifyingNumber

```