Subscribe to our RSS feed     Get daily updates in your mail box

Change the default editor for BAT files

When you right-click on a .BAT file and click Edit, by default Notepad opens the file. Have a Notepad replacement tool installed in your system, and want to set it as the default editor for batch files?

As the File Types tab (Control Panel - Folder Options - File Types) in Windows XP does not list .BAT file type by default, you need to edit the registry to change the Edit verb’s default action. And remember, Windows Vista does not even have the File Types tab.

SET THE DEFAULT EDITOR FOR BATCH FILES

1. Click Start, Run and type regedit.exe

2. Navigate to the following branch:

HKEY_CLASSES_ROOT \ batfile \ shell \ edit \ command

3. Double-click the (default) value in the right-side.

4. By default it points to Notepad.exe. Simply replace the existing data with the complete path of your Notepad replacement tool.

5. Don’t forget to include the "%1" at the end (with quotes, as in the above figure). The syntax is:

"filename" (space) "%1"

6. Exit the Registry Editor.

When you right-click on a MS-DOS batch file and choose Edit, your preferred editor will now open the batch file.

RESTORE DEFAULTS

To restore the default values back (Notepad as the default editor), use the above steps and set "C:\Windows\Notepad.exe" "%1" as the (default) value. Alternately, you can use file bat-edit-notepad.reg to reset it to Notepad.

RELATED POSTS


Bookmark this Page!BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon | Wink |
If you enjoyed this post, make sure you subscribe to our RSS feed! We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems!
Prefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

Post a Response