HOW TO: Change the Default Action for a File Type in Windows XP

Article translations Article translations
Article ID: 320036 - View products that this article applies to.
This article was previously published under Q320036
Expand all | Collapse all

On This Page


This step-by-step article describes how to change the default action for a file type in Windows XP.

The default action for a file type is the action that occurs when you double-click the file. The file type is determined by the file's extension, and all files that have the same extension have the same default action. The most common default action for document files is Open, which launches the associated program and displays the file in the program's window.

NOTE: To determine the default action of a file type, right-click the file listing. The command that is shown in boldface on the shortcut menu is the default action.

For some file types, the default action may be undesirable, or even dangerous. For example, a registry file (.reg) has the default action Merge, which sends the data in the file to the registry, and replaces existing registry values or adds to existing registry values. The Edit command is available on the shortcut menu for a .reg file, but it is not the default action. If you want the default action for a .reg file to be Edit, and require that users right-click to view the shortcut menu and deliberately click Merge, you can change the default action for all .reg files. Similarly, you may prefer to have the default action for a batch file (.bat) changed to Edit instead of Open. Double-clicking the file will not run the commands in the file, and if users want to run the file, they can use the Open command on the shortcut menu.

Change the Default Action

To change the default action for a file type:
  1. Click Start, click Control Panel, click Appearance and Themes, and then click Folder Options to open the Folder Options dialog box.
  2. Click the File Types tab.
  3. In the File Types list, click the file extension you want to modify.
  4. Click the Advanced button to open the Edit File Type dialog box.
  5. Click the command that you want to make the default command, and then click Set Default.
  6. Click OK, then click Close.


Article ID: 320036 - Last Review: October 26, 2002 - Revision: 1.1
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Home Edition
kbenv kbhowto kbhowtomaster KB320036

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from