How to Add or Remove Options from Context Menus in Windows
In this tutorial, we’ll tell you how to add new entries/options in context menus (right-click menu) or remove existing entries from context menus in Windows OS. The method will work for all Windows versions.
METHOD 1: Adding New Entry in Context Menu
STEP 1:
Type regedit in RUN dialog box or Start searchbox and press Enter. It’ll open Registry Editor, now go to following keys:
Advertisement
HKEY_CLASSES_ROOT\* (for adding an option in All files context menu)
HKEY_CLASSES_ROOT\Directory (for adding an option in folders context menu only)
HKEY_CLASSES_ROOT\Drive (for adding an option in Drives context menu only)
HKEY_CLASSES_ROOT\Unknown (for adding an option in unknown files context menu)
STEP 2:
Now under the above mentioned keys, you’ll find “Shell” and “Shellex” keys. Both keys contain various entries, which are displayed when you right-click on a file, folder or drive. We’ll use “Shell” key in this tutorial:
- Right-click on the “Shell” key and select “New -> Key“.
- Give it any name. Suppose we gave it name “vishal”.
- Now in right-side pane, double-click on “Default” String value and set its value to the Label which you want to display in context menu. Like if you want to add “Winamp” in context menu, then you can give it name “Open with Winamp” or similar.
- Now create another key under this newly created key “vishal” with the name “command” and in right-side pane set value of “Default” to the path of application. For ex, for winamp you can set its value “%programfiles%\Winamp\winamp.exe”.
That’s it. Now you’ll get the new option in context menu.
A Few Important Points to Remember:
1. If you add just the path in “Command“, then it’ll open the application but if you append “%1” (without quotes) in the path, then it’ll open the selected file with the application. So in case of setting the value to “%programfiles%\Winamp\winamp.exe”, set it “%programfiles%\Winamp\winamp.exe %1” and now it’ll open the file in winamp.
Advertisement
2. Step 3 can be omitted and you can assign the application name directly to the new key. i.e., either set “Default” String value to the name of application or directly set the key name to application name. e.g. instead of setting the key name to “vishal”, you can directly set its name to “Winamp”, in this case leave the “Default” as it is.
3. With the help of this tutorial, you can add application shortcuts in any filetype context menu. e.g., if you like to play with “*.txt” file context menu, then go to:
HKEY_CLASSES_ROOT\txtfile
so you can follow this tutorial for any filetype.
You can check out following exclusive article which contains links of several useful tutorials which will help you in adding options in files, folders, drives and Desktop context menus:
[AIO] Ultimate Tutorial to Customize Desktop Context Menu in Windows
METHOD 2: Removing Entry from Context Menu
The same above mentioned method will apply for removing entries from context menu. You just need to go to the keys mentioned in STEP 1 and then under “Shell” or “ShellexContextMenuHandlers” keys, you’ll find sub-keys related to the option which you want to remove from context menu. Delete that sub-key and it’ll immediately remove the associated option from the context menu.
Also Check:
How to Add or Remove Items from “New” Context Menu in Windows
[AIO] Ultimate Tutorial to Customize My Computer Context Menu in Windows
Hi, can you tell me how can i customize the desktop context menu to show “New Folder” option right away at the top, instead of going through the “New” option?
^^ You can edit shell32.dll file to modify appearance of context menu:
https://www.askvg.com/tutorial-all-about-resource-hacker-in-a-brief-tutorial/
https://www.askvg.com/list-of-a-few-locations-in-windows-xp-system-files-to-be-hacked-using-resource-hacker/
https://www.askvg.com/list-of-files-to-be-hacked-using-resource-hacker/
https://www.askvg.com/list-of-vista-system-files-to-be-hacked-using-resource-hacker/
https://www.askvg.com/list-of-windows-7-system-files-to-be-hacked-using-resource-hacker/
How can i open the shell32.dll? Can you indicate a program?
^^ Resource Hacker:
https://www.askvg.com/tutorial-all-about-resource-hacker-in-a-brief-tutorial/
Is it possible to add icon in context menu for shellex entry like 7-zip, which don’t have icon? Or is it possible to add icons for shellex entries in context menu at all?
^^ Please check following:
https://www.askvg.com/how-to-add-program-shortcuts-and-other-useful-shortcuts-with-icons-in-windows-7-desktop-context-menu/
I tried to remove Edit, Print and Send To entries but there were no such keys to remove them.
^^ You can do the reverse of following tutorial to get rid of Send to menu:
https://www.askvg.com/how-to-restore-missing-send-to-menuitem-in-file-and-folder-context-menus/
hi, I want add shortcut of 7zip into submenu of New in the contest menu. I have read article about creating new key in regedit, but I don’t think it includes my case. you can explain how I can add 7zip in NEW of CONTEST MENU BY RIGHT-CLICKING OF MOUSE? I’m interesting to create new archive in a folder and to add file in an existing archive.
I add link to image of my registry and the view of my contest menu as it is now
imageshack.com/a/img909/5581/fnosrn.jpg
(I’m from Italy, so image of contest menu is in italian..so NUOVO = NEW)
Hello, VG.
When one clicks the Recycle Bin icon on the Desktop a context menu opens with the line: ‘Create shortcut’. Under it there is “Rename”.
But, they are not necessary. Is it possible to remove them?
Please, help.
^^ No. Those are system wide options in context menu. You can edit system files to permanently remove those options but it’ll remove those options from all files/folders.
Thank you sooo much, got rid of “deskpdfcreate” !
Hi VG
Can you tell me how to edit system files to permanently remove basic folder context menu options (or just hide them) such as “Delete”. I can’t find answer anywhere. All I know it is somehow connected to “command bar items ids”. For example, “Delete” option has id 478. Please help!
Best Regards
^^ Of course, you can do. You’ll need to edit system files using Resource Hacker. Check following topic for more idea:
https://www.askvg.com/ultimate-collection-of-best-resource-hacker-tutorials-to-customize-windows-look-n-feel/
I tried this to set command as “..\MyScript.bat” %1. It didn’t work. However, it works with the full pathname:
“C:\FullPath\MyScript.bat” %1
I need the location of the script to be on the upper directory, though. Any idea on how to solve this? Thanks.
Tercix, try first to add to system environment variable PATH path to MyScript.bat (only path!). Then just use MyScript.bat “%1”
System: Windows XP SP3
I have added some .dll extension to the right-click context menu. Is there any way I can make icons appear beside those that do not show icons automatically?
Thanks a bunch.
Hi.
I would be most interested to know if you have any advice concerning modifying the InternetShortcut shell key in Windows 7 so that an .url file can be opened with Chrome (that is, with IE remaining as the default browser). This was quite easy in XP, using File Types (absent in Win7). In Win7 TrustedInstaller must be replaced by, say, the user’s account. You have detail on this site on how to do this. Thank you. However, should permissions be changed not only for shell but also higher up (eg SYSTEM by default owns the InternetShortcut key), or elsewhere? If so, which keys? Finally, should they all be returned to the default owner after the modification for Chrome?
The issue of Chrome maybe not opening .url files properly is dealt with within Chrome by an extension (“.URL Handler”).
But doing the right registry fix in Win7 is quite tricky. It is a question of knowing which permissions to change and whether or not to change them back, after the edit.
Any ideas would be read with great interest.
William,
Ireland.
how can i get rid of QUICK TIME PLAYER or VLC in my open with menu?
I tried these steps, but it didn’t work.
regedit
HKEY C U
SOFTWARE\MICROSOFT\WINDOWS\CURRENT VERSION\EXPLORER\FILEEXTS\
and found mp4 an then deleted QUICKTIMEPLAYER. but it didnt help.
HELP ME
Thank you VG for your articles.
I want to create a “new-text-document” on the primary Context Menu (and NOT in the “New” sub menu.)
Will your tutorial do what I would like -OR- is it adding a new item to Context Menu –> New … sub-menu ?
The primary context-menu is full of duplications already available on WinExplorer.
I am trying to trim the Context menu down to bare bones
Thank you 🙂
Exactly what I needed! Works perfectly, especially with the “%1” suffix.
Thank you very much and keep up the good work!
I tried this method for .CBL extension which pointed to CBL_auto_run, which is where I added the keys “RemCmpl” and “command” which should open my.exe. I am trying to get my.exe to run with the filename selected as input so I appended %1.
This is not showing up when I right-click on a file named abc.cbl?????
Is there a way to add a modern metro app to the ‘SendTo’ menu? I’m trying to add the ‘Mail’ app. The existing Mail Recipient is broken under Windows 10 and won’t launch the mail app.
Great article VG,
Do you know what file to change so that clicking “Rename” selects the filename _and_ extension in w7+, in the context menu that appears when a filename has been right clicked on? I’d like to be able to control whether the ext is highlighted or not.
Is this in Shell32.dll? If it’s a dll does it matter which one is modified on 32 or 64 bit systems?
Thanks,
Mike
^^ It can’t be done by modifying any file. Its by design and hardcoded into the shell.