Question

We have a large C# application which is deployed using an .MSI file which is built through Visual Studio 2010 (or MSBuild.exe) from a .VDProj file. When run normally, the .MSI installer will check that certain pieces of software are installed, and meet some minimum version, and will produce a helpful error message and exit if the version conditions are not met.

This all works fine. However, we are experiementing with using msiexec.exe to run the existing installer silently. If the additional software required for the MSI is already installed, then we get a 0 error code back from the msiexec, and likewise, if the MSI fails because other software does not exist on the system or fails the minimum version requirement, we get a non-zero error code back.

Is there any way to programmatically interrogate the .MSI file and find out what it's launch conditions are? I've tried experimenting with msiexec to extract the files from the .MSI, but I still can't see any kind of config file which lists the minimum version requirements for the install.

Any help would be much appreciated.

Was it helpful?

Solution

Interrogating the MSI to see the conditions inside will indeed give you the list of said conditions, but not which one failed. You may want to run msiexec with the /L to switch to have better logging (please refer to the doc for precise syntax).

If the list of conditions is enough, I'd suggest to have a look at Orca (MSDN), an easy way to peep inside .msi files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top