Specifying Command-Line Parameters for an InstallShield Prerequisite

InstallShield 2012 Spring

The Application to Run tab of the InstallShield Prerequisite Editor lets you specify command-line parameters that you want to be used when the InstallShield prerequisite is launched on the target system.

To specify command-line parameters that you want to be used when an InstallShield prerequisite installation is launched:

1. In the InstallShield Prerequisite Editor, open the prerequisite that you want to modify.
2. Click the Application to Run tab.
3. In the Specify the command line for the application box, type any valid command-line parameters for the file that is selected in the Specify the application you wish to launch list. Do not include the name of the file in this box.
4. If you want to specify the command line that should be used for the InstallShield prerequisite if the main installation is running in silent mode, type any valid command-line parameters in the Specify the command line for the application when the setup is running in silent mode box. Do not include the name of the file in this box.

The command-line parameters that you enter in this setting are also used if the prerequisite is configured to be hidden—that is, if the The prerequisite should be hidden from the installation list check box on the Behavior tab is selected.

Note: Using the /s command-line parameter to launch an installation that includes an InstallShield prerequisite does not automatically run the prerequisite installation silently. You may also need to specify a valid silent command-line parameter for the InstallShield prerequisite in the Specify the command line for the application when the setup is running in silent mode setting on the Application to Run tab.

Also note that no command-line parameters are passed to the InstallShield prerequisite if you leave the Specify the command line for the application when the setup is running in silent mode box blank and one or both of the following conditions are also true:

The main installation is run silently.
The The prerequisite should be hidden from the installation list check box on the Behavior tab is selected for the prerequisite.

Therefore, if you specify standard command-line parameters, it is recommended that you also specify silent command-line parameters.

How the Setup Launcher Passes the Command-Line Parameters to the InstallShield Prerequisite

If the InstallShield prerequisite installation is an .msi package and you indicate on the Behavior tab that the progress should be shown, the setup launcher uses Windows Installer APIs—instead of MsiExec.exe—to launch the .msi package with the command-line parameters that you specify on the Application to Run tab. Under these circumstances, you can enter any of the following types of parameters for the command line:

Windows Installer property names and values in the following format:

PROPERTY=VALUE

/L (as well as any variants such as /L*v)
/log
/q (as well as any variants such as /qb+!)
/quiet

Note that if you specify that the progress should be shown, the user interface of the prerequisite's .msi package is not displayed by default. If you want to override this behavior, you can specify /qf as a command-line parameter.

If the InstallShield prerequisite installation is any other file type, or it is an .msi package for which progress should not be shown, the setup launcher runs the file with either the open verb (for .msi and .exe files) or the default verb (for all other file types) at run time. Therefore, in the case of an .msi package for which progress should not be shown, you can use any of the command-line parameters that MsiExec.exe accepts. For a list of the supported command-line parameters, see Command-Line Options and Standard Installer Command-Line Options in the Windows Installer Help Library.

If your InstallShield prerequisite installation is a Setup.exe file that was created with InstallShield, the formatting that is done for that prerequisite command-line parameters that you specify on the Application to Run tab differs depending on whether you associated the InstallShield prerequisite with a feature in your project. If the InstallShield prerequisite is not associated with a feature, it is called a setup prerequisite. If the InstallShield prerequisite is associated with one or more features, it is called a feature prerequisite.

Note: To learn more about the differences between setup prerequisites and feature prerequisites, see Setup Prerequisites vs. Feature Prerequisites.

In the setup prerequisite case, the setup launcher supports property substitution through the command-line parameters for the following properties:

SETUPEXEDIR—This property identifies the path to the setup launcher file. For example, if the path to the setup launcher is C:\MySetups\MyApp\Setup.exe, the value of [SETUPEXEDIR] is C:\MySetups\MyApp.
SETUPEXENAME—This property identifies the name of the setup launcher file that was created when the project was built. The installation updates the value of this property at run time if the setup launcher file was renamed. The following path identifies the full path to this file:

[SETUPEXEDIR]\[SETUPEXENAME]

ISPREREQDIR—This property identifies the path to the running InstallShield prerequisite. The path includes the final slash. You can use this property to refer to files within the InstallShield prerequisite—for example, [ISPREREQDIR]MyConfigFile.ini.
ProductLanguage—This property identifies the language that the installation should use for any strings in the user interface that are not authored into the database.

For a feature prerequisite, the command-line parameters that you specify on the Application to Launch tab are formatted at run time like a formatted text field. Therefore, you can use the aforementioned properties at the command line, as well as any of the standard command-line parameters that Setup.exe supports. For a list of supported command-line parameters, see Setup.exe and Update.exe Command-Line Parameters.

See Also