Windows Registry Hack to “Edit with Notepad”

Over the last 20 years I have acquired a lot of tools to help me with things. One that I add to every machine I can is a Windows Registry hack that allows me to open/edit any file in Notepad with a simple right-mouse click.

This is useful when you want to look at a file without have to associate a program to it or use the default program to load it into. For example, say that I have an HTML file. I want to make a quick change. The default program is Internet Explorer. But, that only allows me to view the rendered HTML not edit. The “Open With >” right-mouse click menu option point to a large IDE program like Eclipse or Vim which might take several moments to load. With this registry item added I can just right-mouse click on the file and select “Edit with Notepad” and quickly make the change.

It also comes in handy when verifying the file you are looking has the correct tag extension so that it is associated to the right default program. Some times a user may use .PNG at the end of a file. But, when you use Notepad to review the header information in the file it may list it as a .MP3 file. With a simple right-click you can verify the type of file it really is.

This registry hack seems to work on must Windows Workstations and server. Simply open a new text file, Copy the code listed below and paste it into a file called edit_with_notepad.reg. Once saved just double-click on the file and it will add it to the Windows Registry. Then right-click any file to view/edit it in Notepad.

REGEDIT4

[HKEY_CLASSES_ROOT\*\Shell\Edit_with_Notepad]
@="Edit &with Notepad"

[HKEY_CLASSES_ROOT\*\Shell\Edit_with_Notepad\command]
@="notepad.exe %1"