Home > Articles

Associating Files with Programs

Whenever you double-click an icon, Windows checks the file's extension against a database of registered file types to determine which action to take. A registered file type might have multiple actions (Open, Edit, and Print, for example), all of which are available on the shortcut menu when you right-click a file of that type. Windows uses the default action when you double-click the icon. If Windows does not recognize the file type, it displays a dialog box and lets you choose which application to use with the file you've selected.

In Windows Me, Microsoft has completely redesigned the interface through which you manage the associations between file types and programs. The procedure is still complicated, but it now includes some safeguards that let you undo changes–a welcome improvement over Windows 95 and 98.

In this section, I explain how to change the default action associated with a given file extension, and how to undo those changes. I also show how to add or edit actions for a registered file type. Before you begin messing with these system settings, however, it's crucial you understand the basic workings of file types and extensions.


If you read other Windows books, you'll discover that most authors gloss over this topic because it's so incredibly complex. Much of the material in this section is documented for the first time here.

How File Types and Extensions Work

File extensions have been around since the very first version of DOS. Beginning with the first release of Windows 95, Microsoft began tracking file types as well. In Windows Me, Microsoft has finally made it possible to work with file extensions and file types separately.

File types are inextricably linked to file extensions, but the relationship isn't always easy to understand. Here are the essential facts you need to know:

  • File types typically have plain-English names (HTML Document), whereas extensions are typically three or four letters (HTM or HTML).

  • File types are listed in their own column when you choose Details view in Windows Explorer. You also can inspect a file's properties to see which file type is associated with it. Extensions for registered file types are hidden by default; extensions for unregistered file types are always visible in the Explorer list.

  • TIP

    Evildoers who write viruses often take advantage of the fact that extensions for registered file types are hidden. The infamous LoveLetter virus, for example, attached itself to email messages as a file called LOVE-LETTER-FOR-YOU.TXT.vbs. The vbs extension was hidden by default on most systems; without the extension, this looks like a simple text file, doesn't it? If you reconfigure the default Explorer settings so that all extensions are visible, the camouflaged file extension is easier to spot. To do so, open the Folder Options dialog box, click the View tab, and uncheck the Hide File Extensions for Known File Types box.

  • Every file type has an associated icon, which appears when you view files of that type in Windows Explorer or a folder window.

  • Every unique file extension is associated with one and only one file type at a time. After you install Microsoft Word, for example, indows associates the DOC extension with the Microsoft Word Document file type.

  • A file type, on the other hand, can be associated with multiple extensions. The HTML Document file type works with both HTM and HTML extensions, and files of the JPEG Image file type can end with the extension JPE, JPEG, or JPG.

  • As the previous examples illustrate, a file extension can be more than three letters long. In fact, a file extension can consist of more than 200 characters.

  • Windows common dialog boxes (File Open and File Save As) include a drop-down File of Type list. Choose a file type from this list, and Windows adds the default extension for that file type automatically when you save a document.

  • A Windows filename can contain more than one period. Windows defines the extension as all characters that appear after the last period in the filename.

Most application programs handle the details of registering file types and associations when you install them. Creating a file type manually and editing an existing file type are cumbersome and difficult tasks best left for programmers. By far the best way to register a new file type is to do so by installing a program, where this chore is one of the Setup program's normal duties.

Viewing File Associations

To see a list of all registered file types, open an Explorer window, choose Tools, Folder Options, and then click the File Types tab.

Unlike previous Windows versions, which showed only the file type, Windows Me displays the file extension and file type. Click either heading to arrange the list in alphabetical order by that column. When you select an entry from the list, information about that file extension, its associated application (if any), and its registered file type appear at the bottom of the dialog box (see Figure 3.16).

Figure 3.16 Use this list of registered file types and extensions to specify which program is associated with a given file type.

Using an Alternative Program to Open a Registered File Type

You might have several programs at your disposal with which you can view or edit a particular type of file. For example, you can edit a text document (with a TXT extension) in Notepad, WordPad, Microsoft Word, or any one of dozens of alternative text editors. Unfortunately, Windows forces you to associate one and only one program with the default action for each registered file type. As a result, when you double-click the icon for a text document, that document opens in the program associated with that file type.

You can override the default association at any time and choose a specific program you want to use for a given file icon without changing file associations. Say, for instance, that you want to use WordPad to open a text document. Perform the following steps to add WordPad to the Open With list for text documents; after you do so, WordPad and Notepad will be available as options whenever you right-click a file of that type and choose Open With. Follow these steps to get started:

  1. Select the document icon, right-click, and choose Open With from the shortcut menu. If this is the first time you've used the Open With menu for this file type, the Open With dialog box appears (see Figure 3.17). Use this dialog box to open a document with the application of your choice instead of the default program. If you've already assigned other programs to the Open With menu, select Choose Program from the bottom of the cascading menu.
  2. Figure 3.17

  3. Scroll through the list and select the program you want to use to open files with this extension–in this example, it's WordPad. If the program you're looking for isn't on the list, click the Other button, browse for the program's executable file, and then click Open.
  4. NOTE

    Note that the list of programs in the Open With dialog box shows the full name of the registered application, if available. This is a significant improvement over previous Windows versions, which showed only the short name of the executable file and forced you to guess which program it launched.

  5. Before you click OK, note the checkbox labeled Always Use This Program to Open This Type of File. By default, this box is unchecked. Do not add a check mark unless you want to change the program associated with the Open action for files with this extension.

  6. Click OK to open the document in the specified program.

After you go through this process the first time, Windows adds the program you chose to the cascading Open With menu. In the future, you can choose the program you want by right-clicking and using this menu. Figure 3.18 shows the shortcut menu for a text document after making this modification.

Have you accidentally added the wrong program to the Open With list? For instructions on how to remove these menu items, see "Cleaning Up the Open With List" in the "Troubleshooting" section at the end of this chapter.

Figure 3.18 Windows remembers when you use an alternative program to open a file with a given extension and adds its name to the Open With menu.

Changing File Associations by Extension

What happens if you decide you always want to use a particular program to open files with a specific extension? Making this sort of change is trivially easy. You can configure Windows so that WordPad opens instead of Notepad when you double-click a file with a TXT extension, for example. And unlike in previous Windows versions, undoing your changes and restoring the original association is also easy:

  1. Right-click a file that ends with the extension you want to edit and choose Properties.

  2. In the Properties dialog box, note that the General tab includes the file type and the name of the program currently registered to open it (see Figure 3.19). Click the Change button.

  3. Figure 3.19 The Change button, new in Windows Me, lets you quickly change the program that opens when you double-click files with a given extension.

  4. In the Open With dialog box, select the program you want to use to open all files with this extension. If the program you're looking for isn't on the list, click the Other button, browse for the program's executable file, and then click Open. Note that the Always Use This Program to Open These Files box is checked and cannot be changed.

  5. Click OK to make the change, which is reflected immediately in the Properties dialog box for the file.

This feature works by taking advantage of a new Registry key not found in previous Windows versions. When you use the Change button to select a new program for use with a particular file extension, Windows adds or changes the subkey for that extension in the following Registry key:


Windows maintains a record of the previous file type in the Registry, as well. If you discover you made a mistake, and you want to change the association back to its original setting, open the Folder Options dialog box, click the File Types tab, select the extension, and click the Restore button. Note that this option is available only if you've changed the default settings for an extension.

Changing Advanced File Association Properties

In the previous section, I described the simplest configuration option for a file association–one action for one extension. But Windows has a much more powerful way of associating actions with file types.

As we saw earlier, a file type can define multiple actions and can apply to files with different file extensions. For instance, the file type HTML Document is associated with two extensions, HTM and HTML. When you double-click a file with either of these extensions, it opens in Internet Explorer. When you right-click the same file, you see several custom choices on the shortcut menu.

To see where those menu choices come from, open the Folder Options dialog box, click the File Types tab, and select one of these extensions. The description at the bottom of the dialog box explains that files of this type open with Internet Explorer. Now, if you click the Advanced button to open the Edit File Type dialog box, you can see that four default actions are associated with this file type (see Figure 3.20).

Figure 3.20 When you add a new action to this list, it appears on the right-click shortcut menus for that file type.


One of the greatest of all Windows annoyances crops up when two applications arm-wrestle over which one gets the rights to a given file extension. Windows Media Player and RealJukebox, for example, regularly tussle over which program gets the right to play MP3 audio files and music CDs. In general, Windows defers to whichever program was most recently installed. Some programs (including RealJukebox) offer the option to reclaim file associations automatically when another program "hijacks" the file types it normally uses. If you can't find that option, the easiest choice is usually to reinstall the program you prefer. The setup process typically edits the Windows Registry and adjusts all file association properties.

Use the Edit File Type dialog box to perform any of the following tasks:

  • Change the name of a file type–This name is what appears in the list of file types; more importantly, it also appears in the File Type column when you switch to Details view in an Explorer window. Edit this text by typing over the contents of the text box.

  • Choose a different icon for the selected file type–Click the Change Icon button to do this.

  • Create a new action–Click New to begin building a new action from scratch.

  • Remove an action–Click Remove to delete an action completely. This option should be reserved for custom actions you created and no longer need.


    It's possible to completely eliminate a file type or an action associated with a file type. Generally, however, such a drastic step is not recommended. The settings for each file type take up a trivial amount of space in the Windows Registry, and removing a file type can cause installed programs to fail.

  • Edit an existing action– Click the Edit button to change the command associated with the selected action. Follow these steps:
    1. Select the file type you want to change and click the Edit button. The Edit File Type dialog box appears.

    2. Select an entry from the Actions list–the default action is in bold type–and click the Edit button. The dialog box shown in Figure 3.21 appears.

    3. Figure 3.21


      Note that some actions require dynamic data exchange (DDE), an extremely complex process that passes information between programs; if you see these options listed, exit this dialog box and don't attempt to edit the action by hand.

    4. Click the Browse button. In the dialog box that appears, find and select the executable (EXE) file for the program you want to use with the selected action; then click Open.

    5. The filename you selected now appears in the Application Used to Perform Action text box. Add any command-line switches or replaceable parameters, if necessary. Click OK to close the Editing Action dialog box and save your changes.

    6. Repeat steps 2—4 for other actions you want to change. When you finish, click OK to close the Edit File Type dialog box. Then, click OK again to close the Folder Options dialog box.


As a rule of thumb, it's always a good idea to enclose the entire program command in quotation marks when creating or editing an action. Also, consider adding the replaceable parameter "%1"(including the quotation marks) after the command. This parameter tells Windows to add the selected filename after the command, and the quotation marks ensure that any spaces in the filename will be interpreted properly.

Three options in this dialog box are worth noting:

  • Confirm Open After Download–As a security precaution, this option is on for most file types by default (it's off for MP3 files and other media types designed to play directly in a browser window or in Media Player). If you're certain that a particular file type is safe, you can clear this checkbox for a given file type, and it will automatically open in the associated application when you download it.

  • Set Default–Choose an action and click the Set Default button to make that action the one that executes when you double-click a file of that type. The previous default action still appears as a choice on right-click shortcut menus.

  • TIP

    You can use this option to protect yourself from some script-borne viruses. Normally, Windows defines files with the VBS, JS, and SHS extensions as scripts to be run when double-clicked. If you set the default action to Edit instead of Open, double-clicking a script icon opens the script in Notepad, so you can see what it does. If you determine it's okay to run, go back to the Explorer window, right-click the file, and choose Open from the shortcut menu.

  • Always Show Extension–Check this box to display the file's extension in all Explorer and folder windows. This setting is useful if you regularly change the extensions of certain types of documents (such as TXT documents, or RTF documents created by Office 97 and Office 2000) but don't want to clutter the Explorer window with other extensions.

Opening an Unrecognized File Type

When you double-click an icon whose extension isn't registered, Windows displays a dialog box similar to the one that appears when you right-click and use the Open With menu choice. Two crucial differences that distinguish this dialog box enable you to quickly create a new file type for the unrecognized extension:

  • This version of the Open With dialog box includes a text box at the top. Enter the name of the new file type there.

  • By default, the box labeled Always Use This Program to Open This Type of File is checked. Remove this checkmark if you don't want to create a new file type.

If you accidentally create a new file type from this dialog box, you easily can remove that file type. Open the Folder Options dialog box, click the File Types tab, select the newly created file type, and click the Remove button.


InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020