| Reference information | |
|---|---|
| Project page | File and MIME Types |
| Related topics | Working with attribute panes |
A File Type represents a file type registration or unregistration. It is used to associate file types and extensions with applications that can open them. A File Type object contains subordinate File Extension and Shell Verb objects that define the associated file extensions and the possible actions, respectively.
Registration or unregistration of a file type is controlled by its component and its file extensions and shell verbs. The details differ somewhat between Tarma Installer and Windows Installer.
| Situation | Tarma Installer | Windows Installer |
|---|---|---|
| Not linked to a component | The file type is registered if any of its extensions or verbs are registered. |
The file type is registered if any of its extensions or verbs are registered. The file type's own component, if any, is ignored. |
| Linked to a component | The file type is registered if its component is installed, or if any of its extensions or verbs are registered. |
The Tarma Installer approach allows you to register a file type either implicitly, if one of its dependents is registered, or explicitly, for example if it doesn't have any dependents. See File and MIME Types for more information.
Tip: Many applications will register their own file types if you start them with the /RegServer command line option. If your application supports that option, you might find it more convenient to register the application by specifying Run with /RegServer in the file's Registration attribute. In that case, you don't need to register its file types, file extensions, and shell verbs separately.
Windows Installer does not support Run with /RegServer registration.
You must either use a separate Run
Program custom action to register the application with the /RegServer
option and another one to unregister it with /UnregServer when your
product is uninstalled, or use file types, file extensions, and shell verbs
after all.
Tip: To make the two custom actions dependent upon installation or
removal of the application, respectively, use the following conditional
expressions in the Run Program
action's Condition field:
$component_name=3 (TRUE if the component is being installed)
$component_name=2 (TRUE if the component is being removed)
component_name must be the name of the component that controls the
installation of the application's main executable file. Place the /RegServer
custom action somewhere after the InstallFiles action in the InstallExecuteSequence
action sequence, and the
/UnregServer action before RemoveFiles in the same sequence.
This pane contains the following attributes and options.
| Attribute | Description |
|---|---|
| ProgID |
Enter the ProgID of the file type. The ProgID is the symbolic name of the file type, usually in the format ProductName.FileType.Version. It is used to uniquely identify (this version of) the file type. The ProgID may be up to 39 characters long, may not contain punctuation except for the period ('.'), and must not start with a digit. Some examples are: Photoshop.Image.6 This format is a convention rather than a strict requirement and other formats are used as well. However, the ProgID must be unique across all file types that may be a registered on a computer, because it is used as a registry key name when the file type is registered. |
| Unversioned |
Enter the unversioned ProgID of the type, or leave empty if the file type only has one ProgID. The unversioned ProgID is typically used to provide a version-independent identifier for the file type; it contains a reference to the version-specific ProgID that defines the actual file type information. The Unversioned ProgID typically uses the format ProductName.FileType, i.e., the ProgID minus the version number. You should only define the Unversioned field if the ProgID field contains the ProgID of the current version of the file type; for older versions of the ProgID, you should leave Unversioned empty. |
| Display name |
Enter the user-visible name of the file type. This name is used by the Windows shell to refer to the file type, for example in the Type column in Windows Explorer. |
| Icon... |
Click this button to open the Select Shortcut Icon dialog box that allows you to specify an icon for the file type. If you don't specify an icon, the file type will use a generic icon provided by Windows. |
| Reset icon |
Click this box to remove the file type icon and revert to the generic icon. Note: Tarma ExpertInstall will display the "No icon" icon if no icon is associated with the file type. |