Search code examples
c#.netwindows-explorer

Add right-click context menu only in desktop


I know how to implement a context menu over a file or folder

Integrating into Windows Explorer context menu

How add context menu item to Windows Explorer for folders

but I want to know how to put a command in the context menu in the desktop right-click without right-clicking on a file or folder


Solution

  • Have a look at https://msdn.microsoft.com/en-us/library/windows/desktop/cc144110.aspx

    I think the registry path for the desktop background is HKEY_CLASSES_ROOT/DesktopBackground, but looking through my registry I can see some of the handlers I see on my dekstop under /Directory/Background as well.