Setting a Key File for a Dynamic File Link

InstallShield 2022

Project:This information applies to dynamic links that use the one-component-per-directory method of component creation (as described in Determining the Appropriate Component Creation Method for Dynamically Linked Files) in the following Windows Installer–based projects:

Basic MSI
DIM
InstallScript MSI
Merge Module

This information does not apply to dynamic links that use the best practice method of component creation.

A dynamically linked file whose component uses the one-component-per-directory method of component creation cannot be the key file of a component.

To set a key file for a component containing a dynamic link, add a static link to the desired file, and then set the static link to be the key file of the component. In the dynamic link settings, enter the full name of the key file in the Exclude files with the following extensions field.

For example, you might have a source directory containing several .txt files, and you want the file called Key.txt to be the key file. First, add a static link to Key.txt to a component, and set Key.txt as the key file. Next, create a dynamic link with the same source folder, setting the Include files with the following extensions setting to *.txt and the Exclude files with the following extensions setting to Key.txt.

For a dynamic link that includes subdirectories, the build process sets the first file in a subdirectory’s component as the key file of the dynamically generated component.

See Also