Search code examples
wixinstallationwindows-installeradvanced-installer

Silent installation of an MSI package


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.


Solution

  • 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.