Dynamic File Linking

InstallShield 2015

If you want to add the contents of an entire directory to your project, you can do so through the use of dynamic file linking. When you select a source folder for dynamic linking, InstallShield adds the files within that folder to your release at build time. InstallShield scans the source folder before every build and automatically incorporates any new or changed files into your release. Dynamic file linking is useful when the list of files in a folder—and possibly the list of files in its subfolders—might change between builds.

Important: Dynamic file linking should be used with caution. If you inadvertently delete a dynamically linked file from the source folder that your dynamic link references, that file is not included in your release the next time you build it, and InstallShield does not display any build warning or error. Your product may install without any issues, but it may not work as expected, since the dynamically linked file that was inadvertently deleted is no longer being installed. Therefore, it is recommended that you avoid using dynamic file links for critical executable files—such as .exe, .dll, or .ocx files—especially if your product requires them in order to run successfully.

Whenever possible, it is better to use the best practice method, instead of the by-directory method, for creating components for dynamically linked files. Note that with both methods, however, a minor upgrade, a small update, or a patch may not install correctly if a file that was present in a target image is removed from the dynamic link for the upgrade or patch.

Filtering Dynamically Linked Files

When you are configuring your dynamic file link, you can specify whether you want to include subfolders of the dynamically linked folder. To further filter the files that are dynamically linked, you can identify specific names of files that you want to be included in or excluded from the dynamic link. In addition, you can use wild cards to specify only certain files or file types to be added or excluded.

For example, if all of your image files are in one folder along with sound files and you want to dynamically link only the image files, you could specify that you would like to include only .bmp and .ico files in the dynamically linked folder. To do so, you would use an asterisk (*) in your include pattern, as in the following example:

*.bmp, *.ico

To include or exclude a specific file, you would enter the full file name in the include or exclude pattern box. For more details, see Creating a Dynamic Link.

Distinguishing Dynamically Linked Files and Folders from Static Files and Folders in the InstallShield Interface

When a dynamic file is displayed within the InstallShield interface, the lower-left corner of the file’s icon includes an image that indicates that it is a dynamically linked file:

InstallShield includes that same dynamic file image on the icon of subfolders that are included in dynamic file links:

Furthermore, InstallShield adds an arrow to the folder image—in addition to the dynamic file image—on the component icon of subfolders that are included in dynamic file links:

The icons that the InstallShield interface displays for static files and folders do not include this dynamic link image.

See Also