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:
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
- Changing the View Source editor
- Change the default icon for unknown file types in Windows Vista
- Change Vista Start menu Power button action to Shut Down the computer
- VBScript Files Open With Notepad
- Transfer Registry Editor favorites to another computer
Bookmark this Page!BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon | Wink |


If you enjoyed this post, make sure you
Prefer an E-mail subscription?