Determining the Appropriate Component Creation Method for Dynamically Linked Files

InstallShield 2014 Express Edition

InstallShield provides two methods for creating components for dynamically linked files: the best practice method and the one-component-per-directory method. (A component is the smallest installable part of a product. The Express edition of InstallShield creates components for you automatically. For more information, see Installation Fundamentals.)

Using the Best Practice Method

When best practices for dynamic link creation are followed, InstallShield performs the following tasks at build time for all of the files that meet the include and exclude filter criteria of your dynamic link:

InstallShield creates a separate component for each portable executable (PE) file in the dynamically linked folder. Each PE file is the key file of its component.
InstallShield adds all non-PE files at the root level of the dynamic link to the component that contains the link.
If the dynamic link includes a subfolder, InstallShield creates a new component for all of the non-PE files in that subfolder. If the dynamic link includes more than one subfolder, InstallShield creates a separate component for all of the non-PE files in each subfolder.

This is the default functionality for all new dynamic links.

Tip: The File Extensions tab on the Options dialog box is where you specify which file types are PE files.

Using the By-Directory Method

When the by-directory method is used for dynamic link creation, InstallShield performs the following tasks at build time for all of the files that meet the include and exclude filter criteria of your dynamic link:

InstallShield creates one component for all of the files that are in the root-level dynamically linked folder, regardless of the file types.
If the dynamic link includes one or more subfolders, InstallShield creates a separate component for all of the files in each subfolder, regardless of the file types. The first dynamically linked file in a subfolder’s component is the key file of that component.

This method of dynamic link creation is the traditional method that was available in InstallShield before the best practice method was introduced.

Determining Which Dynamic Link Creation Method to Use

For most dynamic links, the preferred dynamic link creation method is the best practice method. This method, in combination with the streamlined QuickPatch package functionality, enables you to create patches according to Windows Installer component rules.

The best practice method is also preferred if it is possible that you may someday upgrade your project to the Premier or Professional edition of InstallShield. These editions let you create minor upgrades and small updates. For minor upgrades and small updates, the components, key files, and feature-component organization need to be maintained across the earlier and later .msi databases; for patches, the File table keys also need to be maintained. Since each component name and component code—and possibly key files—change at each build with the by-directory method of dynamic file linking, issues may occur. The advantage of the best practice method is that it allows for greater predictability than with the by-directory method.

Note that if you want to create a patch for an earlier version of your product, and the earlier installation includes dynamic links that used the by-directory method, you must continue to use the by-directory method for the same dynamic links. However, if you add new dynamic links in your upgrade project, you can use the best practice method for those new dynamic links. That is, you can mix both types of dynamic linking in the same project and create a patch to deliver the upgrade.

Important: 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.

Note: For information on the rules that Windows Installer uses when determining whether a file included in a package should overwrite a file that already exists on the target system, see Overwriting Files on the Target Machine.

Specifying Which Dynamic Link Creation Method You Want to Use

The File Linking tab on the Folder Properties dialog box is where you specify which component creation method you want to use.

See Also