将程序添加到 windows 资源管理器上下文菜单

Adding program to the windows explorer context menu

如何将程序添加到上下文菜单中以接收文件夹作为参数,同时在单击文件夹背景时使新项目可用?

截至目前,我正在尝试将程序添加到 HKEY_CURRENT_USER\Software\Classes\directory\Background\shell\MyProgram\command 并且我确实看到了新的菜单项,但是,如果我尝试添加 %1 以接收参数,则它不是工作 - 我收到错误消息。

例如:

F:\Programs\program.exe - 程序在没有收到任何参数的情况下正确启动。

"F:\Programs\program.exe" "%1" - 错误

This file does not have a program associated with it for performing this action.

"F:\Programs\program.exe %1"- 错误

Application not found.

据我所知,第二个选项应该是正确的,但它不起作用,为什么?

参数应该是%V,而不是%1,因为看起来%V returns是调用它的目录,而%1 returns 从中调用它的文件。