Silent installation of a MSI package

WixInstallationWindows InstallerAdvanced Installer

Wix Problem Overview


I have a MSI package that I need to install if the package is not already installed. Also I need to install it silently. The package prompts user for:

  • Installation location (C:\Program Files\Foobar)
  • Install type: minimal and full (minimal)

I need to override these two parameters using command line parameters or some other method. So how do I go about these two issues. I'll use VBScript for scripting.

Wix Solutions


Solution 1 - Wix

You should be able to use the /quiet or /qn options with msiexec to perform a silent install.

MSI packages export public properties, which you can set with the PROPERTY=value syntax on the end of the msiexec parameters.

For example, this command installs a package with no UI and no reboot, with a log and two properties:

msiexec /i c:\path\to\package.msi /quiet /qn /norestart /log c:\path\to\install.log PROPERTY1=value1 PROPERTY2=value2

You can read the options for msiexec by just running it with no options from Start -> Run.

Solution 2 - Wix

The proper way to install an MSI silently is via the msiexec.exe command line as follows:

msiexec.exe /i c:\setup.msi /QN /L*V "C:\Temp\msilog.log"

Quick explanation:

 /L*V "C:\Temp\msilog.log"= verbose logging
 /QN = run completely silently
 /i = run install sequence 

There is a much more comprehensive answer here: https://stackoverflow.com/questions/25229460/batch-script-to-install-msi/25230485#25230485. This answer provides details on the msiexec.exe command line options and a description of how to find the "public properties" that you can set on the command line at install time. These properties are generally different for each MSI.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSalman AView Question on Stackoverflow
Solution 1 - WixPolynomialView Answer on Stackoverflow
Solution 2 - WixStein ÅsmulView Answer on Stackoverflow