在Windows中将项目添加到桌面上下文菜单 [英] Adding item to the Desktop context menu in Windows
问题描述
我想在桌面上下文菜单(右键单击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).
类似于此屏幕截图中的Catalyst Control Center:
Something like Catalyst Control Center in this screenshot:
我知道如何通过注册表将项目添加到文件和文件夹的上下文菜单中,但是桌面似乎工作方式不同:我什至没有在注册表中找到文本。
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.
推荐答案
此类处理程序必须在HKCR中注册\ \目录\背景,而不是通常的位置,如HKCR\Directory,HKCR\文件夹等。
Such a handler must be registered in HKCR\Directory\Background, instead of usual locations like HKCR\Directory, HKCR\Folder, etc.
这篇关于在Windows中将项目添加到桌面上下文菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!