Microsoft

Quick Tip: Add Open with Notepad to the right-click menu

Jack Wallen shows you how you can apply a simple Windows registry hack that will add a new right-click menu entry for opening files in Notepad.

I frequently open files with the Notepad applet that comes with Microsoft Windows 7. Some files simply do not need to be opened with a word processor. But going through the motions of starting Notepad and then opening the file can be tiresome (at least when you are doing this all day).

You can apply a simple registry hack that will add a new right-click menu entry for opening files in Notepad. I assume having quick access to Notepad is just the ticket for those frequent users of the tool. With that in mind, let's add the entry.

Stay on top of the latest Microsoft Windows tips and tricks with TechRepublic's Windows Desktop newsletter, delivered every Monday and Thursday.

Standard registry warnings

The Windows Registry file is an integral part of the operating system. A corrupted Registry could prevent your system from booting, so before you make any edits, back up your Registry file.

Adding the Notepad entry

Now that the Registry is backed up, it's time to tweak the Windows Registry file to create a Notepad entry in the right-click menu. Here's how this is done.

Step 1: Navigate to the correct key

Click the Start Button and type regedit in the search box and then click the regedit.exe entry. With the registry open, navigate to the following key:

HKEY_CLASSES_ROOT\*\shell

Step 2: Create the new keys

Right-click on the "shell" entry in the left navigation area and select New | Key and name the new key "Open With Notepad."

Now right-click the Open With Notepad key and select New | Key and name this new key "command" (Figure A).

Figure A

Create the Open With Notepad key.

Click on the newly created command key and, in the right pane, double-click the "default" entry. When the new window opens, add the following as the Value Data string:

notepad.exe %1

Click OK and close the registry editor.

Now it's time to test the new feature. Open Windows Explorer and navigate to a location that holds files that could be opened with Notepad. Right-click on the file, and the new menu entry for Open With Notepad will be available (Figure B).

Figure B

You can actually name this what you want when you create the registry key earlier.

Final thoughts

Naturally this is going to really apply only to those users who frequently open files in Notepad. But this also illustrates how you can easily create other right-click menu entries for other file types. Just create as many keys as you need (in the same way you created the key for Notepad). This addition to the right-click menu in Explorer (and any other you create like it) will make your day-to-day life in Windows much more efficient.

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

19 comments
mikelane
mikelane

Another 'Send to' I use is Notepad++. I consider the Notepad++ manatory if you do any kind of programming in any language. It is free (GNU). I use it along side Dreamweaver or other programming IDE's so I can copy data back and forth. It recognises different code syntax in different programming langauges and appropriately highlights key words in different colors. It also allows opening different files in differernt tabbed windows. It remembers and opens up all the files you had open the previous time. Very good for working on large projects where you are working on many/different files/typs. PHP files, HTML, text, Java, vb, C, etc. You can learn more and download for free at: http://notepad-plus-plus.org/. As far as adding programs to the "send to' menu, In Windows XP, all I had to do is add a shortcut for the application to the "Send to" folder. In Vista, I get "Access is denied". When I try to use the run command: Shell:sendto :, I get a message ...not found in Vista. Also, I remember it was either Windows 98 or XP Microsoft power toys had a "Send to" feature where you could add programs to the Send to menu.

laman
laman

To get to the SendTo folder, you???ll need to open up an Explorer window, and then paste in the following to the address bar. %APPDATA%\Microsoft\Windows\SendTo %APPDATA% is an environment variable that actually maps to something like C:\users\\AppData\Roaming. You should now see a bunch of shortcuts there. Let???s say you wanted to add an item to the Send To menu to open files in Notepad. You could just drag a shortcut to Notepad into this folder, or create a new shortcut. Now you can see the new Notepad item in the menu. You can actually put in any other shortcuts, or even a folder.

tavent
tavent

the obvious question is that since this is relatively simple WHY MICROSOFT DID NOT ALREADY DO IT and allow us to customize it without risking system stability by reg edits and without requiring system admin rights.

PCH350
PCH350

I use: notepad.exe "%1". I also usually specify the full path the program in shortcuts. In this case it is C:\Windows\notepad.exe. The path may change if C:\Windows is not the %WINDIR% location.

alpy01
alpy01

1. Windows Explorer --> add a link to SendTo folder into SendTo folder 2. Windows menu --> on the link to any application (e.g. Notepad) --> right click --> SendTo --> SendTo 3. On any file --> right click --> SendTo --> Notepad

larrymcg
larrymcg

Rather than editing the registry, I'd suggest using the free (for personal use) OpenExpert from BaxBex.com OpenExpert provides a bunch of other useful facilities for opening applications and assigning extensions to apps and.....

C-3PO
C-3PO

Jack is writing on windows? Could it be that Linux is slipping? At least that explains why he chose to do this with a registry hack LOL.... welcome to the windows world Jack - you don't have to hack your way through it... :)

dtonchev
dtonchev

I'm using sendto as right click: Just add shortcut to notepad, wordpad or any program to (hidden) folder: C:\Documents and Settings\%user%\SendTo\ And you have it similar way

Mr_Tech
Mr_Tech

First, thank you for taking your time to explain this tip to all of us Jack. This is a great alternative. I have a question. How would you create a custom sub menu and put all of your custom commands in there? For example, "My Custom Commands->Open With Notepad, Open with Command Prompt" etc pretty much like "Send To" but instead you have a custom one? I tried the logical by creating a separate folder/registry key and putting all new "Key Name->command" in there but I don't get a sub menu.

aberglund
aberglund

No need to mess in the Registry for this. Just add a shortcut to Notepad in the "Send to" folder in your Start menu. I've done that on my Windows systems for years.

Mark W. Kaelin
Mark W. Kaelin

What other applications would you add an Open With for on the right-click menu?

Glenn_Jonas
Glenn_Jonas

First thing I do after installing Windows is add a shortcut to Wordpad in EVERY SendTo folder in the Users (or Documents and Settings) folder. Once you have added it to SendTo in the Default (or Default User) folder, it will automatically appear in every new profile created on that machine. Wordpad can open MUCH larger text files. And can open most binary files, which may help determine its purpose (i.e. what app installed it) by finding embedded ASCII text characters.

martin.english
martin.english

I can't save stuff in either of \users\SendTo or \users\userid\SendTo, but I can run regedit. Go figure. I prefer editing the \release-specific\user\SendTo folders

wxyzz
wxyzz

Which is easy to do and no "registry hacking" required: (1) [WindowKey] + [R] : open the execute box (2) Shell:sendto : open the sendto folder

vegesm
vegesm

I use UltraEdit which automatically adds an entry like this to the context menu. It's better than notepad because it has a builtin hexeditor. It's much more convenient when i have to edit non ascii file.

kactuskooler
kactuskooler

Do you have a step by step way to do this? I don't want to guess. LOL! Thanks in advance. KK

GreyTech
GreyTech

Using the [WindowKey] + [R] : Notepad or Wordpad ... is also a quick way to open them for a new document, much quicker than driving the mouse through menus.