将多个文件/文件夹从 Windows 资源管理器传递到外部应用程序

发布于 2024-08-23 03:09:57 字数 134 浏览 5 评论 0原文

您好,有谁知道如何让 Windows 资源管理器将多个文件/文件夹传递到注册表中引用的外部应用程序(c#)?

我当前能够使用 %1 语法对单个文件/文件夹进行操作,但不确定如何让资源管理器传递多个项目。

有谁知道该怎么做?

Hi does anyone know how to get windows explorer to pass multiple files / folders through to an external app (c#) referenced in the registry?

I am current able to act upon a single file / folder using the %1 syntax but not sure how to get explorer to pass through multiple items.

Does anyone know how to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

万水千山粽是情ミ 2024-08-30 03:09:58

当您在资源管理器中选择多个文件时,将调用 shell 上下文菜单扩展的 IShellExtInit::Initialize 方法,并且 pdtobj 包含所选内容。
请注意,不支持编写托管 shell 扩展。

When you select multiple files in Explorer, your shell context menu extension's IShellExtInit::Initialize method will be called and pdtobj contains the selection.
Note writing managed shell extension is not supported.

谜泪 2024-08-30 03:09:58

我认为这是不可能的。

当您使用资源管理器打开多个文件时,它将启动文件程序的单独副本。我认为不可能覆盖这种行为。

编辑:我忘记了 shell 扩展。这是可能的。

要解决此问题,您可以使后续副本与第一个副本通信,然后退出。详细说明超出了本答案的范围。

I don't think this is possible.

When you open multiple files using Explorer, it will launch a separate copy of your program for file. I don't think it's possible to override this behavior.

EDIT: I forgot about shell extensions. This is possible.

To work around this, you could make the subsequent copies communicate with the first one, then exit. Detailed instructions for this are beyond the scope of this answer.

亚希 2024-08-30 03:09:58

为了可靠地做到这一点,您需要编写一个 shell 扩展,很可能是一个 sendto 实现。

自 vb6 以来我就没有写过一个,但你可以找到一个看起来不错的托管示例 此处

或者您可以使用免费软件实用程序

In order to do this reliably you would need to write a shell extension, most likely a sendto implementation.

I haven't written one since vb6 but you can find what looks to be a good managed example here

Or you could use a freeware utility

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文