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.
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
lessmsi is a great tool that certainly works here if you're willing to pop open its GUI and do some manual investigation. However, I will say, that the following command does not reliably present all properties:
lessmsi l -t Property <msi_name>
One way to (better) guarantee that you get all the possible properties is to actually perform either an installation, repair, or uninstall with the MSI file and log the process. The following command records only the properties and nothing else:
<msi_name> /lp! <msi_property_logfile>
The above command is equivalent to:
msiexec /lp! <msi_property_logfile> /i <msi_name>
My preferred method, however, is to not actually install/remove/repair (and to simply extract instead). The advantages this method has over lessmsi is that it doesn't require a 3rd-party utility (i.e. lessmsi), and it doesn't require you to mess with any installations. Given that you have enough disk space to actually install the program, you can do:
msiexec /a <msi_name> /lp! <msi_property_logfile> TARGETDIR=<absolute_path_to_extract_to>
Note that the <absolute_path_to_extract_to>
can point to a nonexistent directory (the command will create the directories necessary or fail).
If you hate the installation UI for whatever reason you can append the /qr
option, which will 'reduce' and possibly eliminate the UI without impairing the property logging process. Be warned however--if you go "lower" than the reduced UI (viz. /qb
|/passive
or /qn
|/quiet
), your <msi_property_logfile>
may be missing some properties.