我发现“CommandFlags”= dword:00000040会在条目下面添加一个分隔符,但仅限于子菜单(在“subcommands”=“”字符串下)。示例here。
有没有办法在主上下文菜单中添加分隔符?
我正在使用的例子:
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\Delete With Rimraf]
@="Delete With Rimraf"
"CommandFlags"=dword:00000040
这不提供分隔符。
答案 0 :(得分:3)
此示例在项目之前和之前具有分隔符,此条目用于VirusTotal Uploader
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\vtuploader]
@="Send to VirusTotal"
"Icon"="C:\\Program Files\\VirusTotalUploader2\\VirusTotalUploader2.2.exe,0"
"SeparatorBefore"=""
"SeparatorAfter"=""
对于通过shellex加载的其他应用程序,它无法在注册表上添加分隔符,注入的dll添加/删除分隔符本身,您需要更改dll代码并重新编译它以实现您想要的这里是一个使用notepad ++的例子 https://github.com/notepad-plus-plus/notepad-plus-plus/pull/3092/commits
InsertMenu(hMenu, nIndex, MF_STRING | MF_BYPOSITION, idCmd++, m_szMenuTitle);
答案 1 :(得分:2)
您好我是您引用的博客条目的作者(https://blog.sverrirs.com/2014/05/creating-cascading-menu-items-in.html)
您操作主要上下文菜单的选项非常有限。 MSDN documentation表示您可能只能将ECF_SEPARATORBEFORE (0x20)
值用于顶级项目。