Symbolic expressions

Symbolic expressions can be used for many purposes:

Furthermore, symbolic expressions and variables are used in conditional expressions.

Syntax

The symbolic expression syntax is defined as follows.

symexpr	::= < expr >
expr	::= varname | #filealias | $compname | %envvar | @regpath |
	    $func(params) | #filepath?section?key | !expr | expr=expr
varname	::= ...name of a symbolic variable (may use symbolic expressions)...
filealias	::= ...alias of installation file (may use symbolic expressions)...
compname	::= ...component name (may use symbolic expressions)...
envvar	::= ...environment variable name (may use symbolic expressions)...
regpath	::= ...path to registry value (may use symbolic expressions)...
func	::= ...name of runtime function...
filepath	::= ...file path (may use symbolic expressions)...
section	::= ...INI file section name (may use symbolic expressions)...
key	::= ...INI file key name (may use symbolic expressions)...

Non-symbolic expressions

To prevent Tarma Installer from interpreting some text as a symbolic expression, enclose the text in backticks: `...some text...`. You can do this for the entire text, or only for the portions that must not be interpreted. For example:

`<ProgramFilesFolder>`
Resolves to the literal text <ProgramFilesFolder>
`<ProgramFilesFolder>`=<ProgramFilesFolder>
Resolves to <ProgramFilesFolder>=...value of ProgramFilesFolder variable...

Expression prefixes

The following prefixes can be used in expr expressions.

Prefix Operands Result
(no prefix) Variable name Value of the symbolic variable, with all symbolic references resolved. See Alphabetical reference for a full list of predefined symbolic variables; you can add your own variables on the Symbolic Variables project page.
# File alias Installation path of the corresponding file.
#...?...?... INI file path, section, key Value from the corresponding INI file, section, and key, retrieved from the target system at installation time.
$...(...) Function name, parameters Result from the corresponding runtime function. The required parameters depend on the function. See Runtime functions for a full list.
% Environment variable Value of the corresponding environment variable, retrieved from the target system at installation time.
@ Registry value path

Value of the corresponding registry value, retrieved from the target system at installation time.

Note: To retrieve the (default) value of a registry key, terminate the registry value path with a backslash ('\').

! Symbolic expression

The value of the symbolic expression without double lookup.

This allows, for example, expressions like <@<ShellFoldersCU>\My Pictures=!<PersonalFolder>\My Pictures> to behave as expected, instead of treating <...<PersonalFolder>...> as a lookup of the PersonalFolder variable, followed by an attempt to look up the non-existing variable whose name was retrieved from PersonalFolder.

= Alternate expressions

If the left operand is not empty, the left operand; else the right operand. You may use a sequence of alternate expressions to try them all in succession: expr1=expr2=expr3=...