0

enter image description here

I am going to replace win10 default context menu items to user modified items, I mean remove all the items already existing and add my own items when a specific folder is right clicked.

I have added my own items already at the top of the menu - please see the image on the link above.

But I am not sure how to remove all the already existing items.

I'm trying to this function for my desktop application using C#, but before that I would like to do this in Windows Registry first.

I need a help from someone who is expert in Windows Registry.

6
  • 2
    Some of the options you want removed cannot be removed
    – Ramhound
    Commented Jul 15, 2023 at 18:51
  • I hope you realize that "hacking the Registry" is just using the spots Microsoft put there. You might have to reverse engineer the code to do what you want.
    – anon
    Commented Jul 15, 2023 at 19:50
  • So.. you could absolutely do this with a custom program/extension but there is SO MUCH to learn before you get there. The first thing is c# is not a good language to write shell extensions. It is a GREAT INCREDIBLE language but doesn't give you finite control of the COM object you will need to create this extension. You could do this 100% just with registry edits by creating a custom shell namespace pointed at a folder and then add context items to that (also via the registry). Unfortunately, I leave for vacation in like NOW and don't have time to tell you how to do it. Commented Jul 16, 2023 at 3:18
  • Perhaps one of you other shell experts can tell Ninja how to create a custom namespace folder via the registry and how to extend it using registry based context items? I would love the points but simply don't have time. Commented Jul 16, 2023 at 3:19
  • Thanks for your comments, guys. Señor CMasMas, It seems you have solution of my problem. You mean it's possible to remove default context menu items for specific folder? With C#, I have created guid and clsid for my folder, and created user modified items for this specific folder as you can see in the image above. But didn't find the solution how to remove all the items except user-modified items, for the specific folder that guid and clsid are pointing to. If you have free time, please write anything that may guide me.I have added my C# code to add my own items only for my folder.
    – Ninja
    Commented Jul 16, 2023 at 6:53

1 Answer 1

0

This is not a full answer, but does show how to remove some of these nuisance items, from TenForums and Major Geeks, q.v. Apologies, it's too long for just a comment. See also this article on How To Geek. Save the code below as a .reg file to remove three of those items:

Windows Registry Editor Version 5.00
; Remove pin to Start
[-HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\PintoStartScreen]
[-HKEY_CLASSES_ROOT\exefile\shellex\ContextMenuHandlers\PintoStartScreen]
[-HKEY_CLASSES_ROOT\Microsoft.Website\ShellEx\ContextMenuHandlers\PintoStartScreen]
[-HKEY_CLASSES_ROOT\mscfile\shellex\ContextMenuHandlers\PintoStartScreen]
; Remove pin to Quick Access
[-HKEY_CLASSES_ROOT\Folder\shell\pintohome]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\pintohome]
; Remove pin to Taskbar
[-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\{90AA3A4E-1CBA-4233-B8BB-535773D48449}]

Others, you have added, e.g., Open with Code, Git GUI Here and Git Bash Here, by allowing third-party software to add items to the context menu. Use the software's options to remove them. The example below is for 7-Zip, which I have used:

7-Zip context menu

Yes, this is a nuisance, and may need to be redone after updates (and they might not work on Windows 11).

1
  • Thank you so much for your comment, it's very helpful for me.. But I don't think it's not a solution for a specific folder.
    – Ninja
    Commented Jul 16, 2023 at 6:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .