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.