Associating a Program with a File Extension


Many programs create, edit, or display files of a specific type. For example, the Notepad program (a text editor that comes with Windows) works with text files that usually have the filename extension .txt. When you open a file with the extension .txt, Windows knows to run Notepad.

The Windows Registry stores file associations , information about which program you use to edit each type of file. Installation programs usually store this information in the Registry, but you can change the default file associations in the Registry. Chapter 40 describes how to view and edit the Registry with the Registry Editor program, but you can use other tools to change your file associations.

Associating Files with Programs when Opening a File

In an Explorer window, you can tell Windows which program to use when opening files with a particular extension. Follow these steps:

  1. In an Explorer window, find a file with the extension that you want to associate with a program.

  2. Right-click the filename and choose Open With from the menu that appears. (If Open With doesn't appear on the menu, you have to use another method of associating the file type with the program; see the next section.) You see the Open With dialog box shown in Figure 3-4. (If a small submenu of programs appears, select Choose Default Program to display the Open With dialog box.)

    image from book
    Figure 3-4: Which program do you want to run to open this file (and files like it)?

  3. Select the program to run, or click Browse to find the program file.

  4. Click the Always Use The Selected Program To Open This Kind Of File check box and click OK.

Windows Explorer permanently saves the association of the filename extension with the program, and it opens the file you selected with the program you specified.

Associating Files with Programs by Using the Default Programs Option

Another way to associate a file type (file extension) with a program (or change which program is associated with a file type) is to use the Default Programs feature in Windows Vista. This feature enables you to view the program that runs a file type. It also lets you change the default program that is associated with a file type.

To create or edit a file association, follow these steps:

  1. Choose Start Default Programs Associate A File Type Or Protocol With A Program. The Set Associations window appears, shown in Figure 3-5.

    image from book
    Figure 3-5: The Set Associations window lets you change the default program for a file type.

  2. Click a file type.

  3. Click the Change Program button. The Open With window opens.

  4. Select the program to run, or click Browse to find the program file.

  5. Click OK.

Windows Explorer permanently saves the association of the filename extension with the program, and it opens the file you selected with the program you specified.




Windows Vista. The Complete Reference
Windows Vista: The Complete Reference (Complete Reference Series)
ISBN: 0072263768
EAN: 2147483647
Year: 2004
Pages: 296

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net