Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out defaults when executing MSI with /qn (silent mode)?

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?

like image 636
Nestor Avatar asked Oct 28 '09 00:10

Nestor


People also ask

How do I run an MSI file in silent mode?

If you are looking for complete silence then you also need the MSI to run in quiet mode. You achieve this by running the msiexec.exe with the /qn switch. This switch means quiet and no interface.

What is silent mode install?

Silent Mode for Windows. The silent installation on Windows performs the install without displaying the end user license agreement. An upgrade from a previous version happens the first time you start DataConnect. You can use the following commands.

What is MSI property?

Properties are global variables used by Windows Installer during an installation. Their values can be set by the operating environment or by authoring them into the installation database.


2 Answers

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

like image 80
Jim Schubert Avatar answered Sep 21 '22 21:09

Jim Schubert


It is correct that you can set PUBLIC properties via the command line. These properties are always uppercase, and generally always listed in the Property table, though this isn't guaranteed to be the case. By reviewing the Property table you should be able to decode what each public property does. If not, there is usually documentation accompanying the MSI in form of a PDF or readme.txt that can help.

With the right tool you can also view the details of each MSI dialog and check the events that have been defined to set them. This requires a tool such as Installshield or Wise.

Another possible option for silent installation is a built-in MSI feature that I have just become aware of: the AdminProperties property. See information here: http://msdn.microsoft.com/en-us/library/aa367542(v=vs.85).aspx

like image 21
Stein Åsmul Avatar answered Sep 20 '22 21:09

Stein Åsmul