1

I'm interested in adding custom commands when right clicking on any file in Windows Explorer.

On Windows 10 I was able to do that through regedit by adding the necessary entries to

Computer\HKEY_CLASSES_ROOT\*\shell\

However, with the latest right click menu on Windows 11 such updated entries fall under Show more options menu. While there are ways to remove the new right click menu altogether, I do not want to do that and would like to stick with the latest variant. In other words, I like the new smaller menus, but would like to add some custom commands.

Can this be done through regedit? For example, I've tried searching the registry for Open in Windows Terminal, which is an option when right clicking any folder, but that does not result in anything.

1

3 Answers 3

2

I haven't found the correct answer yet, and it seems that it isn't that simple as before. Accepting this until a better answer comes up.

However, for anyone looking for even a "hack-y" solution, there's one workaround based on this comment.

The workaround is by adding these keys:

[HKEY_CLASSES_ROOT\*\shell\pintohome]
"MUIVerb"="<Name of the command>"

[HKEY_CLASSES_ROOT\*\shell\pintohome\command]
(Default)="<command>" "%1"

The downside is that, as far as I understand, this overwrites an existing whitelisted ID in the FileExplorerExtensions.dll, hence the pre-set icon. It would be useful to dig through the dll and extract other rarely used ID's instead of pintohome and update this answer. In my case, I'm currently using pintohome and unpinfromhome.

Note: This overrides and disables the command Pin to Quick Access.

2

In addition your answer:

The FileExplorerExtensions.dll thought to be inside the Windows TrustedInstaller folder C:\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy (source).

However in the latest builds of Windows 11 (discovered on 22000.613), FileExplorerExtensions is a folder, not a DLL file.

Inside the folder is located the Assets and underneath that the images directory which contains the icons of all these whitelisted shell extensions for each contrast mode/theme (normally you use standard).

So you can list the extension names as well as their icons (SVG format, search for windows.), but also edit them with Inkscape! ; ) .

Overall, this would be a great hack for adding custom contexts on the Windows 11 menu (not more options), for pretty much everything. But the problem is that you come across most of the whitelisted icons often so you don't want to edit them and also not all the windows. icons are whitelisted (but you can guess which are from the list), so the options are very limited. I ended up using and overwriting the unpinfromhome shell extension, as I believe it's the most uncommon.

Further than that, this hack is for adding context options to filetype. If someone wants to put a custom context menu, the same won't work in the responsible registry hive HKEY_CLASSES_ROOT\Directory\Background\shell. The context menu will be created but in the old menu (more options). At least custom context options there are easily created and you can specify a custom icon in the Icon value.

0

Adding custom commands on the windows 11 right click menu ... Can this be done through regedit? For example, I've tried searching the registry for Open in Windows Terminal, which is an option when right clicking any folder, but that does not result in anything.

Natively in Windows 11 (both Build 22000.556 Production and 22000.588 Insider), this is not possible.

The context method is now very different in Windows 11 as has been note several places and not adaptable to changes.

Registry fixes for this are either not available or do not work well. I do not recommend that approach.

For the very common contexts (copy / paste), the current context method works very well. Copy, then for Paste a new Paste icon shows up on the bottom of the Window (normally).

It is just a very new way of doing Context, but I am using it and it works very well.

"Show more options" show additional contexts. "More Options" show numerous more items to choose from.

The “old” Windows 10 methods are not coming back so far as I can see at this point. This comment comes from reading about Windows 11, using it for 9 months, and now with 2 Production machines.

There are some new shell Start Menus that might help, but I looked at some of these and decided instead to adapt. I am not unduly hampered. I also get concerned with side effects and breakage as Microsoft updates Windows.

With enough Feedback (Feedback Hub) there may be some kind of change but I have not seen anything for this in the Insider Program.

[Followup Note} Windows Insider 11 upgraded to 22H2 23581.1 and there is not any change to customized context menus.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.