ISCmdBld.exe

InstallShield 2012 Spring

You can build a release from the command line using ISCmdBld.exe for Windows Installer–based projects and for InstallScript projects. If your project includes InstallScript, ISCmdBld.exe also compiles it before building the release.

Syntax

The following statement illustrates running ISCmdBld.exe to build the release Othello Beta:

ISCmdBld.exe -p "C:\InstallShield 2012 Spring Projects\My Othello Project\Othello.ism" -r "Othello Beta" -c COMP -a "Build 245"

The first parameter in the example above, starting with -p, is the path to the .ism file that you would like to build. Next, -r Othello Beta is the name of the release. The parameter -c COMP specifies that you would like your package to be compressed into one file. Finally, -a "Build 245" points to the specific product configuration.

If a command-line build completes without any errors, InstallShield sets the environment variable ERRORLEVEL to 0. If an error occurs during a command-line build, ERRORLEVEL is set to 1. If ERRORLEVEL is set to any other value, this typically indicates an invalid parameter was passed to ISCmdBld.exe, and the specific cause of the error is displayed in the Command Prompt window in which ISCmdBld.exe was running.

Command-Line Parameters

Project: Some of the ISCmdBld.exe command-line parameters are applicable to only certain project types.

ISCmdBld.exe Command-Line Parameters

Parameter

Project Type

Description

-a <product configuration>

Basic MSI, InstallScript MSI, Merge Module

This parameter specifies the product configuration for the release. If it does not exist, it is created. Although this parameter is not required, you should include it if you are including the parameter for the release name.

-b <build location>

Advanced UI, Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module, Suite/Advanced UI

The fully qualified path to the folder where you want the output folders and files to be placed. UNC paths are acceptable. The built installation's files will be located in the Disk Images\Disk1 subfolder of the location that you specify.

This parameter is optional. If it is left unspecified, the build will place the build package and files in the directory specified in the File Locations tab of the Options dialog box.

Enclose long file names in quotation marks.

-c <release configuration>

Basic MSI, InstallScript MSI

This parameter enables you to specify whether your release is compressed into one file or remains uncompressed in multiple files. The valid arguments for this parameter are COMP and UNCOMP. To specify that your release be compressed into one file, use the COMP argument. If you do not want your release compressed, use the UNCOMP argument.

If the parameter is omitted for a release that already exists, the configuration is based on what was specified in the InstallShield interface. If the parameter is omitted for a new release, the files remain uncompressed.

-d <variable name=preprocessor define>

Basic MSI, InstallScript, InstallScript MSI, InstallScript Object

Use this parameter to provide a preprocessor definition that is applicable to your InstallScript. To specify more than one preprocessor definition, separate each with a comma, as in the following example:

ISCmdBld.exe -d VARIABLENAME1=Value1,VARIABLENAME2=Value2

If you reference the preprocessor in InstallScript, use either of the following formats:

#ifdef VARIABLENAME
#if VARIABLENAME=Value

That is, for #ifdef statements, you can use just the value name. For #if statements, use a name=value pair.

This parameter is optional.

Note: It is recommended that you use this command-line parameter only if a preprocessor is not defined in either of the following areas in InstallShield:

On the Compile/Link tab of the Settings dialog box, which is displayed when you click Settings on the Build menu
For Basic MSI and InstallScript MSI projects: In the Preprocessor Defines setting for the product configuration in the Releases view

If you define a preprocessor in either of these areas in InstallShield and then you use the -d command-line parameter to define the same preprocessor, ISCmdBld.exe displays a cannot-define-symbol message to inform you that the preprocessor cannot be redefined through an InstallShield project or product configuration setting.

-e <Y/N>

Basic MSI, InstallScript MSI, Merge Module

For installation projects, this parameter specifies whether you want to create a Setup.exe file along with your installation. Specify -e Y to build Setup.exe or -e N to just create an installation.

For merge module projects, the meaning of -e is different from installation projects. Specifying -e n will cause the merge module to be built and then copied to the merge modules folder. Specifying -e Y will cause the merge module to only be built but not copied to the merge modules folder.

-f <release flags>

Advanced UI, Basic MSI, InstallScript MSI, Suite/Advanced UI

Use this parameter to specify any release flags that you would like to include in your release. Separate multiple flags with commas.

-g <minimum target MSI version>

Basic MSI, InstallScript MSI, Merge Module

Use this parameter to specify the minimum version of Windows Installer that the installation requires on the target machine —for example, 2.0.2600.0. This parameter is optional. The default is the latest version of Windows Installer that the InstallShield interface supports.

-h

Basic MSI, InstallScript MSI

To skip the upgrade validators at the end of the build, use this parameter.

-i <.ini file path>

Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module

Instead of passing all of your parameters on the command line, you can include them all in an initialization (.ini) file and call that file from the command line. For more information, see Passing Command-Line Build Parameters in an .ini File.

Absolute and relative paths are acceptable.

Enclose long file names in quotation marks.

-j <minimum target Microsoft .NET Framework version>

Basic MSI, InstallScript MSI

This parameter specifies the minimum version of the .NET Framework that the installation requires on the target machine—for example, 1.0.3705.2. This parameter is optional. The default is the latest version of the .NET Framework that the InstallShield interface supports.

-l <path variable>="new path"

Advanced UI, Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module, Suite/Advanced UI

Use this parameter to override a path variable that has been specified in the Path Variables view. You can specify this parameter multiple times, once for each path variable override. For example:

ISCmdBld.exe -l VariableName="C:\Path" -l VariableName2="C:\Path2"

-m <.cub file name>

Basic MSI, InstallScript MSI, Merge Module

Use this parameter if you want to validate the installation or merge module package after it is built. Pass the path of the .cub file name with this parameter.

Absolute and relative paths are acceptable. To use multiple .cub files, separate each path with a semicolon (;). Enclose long file names in quotation marks.

For example, in the following command line, the -m parameter indicates that validation should be performed with the InstallShield Validation Suite for Windows 7 (ISWin7.cub) and the Full MSI Validation Suite (darice.cub):

ISCmdBld.exe -m "..\Support\Validation\ISWin7.cub;..\Support\Validation\darice.cub"

-n

Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module

Specify this parameter if you do not want Setup.rul to be compiled as part of the build process.

Note that if you are building from the command line and specifying an .ini file with the build settings, you can specify the following in the [Project] section of the .ini file, instead of adding the -n command line build flag:

[Project]

CompileScript=No

Like the command-line build flag, this CompileScript keyword helps you specify whether Setup.rul should be compiled as part of the build process.

Note: The -n parameter cannot be used with the -q3 parameter.

-o <merge module search path>

Basic MSI, InstallScript, InstallScript MSI

This parameter specifies one or more comma-delimited folders that contain the merge module files (.msm) that are referenced by your project.

InstallShield provides additional ways for specifying the folders that contain merge modules. For more information, see Specifying the Directories that Contain Merge Modules.

-p <project location>

Advanced UI, Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module, Suite/Advanced UI

Pass the path to the project (.ism) file. This path can be fully qualified, relative, or just the file name. If only the project file name is passed, the file is retrieved relative to the current working directory. For example:

ISCmdBld.exe -p "C:\InstallShield 2012 Spring Projects\MyProject1\MyProject1.ism"

UNC paths are also acceptable. Enclose long file names in quotation marks.

This is the only required parameter.

-patch_config <patch configuration>

Basic MSI, InstallScript MSI

Use this parameter to build a standard patch. Pass the name of the patch configuration in the Patch Design view that you want to build. For example, the following command line builds the patch configuration called Version 1.2 in the MyProject1.ism project:

ISCmdBld.exe –p "C:\InstallShield 2012 Spring Projects\MyProject1\MyProject1.ism" -patch_config "Version 1.2"

-prqpath <InstallShield prerequisite search path>

Basic MSI, InstallScript, InstallScript MSI

This parameter specifies one or more comma-delimited folders that contain the InstallShield prerequisite files (.prq) that are referenced by your project.

InstallShield provides additional ways for specifying the folders that contain InstallShield prerequisite files. For more information, see Specifying the Directories that Contain InstallShield Prerequisites.

-q1

Basic MSI, InstallScript MSI, Merge Module

Builds only the Windows Installer tables for your release. If you have not built this installation already, a new .msi file is created, but no files are added to your installation. If you have built your installation already, the .msi file is updated when all the tables are built, but, again no files are transferred. Ideally, this option is to be used to test the user interface of your installation.

Note: The -q1 parameter cannot be used with the -q2 or -q3 parameters.

-q2

Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module

For Basic MSI, InstallScript MSI, and Merge Module projects: Builds the Windows Installer tables and refreshes files. This option rebuilds your .msi file and updates the Files table, including any new or changed files in your installation. Changed files are updated only if the size or time stamp differs from the copy already included in the build. References to deleted files are removed from the installation, but the file remains in the build location. This type of build can be run only after a complete build has been performed, and it works only when the media is an uncompressed network image.

For InstallScript and InstallScript Object projects: Rebuilds only those portions of the release that have changed since the last build. If this parameter is not used, the entire file media library is rebuilt.

Note: The -q2 parameter cannot be used with the -q1 or -q3 parameters.

-q3

Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module

Compiles only Setup.rul.

For Basic MSI projects, this parameter also streams ISSetup.dll into the Binary table of the .msi package, if one was previously built.

Note: The -q3 parameter cannot be used with the -q2 or -q3, or -n parameters.

Note: This parameter does not upgrade the project. If your project was created with InstallShield Developer 8 or earlier, you should upgrade it to the latest version of InstallShield before using -q3. For example, use -u to upgrade.

-r <release name>

Advanced UI, Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module, Suite/Advanced UI

The release name as specified in the Releases view. You can use an existing release name or create a new one.

Although this parameter is not required, you should include it if you are including -a, the parameter for product configurations.

-s

Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module

This parameter enables you to build your release in silent mode. Silent builds are useful if you want to run the build without displaying any errors or warning messages.

This parameter is optional.

-t <Microsoft .NET Framework path>

Basic MSI, InstallScript MSI

Regasm.exe and InstallUtilLib.dll are utilities that are included with each version of the .NET Framework. This parameter specifies the path for the directory that contains the installed 32-bit version of these files that you want to use at build time for releases that include .NET installer classes and COM interop. This is not the path to .NET Framework redistributable files.

Note: If you are using InstallShield on a 64-bit system, ISCmdBld.exe determines the location of the corresponding 64-bit version of the .NET Framework based on the path that you specify for this parameter, and ISCmdBld.exe uses the 64-bit location of Regasm.exe and InstallUtilLib.dll when appropriate.

-u

Basic MSI

This parameter enables you to upgrade—but not build—your release. You can use this parameter to upgrade an installation project that you created using InstallShield—Windows Installer Edition version 2.03 or earlier.

-v

Advanced UI, Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module, Suite/Advanced UI

This parameter enables you to create a verbose build log file that may be useful if Flexera Software Support is helping you troubleshoot an issue with your installation.

-w

Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module

This parameter treats warnings that occur during the build process as errors. Each warning increments the error count by one.

-x

Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, Merge Module

If you want the build to stop when it encounters an error, use the -x parameter. If you want the build to stop when it encounters a warning, use this parameter in conjunction with the -w parameter.

-y <product version>

Advanced UI, Basic MSI, InstallScript MSI, Merge Module, Suite/Advanced UI

This parameter enables you to specify a product version from the command line. This is especially helpful if you want to increment the build version (the third field) of the product version. For example, to set the product version to 1.0.5:

ISCmdBld.exe -y "1.0.5"

For information on valid product version numbers, see Specifying the Product Version.

This parameter is optional.

-z <property name=property value>

Advanced UI, Basic MSI, InstallScript MSI, Merge Module, Suite/Advanced UI

In Basic MSI, InstallScript MSI, and Merge Module projects, this parameter enables you to override the value of a Windows Installer property. In Advanced UI and Suite/Advanced UI projects, this parameter enables you to override the value of an Advanced UI or Suite/Advanced UI property.

For example, to set the value of the property called PropertyName to PropertyValue, use the following command line:

IsCmdBld.exe -z PropertyName=PropertyValue

If you want to set the value to a string that includes one or more spaces, use quotation marks; for example, to set the value of the property called PropertyName to My Property Value, use the following command line:

IsCmdBld.exe -z "PropertyName=My Property Value"

If you specify a property that does not exist in the Property table, InstallShield creates the property in the installation that it builds.

If you specify both the -y parameter to override the product version, and the -z parameter to override the ProductVersion property, InstallShield uses the value specified for the -y parameter.

This parameter is optional.

See Also