Use command line parameters with Msiexec

 

We can use the Msiexec command with command line parameters to invoke installation or uninstallation. The Msiexec command uses parameters to give MSI some or all of the information that would normally be specified as part of an interactive installation using the WebSphere MQ Installation Launchpad. To do this, enter the following command at a command line, followed by the parameters you require:

Msiexec [parameters]
The Msiexec command can accept two types of parameters on the command line, these are:

When using property=value pair and command line parameters with the Msiexec command, enter command line parameters first.

If a parameter is specified both on the command line and in a response file, the setting on the command line takes precedence.

A typical example of an Msiexec command is:
Msiexec /i "path\MSI\IBM WebSphere MQ.msi" /l*v c:\install.log /m mif_file
  TRANSFORMS="1033.mst" AGREETOLICENSE="yes" ADDLOCAL="Server" 
where:

/i "path\MSI\IBM WebSphere MQ.msi"

Install the product using the .msi specified.

/l*v c:\install.log

Produce a log file called install.log, containing all information in verbose format.

/m mif_file

Generate a Microsoft System Management Server (SMS) status .mif file called mif_file.

TRANSFORMS="1033.mst"

Specifies that the installation is in U.S. English. For further information about installing in different national languages, see Using transforms with Msiexec.

AGREETOLICENSE="yes"

Accept the terms of the license.

ADDLOCAL="Server"

Install the server feature locally.

 

Parameters

The Msiexec command can take further parameters that are not supported or listed here. If you need details of these, refer to the help file for the Windows Installer that is supplied with the MSI software development kit. See the Microsoft Web site at:

http://www.microsoft.com

Msiexec command line parameters
Parameter Options Description
/a Package Installs a product on the network using administrative installation, that is, installs a source image of the application onto the network that is similar to a source image on a CD.
/i Package|ProductCode Installs or configures a product using the specified .msi file.

The WebSphere MQ Windows Installer package is IBM WebSphere MQ.msi.

/j

[u|m]Package|
[u|m]Package /t TransformList|
[u|m]Package /g LanguageID

Advertises the product.

This option ignores any property values entered on the command line.

u

Advertise to the current user

m

Advertise to all users of this machine

g

Language ID

t

Applies transform to advertised package
/l

[i|w|e|a|r|u|c|m|o|p
|v|+|!]Logfile

Specifies path to log file, with flags to set which information to log.

i

Status messages

w

Recoverable warnings

e

All error messages

a

Startup of actions

r

Action-specific records

u

User requests

c

Initial user interface parameters

m

Out-of-memory or unrecoverable exit information

o

Out-of-disk-space messages

p

Terminal properties

v

Verbose output

+

Append to existing file

!

Flush each line to the log

*

Log all information except for the v option. To log all information including the v option, specify "/l*v"

microwaveup"<path><Logfile.log>"

Create a verbose log file in the directory specifeid by path with the name specified by Logfile.log
/m filename Generates a Microsoft System Management Server (SMS) status .mif file.

Must be used with either the install (/i), remove (/x), administrative installation (/a), or reinstall (/f) options. The ISMIF32.DLL is installed as part of SMS and must be on the path.

The fields of the status .mif file are filled with the following information:

  • Manufacturer - Author

  • Product - Revision Number

  • V- Subject

  • Locale - Template

  • Serial Number - not set

  • Installation - set by ISMIF32.DLL to DateTime

  • InstallStatus - Success or Failed

  • Description - Error messages in the following order:

    1. Error messages generated by installer.

    2. Resource from msi.dll if install could not commence or user exit.

    3. System error message file.

    4. Formatted message: Installer error %i, where %i is the error returned from msi.dll.

/q n|b|r|f Sets the level of user interface displayed during the install.

q, qn

No user interface. A silent installation that displays no user interface.

qb

Basic user interface. Displays the built-in dialog boxes that show progress messages

qr

Reduced user interface with a modal dialog box displayed at the end of the installation.

qf

Full user interface with a modal dialog box displayed at the end.

qn+

No user interface except for a modal dialog box displayed at the end of installation.

qb+

Basic user interface with a modal dialog box displayed at the end. The modal box is not displayed if the user cancels the installation.

qb-

Basic user interface with no modal dialog boxes. Note that /qb+- is not a supported UI level.
/x Package|ProductCode Uninstalls the product.

  1. Do not use the options /i, /x, /j[u|m], and /a together.

  2. Use the options /t and /g only with /j.

  3. Use the options /l and /q with /i, /x, /j[u|m], and /a.

Table 1 and Table 2 show the parameters that you can enter as property=value pairs on the Msiexec command line (defaults are shown in bold). Only use the parameters given in Table 2 can be used on the command line, and not in a response file.

Msiexec property= value parameters
Property Values Meaning
USEINI path\file_name Use the specified response file. See Using a response file with Msiexec.
SAVEINI path\file_name Generate a response file during installation. The file contains those parameters selected for this installation that a user might make during an interactive installation.
ONLYINI 1|yes|"" 1, yes or any value other than null. End the installation before updating the target system, but after generating a response file, if this is specified.

"". Continue the installation and update the target machine (the default).

 

Parent topic:

Unattended (silent) installation