How-To Geek

Change the Default Editor for Batch Files in Vista

Have you ever noticed that the File Types option was completely removed from Vista, and there’s no built-in way to change the editor for many file types? Sure, you can change the default application used to open the file, but you can’t change what happens when you right-click / edit.

You can either directly hack the registry, or there’s a freeware utility that adds the functionality back… we’ll show you how to do both methods.


Using the Registry Hack Method

Open up regedit.exe through the start menu search or run box, and then browse down to the following key:



Double-click on the (Default) key to open it up, and then replace the path for notepad with the full path for your preferred editor, making sure to leave a space and then the %1 at the end (which inserts the current file name into the path)

Using the Easy Method

Using the freeware and open-source Types utility, you can easily change file types… just find the “bat” extension in the list, or filter by the “batfile” class, then open up the properties. You can easily replace the editor by just using the yellow icon next to the drop-down and choosing your preferred editor.


Of course, you can use this application to change the default editor for any file type, not just batch files.

Download Types from

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 07/27/08

Comments (8)

  1. abhishek

    I liked the application, it will come handy some times, thanks for sharing.

  2. Jules Bloomenthal

    types.exe – great idea! (and how foolish of Vista not to provide the functionality). BUT! It dies on my machine. (Vista error simply says “types has stopped working”).
    Any suggestions?

  3. Mike

    Just goes to show that Microsoft didn’t change anything on the backend. This hint works exactly the same on XP. Thanks for the info…

  4. r0ck3t3r

    Very nice article, but Scite did not like being started this way. I’ll have to play around with it a bit more.

  5. George

    Worked with Perl as well. Thanks!

  6. Dave

    Didn’t work with image files, the .jpg doesn’t have an Edit in the list so it will always open in MSPAINT.. I also checked the registry with no luck, can someone help explain how to change the default editor when you right click on a .jpg file for example?

  7. sc

    Didn’t work for me. UI acted buggy & disabled fields when I tried to make changes. Was able to add a new action, but then couldn’t edit it. Can’t delete it manually from my registry either. F- Would not use again.

  8. Norman

    I have found that the open source program: Notepad++ is way better than Notepad, for reasons of formatting, word wrap, open and closed brackets for Java scripts, XML files and HTML files, a lot easier to read the goings on in the coding in Notepad++.(But then again i have a diploma in java programming). What may seem simple and straight forward to me, may not make sense to others.

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!