Advanced installation using msiexec

Before you begin

If you are running IBM® MQ on Windows systems with User Account Control (UAC) enabled, you must invoke the installation with elevated privileges. If you are using the Command prompt or MQ Explorer elevate privileges by using a right-click to start the program and selecting Run as administrator. If you try to run msiexec without using elevated privileges, the installation fails with an error of AMQ4353 in the installation log.

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, which contains a link to the web site that lists all the command line parameters that are available.

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

Here is an example of a typical msiexec command. All parameters, separated by one or more spaces, must be typed on the same line as the msiexec call.

msiexec
/i "<path>\MSI\IBM WebSphere MQ.msi"
/l*v c:\install.log
/q
TRANSFORMS="1033.mst"
AGREETOLICENSE="yes"
ADDLOCAL="Server"
Here is an example of a typical msiexec command when you are installing a second copy of IBM WebSphere® MQ 7.5, or later. All parameters, separated by one or more spaces, must be typed on the same line as the msiexec call.

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

Where /l*v c:\install.log writes installation log to file c:\install.log.

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

Using a response file with msiexec

About this task

You can use the msiexec command with a parameter which specifies additional properties that 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"
LOGFOLDER="c:\mqm\log"
AGREETOLICENSE="yes"
LAUNCHWIZ=""
WIZPARMFILE="d:\MQParms.ini"
ADDLOCAL="Server,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.
Note: Multiple installations of IBM MQ all use the same DATFOLDER.
LOGFOLDER path Folder for the IBM MQ queue manager log files. For example, c:\mqm\log.
Note: Multiple installations of IBM MQ all use the same LOGFOLDER.
USERCHOICE 0|no If the command line or response file specifies parameters to install features, a dialog can be displayed to prompt the user to accept the preselected options, or review and possibly change them.

0 or no. Suppresses display of the dialog.

Anything else. Dialog is displayed.

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.

KEEPQMDATA keep |delete If the Server feature is to be uninstalled, whether to delete any existing queue managers.

delete removes any existing queue managers.

keep, or any other value, keeps them.

Note: This property is only valid on a final server uninstall. If used on any other server uninstalls this property is ignored.
LAUNCHWIZ 0|1|yes|no| "" 0 or no. Do not launch the Prepare IBM MQ wizard after IBM MQ is installed.

1 or yes. Launch the Prepare IBM MQ wizard if the Server feature is installed.

"". Launch the Prepare IBM MQ wizard to install the Server (the default).

If this option is to launch the Prepare IBM MQ wizard, you can specify the WIZPARMFILE, either in this file, or on the command line.

The Prepare IBM MQ wizard must be run to make your IBM MQ installation operational. If you choose not to launch it here, you must run it before using IBM MQ.

WIZPARMFILE path \ file_name When specified, the file that contains the parameters to pass to the Prepare IBM MQ wizard when it is launched. These are in the [Services].
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 (Server, Explorer, Java Messaging and SOAP Transport, 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).

STARTSERVICE 0|no| "" 0 or no. Do not start the IBM MQ Service at the end of installation.

"" (the default). Start the IBM MQ Service at the end of installation if it was running at the start, or if this is a new installation.

Anything else. Start the Service at the end of the installation.

Ignored if the server feature is not installed.

If you do not start the IBM MQ Service, IBM MQ will not be operational and queue managers will not start. You must run the Prepare IBM MQ wizard for the service to be correctly configured.

This parameter is only valid if LAUNCHWIZ is set to no.

STARTTASKBAR 0|no| "" 0 or no. Do not start the IBM MQ taskbar application at the end of installation.

"" (the default). Start the IBM MQ taskbar application at the end of installation if it was running at the start, or if this is a new installation.

Anything else. Start the taskbar application at the end of the installation.

Ignored if the server feature is not installed.

This parameter is only valid if LAUNCHWIZ is set to no.

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 versions of IBM MQ before Version 7.5.
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 version of IBM MQ before Version 7.5 is installed, or if another installation of IBM WebSphere MQ 7.5, or later, is present and set as the primary.