Using Path Variables

InstallShield 2013

Project: This information applies to the following project types:

Advanced UI
Basic MSI
InstallScript MSI
InstallScript Object
Merge Module
Suite/Advanced UI

Traditionally, to link to source files in an installation project, you would need to create a reference to that file using a hard-coded path. For example, you might have a source file called Program.exe located at C:\Work\Files that you want to include in your installation. However, if you used hard-coded paths, you needed to enter the entire path every time that you want to associate a source file from that directory. If you moved the file to another directory, you needed to change the hard-coded path as it appears in your installation project. If your installation consisted of a small number of source files, this might not have been a problem. Unfortunately, some installations contain thousands of files that all would need to be remapped if you change the folder structure or migrate the project to a different machine.

With path variables, you can define commonly used paths in a central location so that you do not need to change every source file’s path each time you move the project or change the directory structure.

All path variables can be viewed and modified in the Path Variables view. You can use path variables in almost any location in InstallShield where you link to source files, such as in the Dialog Editor, dynamic file links, and the release location. Instead of entering the path variables yourself, you can have InstallShield recommend them whenever you browse to a path. To have InstallShield automatically recommend path variables, select the Always display the Path Variable Recommendation dialog to me option on the Path Variables tab of the Options dialog box.

Note: Path variables are used during the development of your installation project. These paths do not apply to the target machines where the application is being installed. Rather, they are used to link to source files for your installation project. When the project is built, those links are evaluated and the files they point to will be built into the installation.

See Also