Search code examples
windowsregistryshellexecute

What is the difference between Shell and ShellEx in Windows Registry?


I'm trying to add a custom context menu in windows registry, I found a shell key and shellex key that seems to both work the same thing? Why is there 2 and what are they for?


Solution

  • The Shell key is for static verbs used by ShellExecute and file-type context menus. They are simple to implement because they are just a string that specifies the command. They can be extended with optional COM objects (DropTarget etc.) if required.

    The ShellEx key is for shell extensions, these are COM objects and there are various extension points in the shell and each type is a subkey of ShellEx. ShellEx\ContextMenuHandlers is the shell extension version of the plain Shell key. The different types of shell extensions are listed here.