How to Pass MULTIPLE filenames to a Context Menu Shell Command?

一个人想着一个人 提交于 2019-11-27 02:03:56

问题


Passing a single filename to a context menu shell command is simple:

[HKEY_CLASSES_ROOT\*\shell\MyProgram\Command]
@="program.exe %1"

But if I select multiple files, program.exe is invoked for each such selected file.

What I would like to do instead is invokeprogram.exe only once, passing to it all the filenames currently selected.

How to do this?


回答1:


You may want to look at this post, as it says that this isn't really possible to pass multiple files to a single instance and you must rely on some form of IPC(Inter process Communication).




回答2:


You can use Send To for this. It supports multiple files.

In case this website goes offline:

Open shell:sendto with Windows + R or paste it into your explorer address bar. It should redirect you to:

C:\Users\<yourusername>\AppData\Roaming\Microsoft\Windows\SendTo

Create a shortcut to your program in this folder and you should see it in your explorer right-click menu under Send to



来源:https://stackoverflow.com/questions/6440715/how-to-pass-multiple-filenames-to-a-context-menu-shell-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!