Section 6.10. Filename Extensions and File Associations: All Versions


6.10. Filename Extensions and File Associations: All Versions

Every operating system needs a mechanism to associate documents with the applications that created them. When you double-click a Microsoft Word document icon, for example, Word launches and opens the document.

In Windows, every document comes complete with a normally invisible filename extension (or just file extension) a period followed by a suffix that's usually three letters long.

Here are some common examples:

When you double-click this icon ...

...this program opens it

Fishing trip .doc

Microsoft Word

Quarterly results .xls

Microsoft Excel

Home page .htm

Internet Explorer

Agenda .wpd

Corel WordPerfect

A home movie .avi

Windows Media Player

Sudoku .gadget

Sidebar gadget

Animation .dir

Macromedia Director



Tip: For an exhaustive list of every file extension on the planet, visit www.whatis.com; click the link for "Every File Format in the World."

Behind the scenes, Windows maintains a massive table that lists every extension and the program that "owns" it. More on this in a moment.

6.10.1. Displaying Filename Extensions

It's possible to live a long and happy life without knowing much about these extensions. Because file extensions don't feel very user -friendly, Microsoft designed Windows to hide the suffixes on most icons (Figure 6-13). If you're new to Windows, you may never have even seen them.

Figure 6-13. As a rule, Windows shows filename extensions only on files whose extensions it doesn't recognize. The JPEG graphics at left, for example, don't show their suffixes. Right: You can ask Windows to display all extensions, all the time .


Some people appreciate the way Windows hides the extensions, because the screen becomes less cluttered and less technical-looking. Others make a good argument for the Windows 3.1 days, when every icon appeared with its suffix.

For example, in a single Explorer window, suppose one day you discover that three icons all seem to have exactly the same name : PieThrower. Only by making filename extensions appear would you discover the answer to the mystery: that one of them is called PieThrower.ini, another is an Internet-based software updater called PieThrower.upd, and the third is the actual PieThrower program, PieThrower.exe.

If you'd rather have Windows reveal the file suffixes on all icons, open an Explorer window. Choose Organize Folder and Search Options. In the Folder Options dialog box, click the View tab. Turn off "Hide extensions for known file types," and then click OK.

Now the filename extensions for all icons appear (Figure 6-13).

6.10.2. Hooking Up an Unknown File Type

Every now and then, you might try to open a mystery iconone whose extension is missing, or whose extension Windows doesn't recognize. Maybe you've been sent some weirdo document that was created by a beekeeper or banjo transcriber using a program you don't have, or maybe you're opening a document belonging to an old DOS program that doesn't know about the Windows file-association feature. What will happen when you double-click that file?

Windows asks you.

In the dialog box shown in Figure 6-14, Windows offers you two different buttons :

Figure 6-14. Top: Sometimes Windows doesn't know what to do with an icon you've just double-clicked. If you're pretty sure your PC has a program that can open it, give it a little helpclick "Select a program from a list of installed programs" and then click OK .
Bottom: Use this window to select a program for opening the mystery file. It's sometimes useful to associate a particular document type with a program that didn't create it, by the way. For example, if you double-click a text file, and the Open With dialog box appears, you might decide that you want such documents to open automatically into WordPad .


  • Use the Web service to find the appropriate program . In other words, Windows will take your PC onto the Internet and look up the mystery file extension on the Microsoft Web site.

  • Select the program from a list of installed programs . Windows displays a dialog box that looks like the one at bottom in Figure 6-14. Click the name of the program you want, and then turn on "Always use the selected program to open this kind of file," if you like.

6.10.3. Hooking up a File Extension to a Different Program

Windows comes with several programs that can open text files with the extension .txt Notepad and WordPad, for example. Windows also comes with several programs (Paint, Photo Gallery) that can open picture files with the extension .jpg . So how does it decide which program to open when you double-click a .txt or .jpg file?

Easyit refers to its internal database of preferred default programs for various file types. But at any time, you can reassign a particular file type (file extension) to a different application. If you've just bought Photoshop, for example, you might want it to open up your JPEG files, rather than Photo Gallery.

This sort of surgery has always confused beginners . Yet it was important for Microsoft to provide an easy way of reprogramming documents' mother programs; almost everyone ran into programs like RealPlayer that, once installed, " stole " every file association they could. The masses needed a simple way to switch documents back to their preferred programs.

So in Vista, Microsoft ripped up its File Types dialog boxes and started from scratch. Whether or not the three new file-association mechanisms are actually superior to the one old onewell, you be the judge.


Tip: The File Types tab of the Folder Options dialog box, once the headquarters of document-to-program relationships, no longer exists in Vista.
6.10.3.1. Method 1: Start with the document

Often, you'll discover a misaligned file-type association the hard way. You'll double-click a document and the wrong program opens it.

For that reason, Microsoft has added a new way of reprogramming a documentthat starts right in Explorer, with the document itself.

Right-click the icon of the file that needs a new parent program. From the shortcut menu, choose Open With.

If you're just trying to open this document into the new program this once , you may be able to choose the new program's name from the Open With submenu (Figure 6-15, top). Vista doesn't always offer this submenu, however.

Figure 6-15. Top: To reassign a document to a new parent program, use its Open With shortcut menu. If you're lucky, you'll get a submenu of available programs that can open the document .
Bottom: Windows is prepared to show you a list of every program that can open the mystery file. Scroll through the list of installed programs to select the one you want. By turning on the checkbox at the bottom of the dialog box, you create a file association that will handle similar files (those with the same file extension) in the future .


If you choose Choose Default Program from the submenu, or if there's no submenu at all, the new Open With dialog box appears, as shown in Figure 6-15 (bottom). It's supposed to list every program on your machine that's capable of opening the document.

And now, a critical decision: Are you trying to make this document only open in a different program? Or all documents of this type?

FREQUENTLY ASKED QUESTION
Program Access and Defaults

OK, I've just barely understood your description of the new Control Panel applet, where I can hook up documents to programs or programs to documents. So what, exactly, is this other link in that applet, called "Set program access and computer defaults?"

Well, it's kind of a long story.

In its 2002 agreement with the U.S. Department of Justice, Microsoft agreed to give other companies a fighting chance at competing with programs like Internet Explorer, Outlook Express, and Windows Media Player.

If you open the Default Programs applet and click "Set program access and computer defaults," you get the dialog box shown here. After you authenticate yourself (page 191), you're offered three or four options:

Microsoft Windows means, "Use all of Microsoft's utility programs, just as Windows has been doing from Day One." You're saying that you prefer Microsoft's Web browser (Internet Explorer), email program (Windows Mail), music/video player (Windows Media Player), and instant messaging program (Windows Messenger).

Selecting this option doesn't prevent you from using other browsers, email programs, and so onyou'll still find them listed in the Start All Programs menu. But this option does put the Internet Explorer and Windows Mail icons, for example, into prime positions at the top of your Start menu for quick and easy access.

Non-Microsoft means, "Use anything but Microsoft's programs! Instead, use Netscape Navigator, Eudora, RealPlayer, Sun's Java, or whateverjust nothing from Microsoft."

You should install your preferred alternate programs before selecting this option. Otherwise, the only programs this feature "sees" are Microsoft programs, which would make selecting this option a tad pointless.

As with the "Microsoft" option, choosing this option places your preferred programs' icons at the top of your Start menu. Unlike the "Microsoft" option, however, this option removes access to the corresponding Microsoft programs. If you choose a non-Microsoft program as your email program, for example, Windows Mail disappears completely from the All Programs menu and its folder (in C: Program Files).

Of course, Microsoft's programs aren't really gonethey're just hidden. They pop right back when you choose the "Microsoft Windows" option, or when you choose Custom and then click the associated "Enable access to this program" checkbox. Just remember to click OK to apply your changes.

Computer Manufacturer means, "Use whatever programs are recommended by Dell" (or whoever made the PC and signed deals with AOL, Real, and so on). This option doesn't appear on all PCs.

Custom lets you choose each kind of program independently, whether it comes from Microsoft or not. For example, you can choose Firefox, Internet Explorer, or any other Web browser as your default browser. (They'll all be listed here when you click the double-arrow button to expand the dialog box.)

During your selection process, note the "Enable access to this program" checkbox. It really means, "List this baby at the top of the Start menu, and also put its icon on the Quick Launch toolbar, the Desktop, and wherever else important programs are listed."


If it's just this one, click OK and stop reading. If it's all files of this type (all JPEGs, all MP3s, all .doc files...), then also turn on "Always use the selected program to open this kind of file," and click OK.

You should now be able to double-click the original documentand smile as it opens in the program you requested .


Note: If the program isn't listed, click the Browse button and go find it yourself. And if you don't seem to have any program on your PC that will open the document, click "look for the appropriate program on the Web." You go online to a File Associations Web page, which lists programs that Microsoft knows can open the file.
6.10.3.2. Method 2: Start with the program

If you'd prefer to edit Vista's master database of file associations directly, a new Control Panel applet awaits. You can approach the problem from either direction:

  • Choose a program and then choose which file types you want it to take over; or

  • Choose a filename extension (like .aif or .ico) and then choose a new default program for it.

Here's how to perform the first technique:

  1. Choose Start Control Panel. Click Classic View Default Programs .

    The new Default Programs control panel opens.

  2. Click "Set your default programs."

    A curious new dialog box appears, as shown in Figure 6-16 at top. It's a list of every program on your machine that's capable of opening multiple file types.

    Figure 6-16. Top: Each software program you install must register the file types it uses. The link between the file type and the program is called an association. This dialog box displays each program on your PC that's capable of opening documents .
    Bottom: If you click "Choose defaults for this program," you get this box, where you can manually inform Windows of which file types the selected program is allowed to open. In this example, the box tells you which types of files will open in QuickTime Player when double-clicked .


  3. Click the name of a program .

    For example, suppose a program named FakePlayer 3.0 has performed the dreaded Windows Power Grab, claiming a particular file type for itself without asking you. In fact, suppose it has elected itself King of All Audio Files. But you want Windows Media Player to play everything except for FakePlayer (.fkpl) files.

    In this step, then, you'd click Windows Media Player.

    If you want Media Player to become the default player for every kind of music and video file, you'd click "Set this program as default." But if you want it to open only some kinds of files, proceed like this:

  4. Click "Choose defaults for this program."

    Now yet another dialog box opens (Figure 6-16, bottom). It lists every file type the selected program knows about.

  5. Turn on the checkboxes of the file types for which you want this program to be the default opener .

    Of course, this step requires a certain amount of knowledge that comes from experiencehow the heck would the average person know what, say, a .wvx file is?but it's here for the power user's benefit.

  6. Click Save, then OK .

6.10.3.3. Method 3: Start with the file type

Finally, you can approach the file-association problem a third way: by working through a massive alphabetical list of filename extensions (.aca, .acf, .acs, .aif, and so on) and hooking each one up to a program of your choice.

  1. Choose Start Control Panel. Click Classic View Default Programs .

    The Default Programs control panel opens.

  2. Click "Associate a file type or protocol with a program."

    A massive filename extensions list opens, as shown in Figure 6-17.

    Figure 6-17. Yet another way to reprogram your documents: start with the file type. This massive list of thousands of file types makes you realize just how many possible combinations of three letters there really are .


  3. Select the filename extension you want, and then click "Change program."

    Now the Open With dialog box appears (the same one shown in Figure 6-16).

  4. Click the name of the new default program .

    Once again, if you don't see it listed here, you can click Browse to find it yourself.

  5. Click OK and then Close .




Windows Vista. The Missing Manual
Windows Vista: The Missing Manual
ISBN: 0596528272
EAN: 2147483647
Year: 2006
Pages: 284
Authors: David Pogue

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