Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?"

share|improve this question
    
Just for the record: How can I find the product GUID of an installed MSI setup? (provided the setup is installed on the machine itself - if not get hold of Orca from the Windows SDK or another packaging tool). –  Stein Åsmul Apr 30 at 21:33

4 Answers 4

up vote 6 down vote accepted

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

There are also other ways to find the GUID:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

or

HKEY_CLASSES_ROOT\Installer\Products (look under a GUID for the SourceList items)

The paths are slightly different for a 64-bit computer. I run this old clunker PC at the moment so I don't have the exact 64-bit path.

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.

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

share|improve this answer
    
Good intel! Thanks. –  SturdyErde May 28 '11 at 14:19
    
It can be a real hassle to get hold of Orca.exe since it is only available as part of the SDK. If anyone is in a rush, I am happy to email you a copy. At the moment Microsoft seems to have put it available only in the full SDK: microsoft.com/downloads/en/… . But as you know Microsoft changes things almost daily. –  Stein Åsmul May 28 '11 at 14:48
    
The SDK is fairly simple to get as well...but you do have to download more. A search can also turn up other MSI editors, such as InstEdit. –  SturdyErde May 28 '11 at 15:02

It is a registry key:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{<guid>}

or if the platform is x64 and the application is 32-bit:

HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{<guid>}
share|improve this answer
    
Not only that, but the msiexec command is actually contained in a subkey, "UninstallString!" –  dpurrington Jan 5 at 19:27

Revision Number Summary Property:

[T]he Revision Number Summary property lists the product code GUIDs [...]

share|improve this answer
    
That's a pretty vague answer, but I did find what you were referring to. Thanks –  SturdyErde Jul 31 '10 at 11:53

A light-weight freeware tool like InstEd can be used. Just open the MSI, on the "Tables" tab, click on "Property" on the left, then on the right, locate "ProductCode".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.