Product Variable attributes

Reference information
Project page Product Variables
Related topics Working with attribute panes

Introduction

A Product Variable represents a replaceable piece of text. The text proper is defined in one place and assigned a symbolic name; it is then referenced elsewhere in the project by using the special <name> syntax. Product variables are typically used for folder paths and text strings that vary from project to project or from release to release, such as the product name and version. They are also used to control the installation process when they are part of conditional expressions.

Tip: For a full list of predefined product variables, see the Product variables topic.

MSI note In Windows Installer terminology, product variables are called properties and they are referenced using square brackets: [name]. In Tarma ExpertInstall you can use either form if you build an MSI installer, but we recommend that you use the Tarma <name> syntax throughout because that allows better preflight checking. When an MSI database is created, Tarma ExpertInstall automatically converts the <name> syntax to [name].

Attributes

This pane contains the following attributes and options.

Attribute Description
Name Enter the name for the variable. This name must be unique within the project and must be different from all other product variables, folder aliases, and registry key aliases.
Type

Select the type of variable from the drop-down list:

Type Icon Description
Generic text Value is a general text.
File or folder path Value represents a file or folder path.
Value represents a folder alias.
Registry key path Value represents a registry key path.
Value represents a registry key alias.

The variable type is used during preflight checking to ensure that variables are used in the correct context. You do not have to assign a type to each variable; if a variable is defined in terms of other variables, it will automatically inherit their type if appropriate. The variable's type is indicated with an icon in the variables list on the Product Variables project page as shown above.

Note: You cannot create folder or registry key aliases as variables; they are created automatically for each folder and registry key in the project. However, they can be used as regular folder or registry key path variables, respectively.

MSI note Windows Installer does not support registry key aliases. If you build an MSI installer, Tarma ExpertInstall will expand any registry key aliases when it creates the MSI database. This may lead to unexpected results.

Value

Enter the localizable value for the variable. You may use symbolic references in the value; they will be expanded each time the variable is used in the installer.

MSI note Windows Installer does not support runtime expansion of variable values. If you build an MSI installer, Tarma ExpertInstall will expand any symbolic references in Value when it creates the MSI database. This may lead to unexpected results.

Value (NT)

Check this box and enter an alternate value for the variable if the variable must have different values for Windows NT-based platforms (Windows NT4, 2000, XP, 2003, and later). Clear this box to use the same value on all platforms.

If you check this box, then Value will be used if the installer runs on Windows 95, 98, or Me, and Value (NT) will be used on all NT-based platforms.

Description Enter a description for the variable. This description is only for your own reference in Tarma ExpertInstall; it is not saved or used by the installers.
Save for Tarma

Check this box to store the variable in the installation database for Tarma Installer installers; clear it to omit it. If you omit a variable that is referenced elsewhere in the project, Tarma ExpertInstall will issue diagnostic message BLD:W0103.

Save for MSI

Check this box to store the variable in the installation database for Windows Installer installers; clear it to omit it. If you omit a variable that is referenced elsewhere in the project, Tarma ExpertInstall will issue diagnostic message BLD:W0102.

Note: Some variables have this box disabled (grayed out). This indicates one of the following:

  • If the box is checked, the variable/property is built into Windows Installer and cannot be saved in its database. However, it will be created automatically by Windows Installer and is available during installation.
  • If the box is cleared, the variable/property is a folder alias that is saved in the MSI Directory table instead of in the Property table. However, it can be used as if it were a property during installation.