Using Formatted Expressions that Advanced UI and Suite/Advanced UI Installations Resolve at Run Time

InstallShield 2019

Project • This information applies to the following project types:

Advanced UI
Suite/Advanced UI

Edition • The Advanced UI project type is available in the Professional edition of InstallShield. The Suite/Advanced UI project type is available in the Premier edition of InstallShield. For information about the differences between these two project types, see Advanced UI Projects vs. Suite/Advanced UI Projects.

In various areas of Advanced UI and Suite/Advanced UI projects, you can embed formatted expressions that contain property names, environment variable references, and other special strings; at run time, the installation expands the values of these expressions. Support for the following types of formatted expressions is available.

Properties—To resolve the value of a property, surround the property name in square brackets. For example, [MYPROPERTY] resolves to the value of the MYPROPERTY property at run time. If the property is not defined, the expression resolves to an empty string.
Recursive properties—To resolve the resolved value of a property, surround a property name with an additional set of square brackets. For example, [[PROPERTY1]] resolves to the value of the property whose name is stored in PROPERTY1; if PROPERTY1 holds PROPERTY2, the resolved value is the value that is stored in PROPERTY2.
Escaped characters—To include a special character in an expression (such as literal parentheses, commas, or square brackets), precede the special character with a backslash and enclose the resulting string in square brackets. For example, an entry such as [\[]Text[\]] resolves as [Text].
Null character—To embed a null character in an expression, enclose a tilde in square brackets; that is, [~].
Environment variables—To use the value of an environment variable, precede the name of the environment variable with a percent sign and enclose the resulting string in square brackets. For example, [%PATH] resolves as the value of the PATH environment variable.
Object expressions—To search target systems for information about a file, a registry entry, the operating system, or other items, use an object expression. This enables you to dynamically configure many of the Advanced UI or Suite/Advanced UI settings at run time based on target system–specific conditions. Object expressions use the convention [@Object(Parameters, ...).Property(Parameters, ...)]. For details on how to write object expressions, see Writing Object Expressions in Advanced UI and Suite/Advanced UI Projects to Search Target Systems.

Note that you can embed object expressions within other formatted expressions, such as within property expressions. You can also embed property expressions and other formatted expressions within a parameter of an object expression. To learn more, see Writing Object Expressions in Advanced UI and Suite/Advanced UI Projects to Search Target Systems.

Syntax errors, failures of objects in object expressions, and invalid formatted expressions evaluate to an empty string at run time. In some cases, information about the failure to parse or evaluate a formatted expression is available in the debug log file of the Advanced UI or Suite/Advanced UI installation.

Areas of Advanced UI and Suite/Advanced UI Projects That Accept Formatted Expressions

Many settings in various areas of Advanced UI and Suite/Advanced UI projects accept formatted expressions. You can also use formatted expressions in some types of actions. The following areas in InstallShield are examples in which you can specify formatted expressions.

In the Packages view: settings in which you enter command lines that should be used to launch a package’s file.

For more information, see Using Advanced UI and Suite/Advanced UI Formatted Expressions to Dynamically Configure Command Lines.

In the Property Manager view: in the Value column for a property. Ensure that you select the Formatted check box so that the formatted expression in the property’s value is resolved at run time. The run-time resolution occurs early at run time, before the installation executes the actions in the OnBegin event.

For more information, see Property Manager View.

In settings that use string entries, such as the Display Name setting for a feature in the Features view and Text setting for a UI control in the Wizard Interface view.
In some of the subsettings in which you can enter text to configure exit conditions, detection conditions, eligibility conditions, or other types of conditions—for example, in the Compare To subsetting for the File Comparison, Registry Comparison, and Property Comparison types of condition checks.

For more information, see Types of Condition Checks in Advanced UI and Suite/Advanced UI Projects.

In the Events view for an action that sets a property: in the Property Value setting. Ensure that you select Yes in the Format Property Value setting so that the formatted expression in the property’s value is resolved at run time.

For more information, see Working with an Action that Sets a Property in a Suite/Advanced UI Installation.

In any action that receives an ISuiteExtension pointer: the bstrValue parameter of the FormatProperty method.

For more information, see:

Creating an Extension Condition DLL for an Advanced UI or Suite/Advanced UI Project
Working with a DLL File for an Action in a Suite/Advanced UI Installation
Working with a Managed-Code Action in a Suite/Advanced UI Installation
In InstallScript action code: the szValue parameter of the InstallScript function SuiteFormatString.

For more information, see SuiteFormatString.

In PowerShell actions: the format-suiteproperties cmdlet expands the value of a formatted expression.

For more information, see Working with a PowerShell Script for an Action in a Suite/Advanced UI Installation.

See Also