Searching for InstallAnywhere Variables

InstallAnywhere 2018

You can search a project to locate all references to a specific variable. You can choose to search for a variable in any of the installation sequences (Pre-Install, Install, Post-Install, Pre-Uninstall, Uninstall, Post-Uninstall) and can choose to search features and/or components. Search results are displayed on the Search Results dialog box. You can also perform global replacements of variables.

Performing a Search for a Variable

To search your project for all references to a specific variable:

1. Open a project in the Advanced Designer.
2. On the File menu, click Search (or press Ctrl + F). The Search Results dialog box opens.
3. Click the Variables tab.
4. In the Enter Variable Name setting, enter the name of the variable you want to search for.

If you want to search for an exact match of a variable, enter the complete variable name in this setting and leave the Partial Search check box cleared.

Note • It is recommended that you always enter the dollar sign symbol ($) before and after the variable name.

If you want to search for a specific text string in a variable, enter the text string in this field and also select the Partial Search check box.

Note • After performing a partial search, the Replace feature is not available.

5. If you want to perform a case-insensitive search, select the Ignore Case check box.
6. In Search for variable in area, select the installation phases (Pre-Install, Install, Post-Install, Pre-Uninstall, Uninstall, and/or Post-Uninstall) and product elements (Install Set, Features, and/or Components) that you want to search.
7. Click the Search button.

InstallAnywhere shows the results of the search in a tree structure with the total number of variables that were found listed at the top. Items that are associated with the selected variable are listed below, and grouped by category.

Performing a Search and Replace of a Variable

To perform a search and replace of a specific variable:

1. Search for a variable, as described in the aforementioned instructions.

Note • Enter the full variable name in the Enter Variable Name setting, and do not select the Partial Search check box.

InstallAnywhere shows the results of the search.

2. To replace all instances of the found variable with a replacement value, click the Replace All button. The Replace Variable dialog box opens.
3. In the Replace Variable VARIABLE_NAME with setting, enter the replacement value.

Note • It is recommended that you always enter the dollar sign symbol ($) before and after the replacement variable name. For example, instead of searching for $NAME$ and replacing it with NEWNAME, you should replace it with $NEWNAME$.

4. Click the Replace All button.

InstallAnywhere replaces all instances of the variable with the replacement variable.

About Replacing Magic Folder Variables

If you choose to replace a magic folder variable with another variable, InstallAnywhere simply copies the children of the source magic folder to the destination magic folder variable.

Note • There are known issues regarding replacing the $USER_INSTALL_DIR$ magic folder. Therefore, searching for and replacing the $USER_INSTALL_DIR$ magic folder is not recommended.

See Also