Windows 资源管理器:特定文件夹的上下文菜单(背景)

Aze*_*edo 8 windows windows-registry context-menu

(这不是重复的 - 我在问之前已经检查过)

两个 .reg 命令都将自定义项条目添加到文件夹上下文菜单中:

1. 文件夹的上下文菜单:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\my custom command]
@="My command name"
"AppliesTo"="C:\\My specific Folder\\"

[HKEY_CLASSES_ROOT\Directory\shell\my custom command\command]
@="cmd.exe /s /k pushd \"%V\""
Run Code Online (Sandbox Code Playgroud)

2. 上下文菜单到文件夹背景(文件夹的空白区域):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\my custom command]
@="My command name"
"AppliesTo"="C:\\My specific Folder\\"

[HKEY_CLASSES_ROOT\Directory\Background\shell\my custom command\command]
@="cmd.exe /s /k pushd \"%V\""
Run Code Online (Sandbox Code Playgroud)

该行"AppliesTo"="C:\\My specific Folder\\"设置菜单项将出现在哪个特定文件夹。

问题在于(2)它不会接受"AppliesTo"="C:\\My specific Folder\\". 如果我输入该注册表值 ( "AppliesTo"),则根本不会出现菜单项。如何将特定文件夹设置为(2)

ZXX*_*ZXX 0

您需要使用如下属性名称:

AppliesTo = System.ItemName:"foo"
System.FileName
System.ItemFolderPathDisplay
System.ItemPathDisplay
Run Code Online (Sandbox Code Playgroud)

有很多这样的。查看:https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/libs/portaudio/src/hostapi/wasapi/mingw-include/propkey.h ?at=FS-3387_new_pa