InstallMate Builder command line syntax

The InstallMate development environment (InstallMate Builder) can be used interactively or in batch mode. In batch mode, no interaction is required except if you want to sign the installation package with a digital signature; in that case, you must provide your private key password.

Command line options

InstallMate Builder uses the following command line syntax. Parts between [brackets] are optional; ellipsis "..." indicate parts that may be repeated. Options may start with / or - and are case-insensitive. Therefore, -build, /build, and /BUILD all have the same effect. Options are processed from left to right, and if you specify conflicting options, the rightmost one "wins".

[path\]tin.exe [/build[:name]] [/check[:name]] [/nosign|/sign] [/q[n]] [/wn|/wx]
  [/license:licensepath] [/log:logpath] [/dvar=value...] [@response.txt] [project.im9]
Argument Description
[path\]tin.exe Specifies the (fully qualified) path to the InstallMate executable. The default location for this executable is C:\Program Files\InstallMate 9\Bin\tin.exe.
/build
/build:all
/build:name

Builds one or more configurations from the project and exits.

  • /build on its own builds the default configuration;
  • /build:all builds all configurations;
  • /build:name builds the named configuration.

The results are written to the project log file and reflected in InstallMate Builder's exit code.

/check
/check:all
/check:name

Checks one or more configurations from the project and exits.

  • /check on its own checks the default configuration;
  • /check:all checks all configurations;
  • /check:name checks the named configuration.

The results are written to the project log file and reflected in InstallMate Builder's exit code.

/nosign
/sign

Override the Sign after build option in the build package settings.

  • /nosign does not sign the installation package, even if the package has its Sign after build attribute checked. This option is useful to avoid user interaction during a batch build.
  • /sign signs the installation package, even if the package has its Sign after build attribute cleared. This option requires user interaction during a batch build to enter the private key password, if any
/q
/qn

Sets the user interface level for batch builds (/build or /check). If specified, n must be 0, 1, or 2:

  • /q0 is the default level and shows a progress dialog with Cancel and Help buttons enabled;
  • /q1 shows the same progress dialog, but with disabled Cancel and Help buttons;
  • /q2 does not show any progress dialogs.

Specifying /q without a suffix is equivalent to /q1.

/wn
/wx

[InstallMate 9.45 and later] Override the Treat warnings as errors option in the build package settings.

  • /wn treats warnings only as warnings, without causing the build process to fail.
  • /wx treats warnings as errors and causes the build process to fail with diagnostic BLD:E0005 or BLD:E0122 if one or more preflight warnings are encountered.

These options are useful to force a build to complete even in the presence of BLD:Wxxxx diagnostics, or to force a build to fail if one or more BLD:Wxxxx diagnostics are produced.

/license:licensepath

Tells InstallMate Builder to use a different license certificate for the duration of the session. The licensepath path must refer to a plain text file encoded as UTF-8 that contains the InstallMate 9 registration certificate that you received when you purchased the license. The file must include the entire certificate, starting with the -----BEGIN TARMA CERTIFICATE----- line and ending with the -----END TARMA CERTIFICATE----- line.

If the license file contains a valid InstallMate 9 certificate, it will be used in preference to any preinstalled registration that you entered through the Help > Register... command. If the license file cannot be read or does not contain a valid certificate, then the preinstalled certificate, if any, will be used.

Note: This option is primarily meant for situations where the normal registration information is not available, for example when the correct HKEY_CURRENT_USER registry hive is not loaded in certain automated build scenarios. However, you can also use it during interactive builds.

/log:logpath
/log:+logpath
/log:*

Sets the log file name to logpath instead of the default, which is the project name with a .log extension.

  • /log:logpath uses logpath as the log file path and overwrites any previous file with that name.
  • /log:+logpath uses logpath as the log file path and appends the new log information to the existing file, if any.
  • /log:* sends all log information to the standard output.
/dvar=value...

Specifies zero or more var=value pairs that allow you to set the value of symbolic variables from the command line. Any values set on the command line override the values of the corresponding variables from the project for the duration of the session (only).

Note: If value contains spaces or special characters such as '<' and '>', you should quote the option to avoid misinterpretation by the command line processor. For example, use quoting such as "/dvar=value with spaces", /dvar="value with spaces" or /dvar="<SystemFolder>\Drivers\etc\hosts".

@response.txt

Use response.txt as a response file for further command line arguments.

A response file is a plain text file (encoded in the current ANSI code page, or UTF-8 with a leading BOM, or UTF-16 with its leading BOM) that contains one or more command line arguments separated by any combination of spaces, tabs, or newlines.

The syntax of the arguments in the response file is similar to the normal command line usage; in particular, any arguments that contain internal spaces must be "quoted". However, response files differ from normal command line syntax in the following ways:

  • Input and output redirections ('<' and '>') and pipes ('|') have no effect because the command line processor (CMD.EXE, TCC.EXE, or similar) never sees the response file contents.
  • As a corollary, inside a response file you can refer to symbolic variables with unquoted <varname> syntax, for example /dvar=<SystemFolder>\Drivers\etc\hosts
  • Environment variable references such as %APPDATA% are expanded inside a response file as they would be on the command line proper. To pass the literal string %APPDATA% as an argument to the program, you must use single 'quotes', for example '%APPDATA%'; double %% signs as on the command line do not prevent expansion. Only simple expansion is performed; CMD.EXE features such as %varname:str1=str2% (string substitution) and others are not supported.
  • No other command line processor features apply.

Response files may be nested and will be processed if and when they appear on the command line and in other response files, and the same left-to-right processing rules apply when conflicting arguments are encountered (i.e., the rightmost argument "wins").

Internal comment lines

[InstallMate 9.39 and later] Response files may contain internal comment lines for documentation purposes; the contents of a comment line are ignored by the program.

Comment lines must start with '#' in the first column of the line and extend up to and including the next line break or the end of the file, whichever comes first. '#' characters that appear after the first column of a line are not treated as comments and are considered part of the argument in which they appear. Some examples:

# This is a comment line
 # But this is not (# appears in column 2)
"# Nor is this"
/nor#this
nor#this.txt
# But this is another comment
project.im9 Specifies the name of the project to open. Be sure to enclose the path in quotes if it contains spaces. You must also include the .im9 extension.

Exit codes

InstallMate returns one of the following exit codes when it completes.

Exit code Description
-1 Internal error
0 Success
1 No project file specified
2 Invalid build mode specified
3 Error while opening project file
4 Error while opening log file
5 Project check or build failed (consult the build log file for details)
6 Unknown package
7 Unspecified error

Tip

If you run InstallMate Builder from a batch file or command line prompt, the default Windows behavior is to continue with the next command as soon as InstallMate Builder is started; it does not wait until InstallMate Builder has finished. As a result, the value of %ERRORLEVEL% does not necessarily reflect InstallMate Builder's exit code.

To remedy this, run InstallMate Builder as follows:

start /wait path\tin.exe other options...

This ensures that the command does not return until InstallMate Builder has exited.

Tip

If the InstallMate Builder program path in the start command contains spaces, you must quote it. However, the start command on Windows NT-based systems interprets the (first) quoted string as the program title and not as a program path. Therefore, you should include a dummy, quoted program title prior to the actual program path, thus:

start /wait "title" "path\tin.exe" other options...

This is only necessary if you quote the InstallMate Builder path for some reason.