# Retrieving public properties from an MSI file

Is there a tool or mechanism for retrieving the available public properties from a Windows MSI file?

Some vendors that supply MSI files don't document these themselves, so I'm curious to see if there is a way to expose these without the source code.

-
Microsoft's ORCA, Pantaray's SuperORCA and most every other MSI edit will allow you to browse/edit any table including the Property table. Did you have a specific work-flow or use-case outside just poking-around in the MSI? – jscott May 1 '12 at 13:14
I wanted to understand the available public properties so they could be passed accurately during installation, without having to query the vendor or documentation (as this is not always possible). With Puppet we can pass in MSI properties during installation (we wrap misexec.exe), so its handy to have this ability. – Ken Barber May 1 '12 at 22:09
There could be other public properties that you can pass to control the installation although they're not listed in the Properties table. Properties can be set dynamically depending on a condition, Registry search for example. So vendor documentation is the better source of information. – Alexey Ivanov May 2 '12 at 7:45
You can also run the installation with verbose logging to see how properties change their values. – Alexey Ivanov May 2 '12 at 7:46
Sorry about the delay - I've tried Orca and its fascinating, but I've confirmed the behaviour you describe @AlexeyIvanov - that is, some properties won't appear. I confirmed this with splunk.msi and its docs. I'm guessing the ones that appear in Orca have defaults, but this isn't a canonical list. Can you explain a bit more about the verbose logging methodology? – Ken Barber May 2 '12 at 21:11

Given that MSI file store public properties in an internal database, you can actually just query them out using VBScript and SQL.

Here's an example script that will return all properties stored in the MSI file. It is convention to use capital letters to define public properties, so that is how they are usually identifiable.

-

Lessmsi provides a command line as well as interactive application for retrieving any attribute from the .msi.

Interactively, open the .msi then go to Table view and select or type "Property". However while this gives the property names it doesn't give the valid values for said property.(Or I haven't discovered the right place to look.)

Command line to list Properties table to console (frustratingly, can't be captured with simple > output.csv redirect)

lessmsi l -t Property ...\path\to\setup.msi

-

I think that now probably the best way of doing it is using powershell. Here is a script that does the job really well: https://gallery.technet.microsoft.com/scriptcenter/Get-MsiDatabaseProperties-09d9c87c

-
This answer is just a link, which can change/disappear. – David Makogon May 15 at 11:12
There are other answers that are simply a link. I don't feel comfortable copying and pasting other people code.I think my answer gives an alternative option and I really don't understand the down vote. – gigi May 17 at 12:45