- Using Applications to Edit Registry
- Defining File Associations with the Registry
- Summary
Defining File Associations with the Registry
One of the more frustrating aspects of working with files is that often there isn't an association defined for it. You can use the Windows XP Registry Editor to create associations between files that may not have been recognized when they were initially created, sent to you, or exported from other applications.
When you want to open a file, Explorer consults the location HKEY_CLASSES_ROOT to see what the default key is for the file type you are trying to open. From the cross-reference in this location of the Registry, Explorer knows which application to open to read and work on the file. When a user goes to Folder Options within the Tools applet, for example, Explorer automatically creates both kinds of Registry keys to enable the application to run. Although this approach is useful for initially getting an application up and running, it isn't that useful for redefining associations between file types and applications. That's where the Registry comes in handy.
For example, let's say your company likes to distribute PDF files with the name of the project as the extension. There's a major project in Chicago, so all the PDFs arrive in your e-mail in-box with a .Chicago extension. Obviously, this is a very unusual extension, and one you will have to define a custom association for. To solve this problem and create the association, follow the series of steps shown here:
Open up the Windows XP Registry Editor by typing regedit from the Run command line; or if you have already created a shortcut for it from the desktop, double-click on the icon.
Expand the HKEY_CLASSES_ROOT subdirectory, and look for the PDF extension subdirectory. Open it, and you will see how XP is currently calling Acrobat to open any .PDF file you click on.
Now you can create a new key for opening the .Chicago files. Select HKEY_CLASSES_ROOT, and select New from the Type menu in the Registry editor.
Select Edit from the New dialog box.
Type .Chicago, and click OK to create the new key.
In the value pane, double-click on the Default value, which in this case would be .PDF.
The Registry Editor prompts you for a new value. Type in .Chicago, and you will have created a new Registry key and value that associates that file extension with Adobe Acrobat.
Go back now to the Explorer window, and select Folder Options from the Tools applet. You'll notice that .Chicago is now one of the extensions listed. Now, when you go to open a file with the .Chicago file extension, Adobe Acrobat will load.