Tomas Sedovic
Tomas Sedovic

Reputation: 44343

Adding item to the Desktop context menu in Windows

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.

Upvotes: 2

Views: 3211

Answers (2)

efotinis
efotinis

Reputation: 14961

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.

Upvotes: 2

Peter Ritchie
Peter Ritchie

Reputation: 35881

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

Upvotes: 1

Related Questions