Dealing with Common or Changeable Text Fragments
InstallMate projects contain many pieces of text that are either not known until installation time (for example, the location of the Program Files or Windows folders on the customer's computer), or that are known, but are used in several places and must be kept consistent throughout the project.
To solve both problems at once, InstallMate uses symbolic expressions. Symbolic expressions have the form <Name> and act as placeholders for information stored elsewhere. When InstallMate creates the Setup package, it substitutes the actual information for each placeholder. This allows you to change the information in one place and be confident that those changes are automatically propagated to all other places that require the same information. For information that is not available until installation time, the Setup program performs the substitutions.
InstallMate comes with more than 250 predefined symbolic variables, but you may also define your own, which can be used throughout the project just like the predefined variables.
How to define a common text fragment
To define a common text fragment for use throughout your InstallMate project, act as follows.
- Select the Variables page by clicking on its bullet in the Navigation Area.
- Right-click anywhere in the Variables List to open its context menu.
- From the context menu that appears, choose New Variable.
InstallMate creates a new Unnamed variable and displays its Symbolic variable attributes pane. In this pane, set the following options:
- Name - Enter any suitable name that is not already used by an existing symbolic variable. Variable names are not case-sensitive and may only contain letters, digits, and the '_' (underscore).
- Value (all or 9x) - Enter the text fragment that you want to insert whenever this variable is used. You may use references to other symbolic variables, if desired. Browse through the Variables List to see some examples of this.
- Value (NT) - If desired, check this box and enter an alternate value for use on Windows NT platforms. This facility is not often needed, so in most cases you should leave this box cleared.
- Description - Optionally, enter a description for the newly created variable. This is for documentation purposes only; it is not used in the Setup package.
- Value type - Leave at Generic text unless you have reason to change it. See Variable Settings in the online help for an explanation of the various types.
- Repeat steps 2-4 as required to define further variables.
How to refer to a common text fragment
To refer to a common text fragment, whether one that you defined or a predefined one, act as follows.
- Go to the text field in which you want to use the common text fragment.
- Place the caret (the blinking '|' symbol) at the position where you want to insert the text fragment. If you want to replace all or a part of a text field, select the part that you want to replace.
Use one of the following methods to insert a reference to a common text fragment:
- Type '<' followed by the name of the symbolic variable that contains the text fragment, followed by '>'
- Click the button to the right of the text field, if it has one. This opens a menu with descriptions of symbolic variables that are appropriate for the text field. Select the desired variable from this menu, or select Browse for Variable... to browse for any symbolic variable.
- Choose Insert > Predefined Variable from the main menu, then select the desired variable from the submenu that appears, or select Browse for Variable... to browse for any symbolic variable.
Note - The applicability of a given symbolic variable depends on its context. For example, certain text fields must contain a (symbolic) path name. InstallMate verifies the validity of each text field during its preflight checks and will issue a diagnostic if something is amiss.