在客户端启动 Windows 应用程序(通过点击网页触发)
是否可以从网页启动预装的应用程序。
我可以看到 steam 通过在我的注册表中安装一些东西来创建自己的协议 steam:// ,现在每当我单击 steam://ip 链接..它都会尝试启动一个文件。所以我想知道是否可以从网页启动应用程序,是否可以将应用程序注册到 URL 协议?
示例:假设我的网页上有一个媒体文件的链接(假设 divx)。现在一种选择是 divx webplayer 或其他选择。但我希望用户可以通过单击链接(vlc:// http://...)直接启动 vlc,这可能吗?
我在此处阅读了一些相关内容 但它对我来说并不清楚。
is that possible to launch a preinstalled application from a webpage.
i can see that steam has created its own protocol steam:// by installing something into my registry and now whenever i click a steam://ip link .. it tries to launch a file. so i was wondering if its possible to launch an application from a webpage, may be register an application to a URL protocol?
example: lets say i have link to a media file on my webpage(lets say divx). now one choice is divx webplayer or other choices. but i want that given a choice the user can launch vlc directly by clicking a link (vlc:// http://...), is that possible?
i read a little about this here
but it doesnt clicks clearly to me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的:您需要构建/注册一个 URL 处理程序并将其绑定到正确的应用程序。最简单的解释之前已在 如何在 Windows 上添加自定义 url 处理程序。就像 iTunes itms:// 一样。
更复杂的 URL 处理程序将要求您执行自己的本机代码:您链接到的文档是完全正确的。您需要熟悉编写注册表文件,但除此之外这是完全可行的。
Yes: you would need to build/register a URL handler and tie it to the right application. The simplest explanation is previously answered at How can I add a custom url handler on Windows. Like iTunes itms://.
More complex URL handlers will require you to do native code of your very own: the document you linked to is completely correct. You will need some familiarity with writing registry files, but otherwise it is quite doable.