Internal variables

Internal variables correspond to the internal state of the InstallMate program and directly influence Setup's behavior. The variables are initialized each time Setup starts and are updated by command line options and the Setup runtime engine during the session. They may also be changed by explicit actions during the installation process. However, none of the changes are persistent; the next time Setup starts, the variables are re-initialized and any previous values are lost.

Because they are closely connected to the state of the runtime engine, internal variables play an important role in the conditions for actions and components. For example, the TsuRunMode variable determines which dialog sequence is used as the installer's user interface, and also selectively suppresses or enables various installation actions; the TsuQuiet variable determines the visibility and level of interaction of the installer.

By convention, the names of InstallMate internal variables start with 'Tsu'. We suggest that you do not use this prefix for your own variables; this avoids potential conflicts with future additions to the internal variables.

Variable Description
ExtraSize Additional installation space requirements
InstallDate Current date as YYYYMMDD
Installed Nonzero if running from installed base; synonym for TsuInstalled
InstalledVersion Currently installed product version
InstallID Unique installation identifier
InstallLocation Install location from registry
InstallTime Current time as HHMMSS
LastExitCode Exit code of the most recently run external program
LastStatusCode HTTP status code of the most recent download action
LastStdOut STDOUT and STDERR output of the most recently run external program
PackageCode Distribution package GUID
PreinstallFolder Temporary pre-installation folder
PRIMARYFOLDER Name of the primary installation folder symbol
PrimaryVolumePath Volume containing the primary installation folder
PrimaryVolumeSpaceAvailable Available disk space on primary installation volume
PrimaryVolumeSpaceRemaining Remaining disk space on primary installation volume
PrimaryVolumeSpaceRequired Required disk space on primary installation volume
ReplacedInUseFiles One or more in-use files were replaced; synonym for TsuFilesInUse
ROOTDRIVE Default disk drive for installation
SessionID Pseudo-random 8-character session identifier
SourceDir Setup runtime folder
TARGETDIR Root folder for installation
TinComponentsKey InstallMate components registry path
TinFolder InstallMate database root folder
TinProductFolder InstallMate installation database folder
TinProductsKey InstallMate products registry path
TinRegistryPath InstallMate registry path
TizPath Fully qualified path of the current installation database
TsuActionItem Current action item during installation
TsuActionName Current action name during installation
TsuArguments The installer's command line arguments
TsuExitCode Installer exit code
TsuFeatureBrowsable Current feature's folder may be browsed
TsuFeatureDescription Current feature's description
TsuFeatureDisplayName Current feature's display name
TsuFeatureFolderAlias Current feature's associated folder alias
TsuFeatureSize Current feature's installation size
TsuFilesInUse One or more in-use files were replaced
TsuInstalled Nonzero if running from installed base
TsuInstallLevel Installation level for installation
TsuInstallSize Total installation size
TsuMBTimeOut Time-out period for built-in messages, in seconds
TsuPath Fully qualified path of the installer program
TsuPendingFileDelete One or more installation files are pending deletion
TsuPID Process ID of the installer process
TsuProgress Overall progress as permille of total work
TsuProgressPos Number of bytes processed so far during installation or download
TsuProgressRange Total number of bytes to process during installation or download
TsuQuiet User interface level during install
TsuRebootMode Reboot policy during install
TsuRebootRequired Reboot is required
TsuRemoveSize Total removal size
TsuRunMode Installer run mode
TsuStatus Installer session status code
TsuUpgrade Uninstaller runs as part of upgrade
TsuUserAgent HTTP User-Agent string during component downloads
UninstallKey Uninstaller registry key name
UninstallMainRegPath Main product uninstaller registry key path
UninstallRegPath Uninstaller registry key path
UninstallTitle Uninstaller display name
UserLanguageID Language ID of the installation language (decimal)
VersionTin InstallMate version number

List of InstallMate internal variables

The following list shows the InstallMate internal variables and their compatibility aliases.

Name Description Value
Installed

Indicates if Setup is running from an existing installation (in maintenance mode or as uninstaller) or from a distribution package as a new installation.

New installations are special in that they go through the full installation wizard, may uninstall previous versions of the same or other applications, and may perform customer registration actions.

Note that this variable does not indicate that a previous (or the same) version of the application is already installed; it merely reflects the current Setup situation.

The initial value of this variable is automatically determined by Setup when it loads the installation database.

0=New installation, running from distribution package
1=Installed, running from installed database
ReplacedInUseFiles Indicates that one or more files that must be updated were in use. As a result, the installer has scheduled delayed fily copying to take place during the next system reboot. 0=No in-use files encountered
nonzero=In-use files encountered
TsuActionItem

Name of the item being processed by the current installation action. Typically, this is the name of an installation file or a similar installation item.

A static text control subscribed to this variable will automatically be updated as each item is processed.

Any appropriate text string; may be empty.
TsuActionName

Descriptive name of the current action, for example "Installing files". This name is obtained from the current custom or standard action.

A static text control subscribed to this variable will automatically be updated as each action is executed.

Any appropriate text string; may be empty.
TsuAvailableSize Available disk space on the primary installation volume (i.e., the one that contains <INSTALLDIR>). A decimal integer in the range 0..264-1
TsuExitCode Indicates the current Setup exit code. This code is returned when Setup terminates through the Win32 API ExitProcess. 0=No errors
For other values, see Setup Command Line Options.
TsuInstallSize Total installation size based on the currently selected features. A decimal integer in the range 0..264-1
TsuProgress

The current overall progress level as a decimal integer.

A progress bar control subscribed to this variable will automatically be updated as the installation progresses.

A decimal integer from 0 to 1000 inclusive, indicating the progress level in thousandths of the total amount of work.
TsuQuiet

Indicates the current "quietness" level. This in turn determines the amount of interaction with the user.

The initial value of this variable is 0, but may be overridden by the /q command line option.

0=Not quiet, normal user interface
1=Quiet, limited user interface without interaction
2=Hidden, no visible user interface
TsuRebootMode

Reboot mode for Setup. In conjunction with TsuRebootRequired, this variable determines whether or not a reboot will be performed when Setup terminates.

The initial value of this variable is set on the Installation page of your InstallMate project, but may be overridden by the /b command line option.

0=Never reboot
1=Reboot if TsuRebootRequired is set
2=Always reboot
TsuRebootRequired

Indicates whether a reboot is necessary to complete the installation. It is set automatically when an in-use file has to be replaced or when a file marked Reboot is installed, but you can also change its value through a custom action or the user interface.

The initial value of this variable is 0.

0=No reboot required
1=Reboot required

TsuRemoveSize Total removal size based on the difference between the currently selected features and the currently installed ones. A decimal integer in the range 0..264-1
TsuRunMode

Operating mode for Setup. It is best to set this variable at the very start of the installation or uninstallation process; changes that occur later may have unpredictable consequences.

The initial value of this variable is automatically determined by Setup when it loads the installation database, but may be overridden by the /install, /remove, /register, or /repair command line options.

0=No runmode
1=Installer
2=Uninstaller
3=Registrar
4=Repair
TsuStatus

Current session status for Setup. Negative values indicate that an error has occurred; positive values that the session is in progress.

An installation session starts when the StartProcessing action is started; this sets TsuStatus to 1. It finishes when EndProcessing is complete; this sets TsuStatus to 2, unless an error occurred in the meantime. After EndProcessing the session status remains unchanged, unless an error occurs during post-processing.

This variable is read-only; although you can change its value, Setup internally ignores these changes.

The initial value of this variable is 0.

-2=Session cancelled by user
-1=Session failed due to error
0=Session not started yet
1=Session in progress
2=Session completed
UILevel Read-only alias for TsuQuiet. Note that for compatibility with MSI the values retrieved through UILevel are different from the TsuQuiet values.

2=Silent installation; no user interface at all. Corresponds to TsuQuiet=2
3=Simple progress and error handling. Corresponds to TsuQuiet=1
4=never returned as alias value
5=Full user interface. Corresponds to TsuQuiet=0

UpdateStarted Read-only alias for TsuStatus. See TsuStatus. Nonzero values indicate that the update is in progress or complete.