User Guide

158
Adding File Associations
Adding File Associations
You can associate file extensions with executables to determine which application to
launch when the end user double-clicks a file with a certain extension. You can associate
file extensions with any executable file in an installation. File associations are a type of
advertising and are stored in the registry.
To add a file association:
1. Do one of the following:
Select Installation Expert > File Associations page.
From Current Feature, select a feature or condition. (Because any item you
add must be assigned to a specific feature, you cannot add an item when All
Features is selected.)
Items you add to a feature are only installed on the destination computer if the
feature is installed. Items you add to a condition are only installed if the feature
is installed and the condition is true.
Click Add at the right of the page and select New.
In Setup Editor, on the Components or Features tab, right-click a component or
feature and select New > File Association.
The File Association Details dialog appears.
2. On the Extension Details tab, select the executable to use for the extension, type an
extension, and enter the program ID for the executable. For details, see
Determining Extension Settings on page 159.
3. (Optional.) On the Command Verbs tab, click Add, and on the Verb Details dialog
that appears, set the actions that will be available when the end user right-clicks an
executable with this extension in Windows Explorer. For details, see Adding
Command Verbs on page 159.
4. (Optional.) On the MIME Types tab, mark Show All and mark checkboxes to select
the MIME types to associate with this extension. For details, see Selecting MIME
Types on page 160.
5. Click OK.
The file association appears. To edit it, double-click its name. To delete it, use the right-
click menu.
In Setup Editor, a new branch of folders is created under the Advertising icon to show
the application folder, the Extensions folder, and the ProgId folder.
To import a file association:
1. Select Installation Expert > File Associations page.
2. From Current Feature, select a feature or condition. (Because any item you add
must be assigned to a specific feature, you cannot add an item when All Features
is selected.)
3. Click Add at the right of the File Associations page and select Import.
The Import File Association dialog appears.
4. Click Browse to select the executable to use for the extension. You can only select
executables that you’ve already added to the installation.
5. From Extension, select the extension to use. This list shows all available extensions
on your computer.
6. Click OK.