Skip navigation

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

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_ROOT\batfile\shell\edit\command
  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 Files\Microsoft Office\Office\winword.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%\System32\NOTEPAD.EXE %1


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish