如何将上下文菜单项添加到资源管理器的“目录"区域而不是文件夹? [英] How do I add a context menu item to the Contents area of Explorer and not to folders?
问题描述
大家好,
我正在尝试在File Explorer的Contents区域的上下文菜单中分配到VBScript的链接.我想要成为 能够右键单击那里的空白并在上下文特定菜单中看到我的程序,但是当用户右键单击文件夹区域或内容区域中的任何文件夹时,我不希望显示该程序. /span>
I'm trying to assign a link to a VBScript into a context menu in the Contents area of File Explorer. What I want is to be able to right-click in the white-space there and see my program listed in the context specific menu but I don't want it showing when users right-click on any of the folders in either the folders area or the contents area.
推荐答案
您可以使用.reg文件来设置注册表:
you can use a .reg file to setup your registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\**menuitem name here**\Command]
@="C:\\ExampleDirectory\\exeToRun.exe %1"
在记事本中创建文件,另存为.reg文件+运行文件+它将设置您的注册表以向所有文件(而非文件夹)添加菜单项,onclick会在命令行中运行带有完整文件路径的指定exe参数
create the file in notepad, save as a .reg file + run the file + it'll setup your registry to add a menuitem to all files (not folders), which onclick will run the exe you specified with the full filepath as it's commandline parameter
这篇关于如何将上下文菜单项添加到资源管理器的“目录"区域而不是文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!