Add ‘Open with Notepad’ to Context Menu
When I come across files with unknown extension, I prefer to open it with Notepad. The same when it comes to files like PHP, HTML, CSS and the likes. Adding a context menu option, to open with notepad, helps you quickly open up files without having to go through the long ‘Open with’ way, obviously saving your time. Though this is a common registry trick, for sure you should have read about this in many sites, if you haven’t heard, read below. You should also be knowing to deal with Registry Editor, if not, you can download the registry key directly at the end of this post.
The end result will be something similar to the image below
Manual Registry Hack
Now, lets open the Registry Editor (Start >> Run >> Regedit). Point to
HKEY_CLASSES_ROOT\*\shell\
Right-click on shell and a new key (New >> Key). Name it “Open with Notepad” or whatever you like. The name that you give here is what that shows up in the context menu. Now, right-click the key you created now and create a new key naming it ‘command’. The command key should now have a string named ‘(Default)’ with no value. Double-click ‘(Default)’ and give it a value – notepad %1. So, HKEY_CLASSES_ROOT\*\shell\Open with Notepad\command should have a string with a value ‘notepad %1’ (without quotes).
The change is immediate. Right-click a file and you should notice an option you created now, in it’s context menu.
Removal
To remove, simply delete the ‘Open with Notepad’ key. The change is immediate, again.
Download Registry Key
Download the archive, unpack and run the file “open-with-notepad.reg”. To remove, run the other file named “remove-open-with-notepad.reg”.
Open With Notepad Registry Hack (594)Hope the article was useful. Leave a comment if you end up with a problem. Have queries related to Computers, Windows and similar topics? Leave us a message at techqueries [at] josephcs [dot] com or use the contact form.
I downloaded and saved it to desktop. When I double-click open-with-notepad.reg, I get the following error
C:\Documents and Settings\…\..\open-with-notepad.reg is not a valid win32 application
It seems you have some problem with file association. [dot]reg file in your PC is not associated with the Registry Editor (regedit.exe). To fix this, if you are on Windows XP (or prior versions), open Windows Explorer, click the Tools menu>>Folder Options. Click the ‘File Type’ tab, point REG file type and make sure it is made to open with Registry Editor. If not, click ‘Change’ and select Regedit.EXE by browsing to your Windows Directory (eg: C:\windows\). Try opening the registry file again and it should work. For Windows Vista, it’s in Control Panel >> Programs & Features.
Fixed,
works well,
Thank you.
That’s good. You are always welcome :)