Adding Additional Associations
The associations between file extensions and specific applications are stored in the registry. From a practical viewpoint, there is no limit as to how many applications can be associated with a given application. However, only one application can be the default which is executed when a selection is double clicked. In order to execute one of the other associated applications, the user simply needs to RIGHT click the file and select the appropriate action (application) from the context menu.
Technically, there are several similar ways to edit these registry values, though the specific details vary slightly depending on which Windows operating system you are using. Basically, from the Windows Explorer menu, you can select something similar to
View / Folder Options... / File Types
and then edit the appropriate file type (from the type column in the right hand pane in Windows Explorer, assuming that the detail view is showing). The actual selections to get there vary somewhat between the operating systems.
Directly editing the registry is virtually identical in each operating system. It also has the advantage that you can locate the keys by either the actual extension or by searching on the file type. In addition, in the earlier operating systems, you must use the registry to edit the context menu strings.
Using this basic procedure, it is possible to have multiple applications actually share a contested extension. In the registry,
- Locate the extension in HKCR (HKEY_CLASSES_ROOT)
(for example - HKCR\\.txt) - Locate the HKCR key which match the default value found in step one.
(for example HKCR\\txtfile) - The context menu options are located under the shell key. The next step is to rename these keys to NOT use generic terms like Open, Edit, or Play. Instead, use more specific terms like Edit with Notepad, Browse in IE, and Play via mplayer. Avoid using the ambiguous term Open at all costs.
- Sometimes the shell verbs have a default value. When present, the default value is what is displayed in the context menu. In those cases, the default value must also be modified.
- Using the existing keys as examples, add as many additional keys as you want, usually one for each application which you want to associate with that extension.
- If the default value of the shell key matches one of its sub-keys, then the associated command is executed when a file of that type is double clicked.