Advanced installation using msiexec

About this task

IBM® MQ on Windows uses the MSI technology to install software. MSI provides both an interactive installation and a non interactive installation. An interactive installation displays panels and ask questions.

The msiexec command uses parameters to give MSI some or all of the information that can also be specified through panels during an interactive installation. This means that a user can create a reusable automated or semi-automated installation configuration. Parameters can be given through the command line, a transform file, a response file, or a combination of the three.

Procedure

To install using msiexec, at the command line, enter the msiexec command in the following format:

msiexec parameters [USEINI=" response-file"] [TRANSFORMS="transform_file "]
Where:
parameters
are either command-line parameters preceded by a / character, or property=value pairs (if using both forms of parameter always put the command-line parameters first). For further information, see Specifying command line parameters with msiexec.

For an unattended installation, you must include the /q or /qn parameter in the command line. Without this parameter, the installation is interactive.

Note: You must include the /i parameter and the file location of the IBM MQ installer package.
response-file
is the full path and file name of the file that contains the [Response] stanza and the required property=value pairs, for example C:\MyResponseFile.ini. An example response file, Response.ini, is supplied with IBM MQ. This file contains default installation parameters. For further information, see Using a response file with msiexec.
transform_file
is the full path and file name of a transform file. For further information, see Using transforms with msiexec and Multiple installation using MSI Instance ID.
Note: For a silent installation to succeed, the AGREETOLICENSE=?YES? property must be defined either on the command line or in the response file.

Results

After the command has been entered, the command prompt immediately reappears. IBM MQ is installing as a background process. If you have entered parameters to produce a log, check this file to see how the installation is progressing. If the installation completes successfully, you see the message Installation operation completed successfully in the log file.

Specifying command line parameters with msiexec

About this task

The msiexec command can accept two types of parameters on the command line, as follows:
  • Standard command line parameters, preceded by a / character.

    For a table of the msiexec command line parameters, see the MSDN Command-Line Options web page.

  • Property=value pair parameters on the command line. All the parameters available for use in a response file can be used on the command line, for a list of these, see Table 2. In addition there are some extra property=value pair parameters that are only for use on the command line, for details see Table 1.
    When using the property=value pair parameters note that:
    • Property strings must be in uppercase.
    • Value strings are not case-sensitive, except for feature names. You can enclose value strings in double quotation marks. If a value string includes a blank, enclose the blank value string in double quotation marks.
    • For a property that can take more than one value, use the format:
      
      ADDLOCAL="Server,Client"
      
    • For properties taking paths and filenames, for example PGMFOLDER, you must supply the paths as absolute paths and not relative; that is, C:\folder\file and not .\folder\file.

    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.

Example

A typical example of an msiexec command is:

msiexec /i "path\MSI\IBM WebSphere MQ.msi" /l*v c:\install.log
/q TRANSFORMS="1033.mst" AGREETOLICENSE="yes" ADDLOCAL="Client"
A typical example of an msiexec command when you are installing a second copy of the IBM MQ product is:

msiexec /i "path\MSI\IBM WebSphere MQ.msi" /l*v c:\install.log
/q TRANSFORMS=":InstanceId2.mst;1033.mst" AGREETOLICENSE="yes"
ADDLOCAL="Client" MSINEWINSTANCE=1

The following table shows the parameters which can only be provided on the command line and not in a response file.

Table 1. 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 system (the default).

TRANSFORMS :InstanceId x.mst| path \ file_name | :InstanceId x.mst; path \ file_name The :InstanceId x.mst value is only required for a subsequent installation of IBM MQ Version 7.1 or greater. The path \ file_name specifies what transform (.mst) files must be applied to the product. For example, 1033.mst specifies the supplied U.S. English transform file.
MSINEWINSTANCE 1 This property is only required for subsequent installations of IBM MQ Version 7.1 or greater.
REMOVEFEATURES yes Required with value "yes" for a silent installation, otherwise ignored. Allows obsolete features, no longer part of IBM MQ, to be deleted.

Using a response file with msiexec

About this task

You can use the msiexec command with a parameter which specifies additional properties are defined in a response file. You can combine the msiexec command-line parameters described in Specifying command line parameters with msiexec.

A response file is an ASCII text file, with a format like a Windows .ini file, that contains the stanza [Response]. The [Response] stanza contains some or all the parameters that would normally be specified as part of an interactive installation. The parameters are given in a property=value pair format. Any other stanzas in the response file are ignored by msiexec. An example response file, Response.ini, is supplied with IBM MQ. It contains the default installation parameters.

Procedure

A typical example of an msiexec command is: msiexec /i path\MSI\IBM WebSphere MQ.msi /l*v c:\install.log TRANSFORMS= 1033.mst USEINI= C:\MQ\Responsefile

If a parameter is specified both on the command line and in a response file, the setting on the command line takes precedence. All the parameters available for use in a response file can also be used on the command line, for a list of these see Table 2.

In the response file, all text is in English, and comments begin with a ; character.

For information about creating a response file, see Creating a response file.

Example

An example of a typical response file:

[Response]
PGMFOLDER="c:\mqm"
DATFOLDER="c:\mqm\data"
AGREETOLICENSE="yes"
ADDLOCAL="Client"
REMOVE="Toolkit"
Table 2. Response file parameters
Property Values Meaning
PGMFOLDER path Folder for the IBM MQ program files. For example, c:\mqm.
DATFOLDER path Folder for the IBM MQ data files. For example, c:\mqm\data.
USERCHOICE 0|no If the command line or response file specifies parameters to install features, a dialog can be displayed to prompt you to accept the preselected options, or review and possibly change them.

0 or no. Suppresses display of the dialog.

Anything else. Dialog is displayed and you can amend the options.

Not used for a silent installation.

AGREETOLICENSE yes Accept the terms of the license. Set to yes before a silent installation.

If the installation is not silent, this parameter is ignored.

ADDLOCAL feature, feature, All| "" A comma-separated list of features to install locally. For a list of valid feature names, see IBM MQ features for Windows systems.

All installs all features

"" installs the typical features. If you do not want a feature use REMOVE=" feature "

Note: If this is a new installation the typical features (Client, Java, .NET Messaging, and Development Toolkit) are installed by default irrespective of the feature list provided in the ADDLOCAL property. If you do not want a feature use REMOVE="feature"
REMOVE feature, feature, |All| "" A comma-separated list of features to remove. For a list of valid feature names, see IBM MQ features for Windows systems.

All uninstalls all features

"" uninstalls no features (the default).

INSTALLATIONDESC ?Description of installation? Sets the installation description from the command line. Subject to the documented installation description length limitations
INSTALLATIONNAME [INSTALLATION0,]?Name? Sets the installation name from the command line. Subject to the documented installation name character and length limitations.
Note: Supply INSTALLATION0,Name only when upgrading from pre- IBM MQ Version 7.1.
MAKEPRIMARY 0|1| "" Makes the installation primary, if possible, or removes the primary flag. 1 = Make primary, 0 = Make non-primary, - use default algorithm
Note: This option is ignored if a pre- Version 7.1 IBM MQ is installed, or if another Version 7.1 or greater installation is present and set as the primary.