2

I want to add an item into the Desktop context menu (the menu you see when you right-click on an empty space on the Windows Desktop).

Something like Catalyst Control Center in this screenshot:
Embedded Example

I know how to add items to files' and folders' context menus through registry, but the Desktop seems to work differently: I didn't even find the text in the registry.

So, how can I add a new item into the Desktop menu and how can I associate some code with it?
I think the solution is language independent, if it's not, I'd appreciate any code that helps.

Community
  • 1
  • 1
Tomas Sedovic
  • 42,675
  • 9
  • 40
  • 30

2 Answers2

2

Such a handler must be registered in HKCR\Directory\Background, instead of usual locations like HKCR\Directory, HKCR\Folder, etc.

Check out Creating Shell Extension Handlers in MSDN.

efotinis
  • 14,565
  • 6
  • 31
  • 36
1

There's a series of articles on CodeProject that details writing Shell Extensions and is very good:

http://www.codeproject.com/KB/shell/shellextguide1.aspx

Peter Ritchie
  • 35,463
  • 9
  • 80
  • 98