Reputation: 2317
Microsoft page on Handlers has a section on Handler Names
It gives an example of the Handler Subkey Name type for an IContextMenu
interface:
HKEY_CLASSES_ROOT
MyProgram.1
ShellEx
ContextMenuHandlers
Then it says:
create a subkey underneath the "Handler Subkey name" key whose name is the string version of the CLSID of the Shell extension.
But then down below in the section Example of an Extension Handler Registration it says:
To enable a particular handler, create a subkey under the extension handler type key with the name of the handler. ... Set the default value of the name subkey to the string form of the handler's GUID.
And gives an example of:
Shellex
ContextMenuHandler
MyCommand
(Default) = {00000000-1111-2222-3333-444444444444}
So in the first section it says to use the CLSID string under ContextMenuHandler
and doesn't mention a Default Value. The second it says to use a (friendly) name of the handler and set the Default Value to the CLSID/GUID.
Next step, looked in the Registry and I see it done both ways, sometimes using GUID, sometimes using a friendly name with GUI in default value.
Which is correct? Or does it not really matter (which appears to be the case)?
Upvotes: 0
Views: 67
Reputation: 2317
You can do it either way:
This is the most efficient way:
Shellex
ContextMenuHandler
{00000000-1111-2222-3333-444444444444}
(Default) = UniqueFriendlyName
This also works but takes an extra attempt to look up the {GUID}
Shellex
ContextMenuHandler
UniqueFriendlyName
(Default) = {00000000-1111-2222-3333-444444444444}
Upvotes: 0