How to Add a Ribbon Command to Right-click Menu in Windows 10

Ribbon UI consists of a command bar with a series of tabs. Each tab contains a set of commands such as Cut, Copy, Paste, etc. Ribbon UI was first introduced in Office 2007. Then it was included in File Explorer in Windows 8 and Windows 10.

This article explains how to add any Ribbon command from File Explorer to the right-click menu for files or folders.

ribbon command in right-click menu
File Explorer Ribbon UI

The standard tabs in the File Explorer Ribbon are File, Home, Share, and View — each containing a set of commands. Besides these standard tabs, additional contextual tab(s) appears dynamically, based on the type of file you select in a folder. In Windows 10, the registry entries for each Ribbon command are stored under the “CommandStore” registry key.

To access the CommandStore key, start the Registry Editor (regedit.exe) and go to the following branch:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell

See also: Using RegJump to Quickly Jump to a Registry Path

ribbon command in right-click menu

Each subkey corresponds to a Ribbon command in File Explorer. For example, the key “Windows.PermanentDelete” powers the “Permanently Delete” command, which is a sub-command under “Delete” in the Ribbon UI.

You can add this item or any other Ribbon command to the right-click menu by tweaking the registry.

Example 1: Add “Permanently Delete” command to right-click menu

To add “Permanently Delete” option to the context menu for files, you need to copy the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Windows.PermanentDelete

to the following key:

HKEY_CLASSES_ROOT\*\shell\Windows.PermanentDelete

This can be done by exporting the 1st key to a .REG file (via File – Export command in the Registry Editor). Then, edit the file with Notepad and change the following path:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Windows.PermanentDelete

to



HKEY_CLASSES_ROOT\*\shell\Windows.PermanentDelete

Save the REG file and double-click to run it. This adds the “Permanently Delete” option to the right-click menu for all files.

ribbon command in right-click menu

Quick Tip: You can set this key only on a per-file type basis or for all file types, folders, or both files & folders. However, it makes perfect sense to add the “Delete Permanently” command only for (all) files. Adding it to Folders will work, but there is always a risk of accidental deletion of an entire folder — but it’s your call.

To add the Ribbon command for folders, you’d copy it to the following branch:

HKEY_CLASSES_ROOT\Directory\shell

To implement it for both files and folders, add it here:

HKEY_CLASSES_ROOT\AllFileSystemObjects\shell

Example 2: Add “Copy as Path” to the right-click menu

By bringing the “Copy as Path” ribbon command to the right-click menu, you can make the “Copy as Path” right-click option appear by default without having to press the SHIFT key when right-clicking.

Note that the standard “Copy as Path” extended menu command would still show up if using the SHIFT key. So when using SHIFT right-click on a file, there will essentially be two “Copy as Path” commands.

For more information, check out the following article: Show “Copy as Path” Always in Right-Click Menu Without Shift Key.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

2 thoughts on “How to Add a Ribbon Command to Right-click Menu in Windows 10”

  1. Is there any way to change the context menu display name when adding a ribbon command? I tried add MUIVerb and setting it to something custom and no dice. Also tried changing the default value. Also no dice. Any ideas?

    Reply

Leave a Reply