I think that the title says it all.
I use the portable version of Notepad++ and would like to have a menu on the Windows 10 right click context menu which allows me to edit files with it.
46 Answers
This is explained in How to Add Any Application to the Windows Desktop Right-Click Menu article which says:
The first thing you’ll want to do is open up regedit.exe through the Start Menu search or run box, and then browse down to the following key:
HKEY_CLASSES_ROOT\Directory\Background\shellThe screen should look similar to this one if you are in the right place.
Next, you’ll want to create a new key underneath the shell key, the name of which is exactly what is going to show up on the desktop menu. Right-click on the “shell” key, and then choose New \ Key from the menu.
Give the new key the name that you want to show up on the desktop context menu. For this example we’ll be using Open with Notepad++.
Next you’ll need to create the command key that will actually hold the command used to launch the application. Right-click on the new Notepad++ key, and then choose New \ Key from the menu.
Give this key the name “command” in lowercase.
To complete this step you’ll need the full path to the application that you want to launch. You can use Shift + Right-Click to get the Copy as Path menu item to find this more quickly.
Now click on “command” on the left side, and then double-click on the (Default) key in the right side to edit the string value.
Paste in the full path to the executable that you got from the “Copy as Path” step above, or you can put in the full path yourself if you’d like.
And right-clicking on the desktop will produce the new menu item… naturally, using this menu item should launch Notepad++.
You can add as many applications to the desktop context menu as you’d like, just repeat the steps again with a new menu item name.
It is basically the same for other Windows versions too.
2Corrected reg script (see above):
- Icon
- Spaces in name (for default Notepad++ filenames with spaces)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Edit with Notepad++]
"Icon"="F:\\Program Files\\Notepad++\\notepad++.exe"
[HKEY_CLASSES_ROOT\*\shell\Edit with Notepad++\command]
@="\"F:\\Program Files\\Notepad++\\notepad++.exe\" \"%1\"" 1 I've had a much simpler way I've used for ages. Save this as a file called Notepad++.right-click.reg:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Edit with Notepad++]
"Icon"=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\ 00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\ 4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\ 00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,00,00
[HKEY_CLASSES_ROOT\*\shell\Edit with Notepad++\command]
@="C:\\Program Files (x86)\\Notepad++\\notepad++.exe %1"Then just double-click it and choose Yes!
Edit
Amend the second entry to point to the Notepad++ executable as pointed out by @Sun, especially important if you install the 64 bit version.
Instructions on how to do this here:
In short, download the dll, register and voila!
2If the registry tweaking suggestion from Saimak is not something you want to try, adding a shortcut to the EXE file to the "Send To" list will allow you to right click any item and get it open in Notepad++.
The easiest way to access the "Send To" folder within which to create the shortcut is to enter shell:sendto in the Run box and press enter.
If you are a user without administrator rights (e.g. you want to enable the context menu entry for Notepad++ on your business laptop), you can enable the Context menu entry "Edit with Notepad++..." by creating the relevant keys and entries in the Windows Registry at HKEY_CURRENT_USER\SOFTWARE\Classes instead of HKEY_CLASSES_ROOT.
The normal process used by the official Notepad++ installer by invoking the regsvr32 utility / invoking the associated DLL procedures will fail because of missing permission to write to the HKEY_CLASS_ROOT hive in the Windows Registry database due to missing privileges of a non-administrator user.
If you are interested, you can read the relevant code for the Notepad++ Context Menu / Shell Extension registration at
to find out / "reverse engineer" the relevant changes necessary in the Windows Registry and then do it on your own by mapping/replacing all references from HKEY_CLASSES_ROOT to HKEY_CURRENT_USER\SOFTWARE\Classes.
An appropriate Registry file to import via the Registry Editor that re-implements the same functionality but for non-elevated users may contain the following:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}]
@="Notepad++ Shell Extension"
[HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}\InprocServer32]
@="C:\\Users\\...\\AppData\\Local\\Programs\\Notepad++\\NppShell_06.dll"
"ThreadingModel"="Apartment"
[HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}\Settings]
"Title"="Edit with &Notepad++"
"Path"="C:\\Users\\...\\AppData\\Local\\Programs\\Notepad++\\notepad++.exe"
"Custom"=""
"ShowIcon"=dword:00000001
"Dynamic"=dword:00000019
"MaxText"=dword:00000001
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shellex\ContextMenuHandlers\ANotepad++64]
@="{B298D29A-A6ED-11DE-BA8C-A68E55D89593}"Please note that
- You need to change the paths of Notepad++ to the place where you placed the Notepad++ program files (in the example listing above, I extracted the program files from the installer by using 7-ZIP and placed them under
%localappdata%\Programswith its own folder and used its absolute path). You can choose whatever location suits you as long as you have read/write access to it and as long as you can make sure that it will not be accidently deleted (and thus leaving dead references in the Windows Registry). - You need to extract the Shell extension DLL file named
NppShell_06.dll(number may iterate in the future) from the installer (it is not supplied with the official portable ZIP archive / you can use 7-ZIP to extract the files from the installer), place it at an appropriate location and change the path to the DLL in the Windows Registry entry accordingly (see listing). In the listing above I kept the Shell Extension DLL at the same place where the other Notepad++ program files rest. - You can adjust the entries
Title,Path,Custom,ShowIcon,DynamicandMaxTextunder theSettingskeys to your liking (the entries should be rather self-explaining and are normally changed by using the Settings UI that is triggered in the case of normal installation). - You may need to restart Windows Explorer to make the changes take effect.
Thanks to the participants in the thread at that served as a boilerplate!
Funny note aside: Windows (Explorer) uses the alphabetic order of key names under ContextMenuHandlers to determine the position in the Context menu, thus the name ANotepad in order to ensure its entry is at the top of Context menu items.
For more details about Shell extensions and how to register them, see the appropriate documentation at .