views:

398

answers:

1

When I run an MSI (without parameters) I usually have to click my way through dialog boxes and choose if I want to install to current user/all users, the target directory, etc etc. What happens when I run the MSI with /qn (silent mode). How do I find what answers where automatically chosen for all those dialog boxes?

+3  A: 

An MSI is a basically a database. You can use Orca to open it and view/change settings.

  • Information on Orca can be found here.
  • A quick walkthrough on how to use Orca can be found here.
  • Somewhat pertaining to your question, you can edit which users the installer will install in silent mode. Information is here.

I hope this has at least geared you in the right direction.

Edit:

For instance, download the installer for WiX 3.0 and open it in Orca.

  1. Go to the Property table and you will see a list of public (uppercase) and private properties.
  2. Notice that the WIXUI_INSTALLDIR property is set to APPLICATIONFOLDER.
  3. Go to the Directory table, you'll see that APPLICATIONFOLDER is set to have a default of "vqee3ld3|Windows Installer XML v3" or something similar.
  4. To find which dialog sets this property, go to the ControlEvent table. Here, you'll see the InstallDirDlg fires the event SetTargetPath when the user clicks the Next control. The Argument this event sets is WIXUI_INSTALLDIR, which in turn sets APPLICATIONFOLDER

You could try editing these properties and running the installer to see how the properties are changed. If you have default properties you'd like to set you can run. For instance, close Orca to release the lock on the msi file and run:

msiexec /i Wix3.msi APPLICATIONFOLDER="C:\Program Files\WiX" /qn

More on MSI table structures in this powerpoint

Jim Schubert
I'm aware of Orca.. and I know that the dialog boxes basically set values for properties. However.. is there a way to find out what properties are modifies by each dialog box? That's actually the meat of my question. Thanks much!
Nestor
Nestor, I updated my answer with an example of finding default values, which dialog it comes from, and how to override the value in silent install mode. I really only have experience with WiX-generated MSIs, so I added a link to a powerpoint with a nice diagram of core MSI tables in Microsoft installers.
Jim Schubert
+1 for the nice EDIT and the powerpoint. Thanks a lot Jim
Nestor