简体   繁体   中英

Disabling a Windows shell extension

I have the following registry key in Windows that spawns a shell context menu for my .NET application:

HKCR\AllFileSystemObjects\shellex\ContextMenuHandlers\MyShellExtension

This extension spawns a context menu option when I right-click files in Windows. I can delete it, and this will solve my problem (deleting the MyShellExtension key will no longer spawn the context menu when I right click files, which is what I want), but is there a better way to tell Windows to disable this context menu handler instead of deleting the entire key (like setting an enabled flag somewhere in the registry), and how? The key makes reference to a GUID that is used elsewhere, so having to remember that GUID can be a huge pain. I am also open to programmatic solutions.

The simple way would be to change the default property value from {your guid in here} to _{your guid in here} . Reverse the change when you want to re-enable the handler.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM