How can I change the default editor used for editing batch files?

John Savill

March 4, 1999

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. By default if you right click on a batch file and select Edit then the batch file will be opened in Notepad, however the application used can be changed as follows:

  1. Start the registry editor (regedit.exe)

  2. Move to HKEY_CLASSES_ROOTbatfileshelleditcommand

  3. Double click on default

  4. Change the value to the editor you want to use, e.g. for word change it to
    D:Program FilesMicrosoft OfficeOfficewinword.exe %1

  5. Once completed click OK and close the registry editor

There is no need to reboot, the change take immediate affect. To reset back to notepad change the entry to

%SystemRoot%System32NOTEPAD.EXE %1

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like