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 the 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.
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 is stored under the “CommandStore” registry key.
To access the CommandStore key, start the Registry Editor (regedit.exe) and go to the following branch:
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.
By tweaking the registry, you can add this item or any other Ribbon command to the right click menu.
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:
to the following key:
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:
After editing, the file should look like this:
Save the REG file, and double-click to run it.
This adds the “Permanently Delete” option to the right-click menu for all files.
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:
To implement it for both files and folders, add it here:
Example 2: Add “Copy as Path” to 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.
About the author
Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.