简体   繁体   English

从 web 浏览器启动 Windows 应用程序

[英]launch a Windows application from a web browser

I'm trying to launch a Windows application from a web browser, just like the VMWare console (VMRC) from a vCenter web interface, or the Zoom binary from a simple html link. I'm trying to launch a Windows application from a web browser, just like the VMWare console (VMRC) from a vCenter web interface, or the Zoom binary from a simple html link.

I understand Java applets, NAPI protocol and ActiveX are considered deprecated, so what is the best method please?我了解 Java 小程序,NAPI 协议和 ActiveX 被认为已弃用,那么最好的方法是什么?

Thanks.谢谢。

Register as a protocol handler in the registry.在注册表中注册为协议处理程序

To handle foo://something URLs for example, the.reg file would look something like例如,要处理foo://something URL,.reg 文件看起来像

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\foo]
"URL Protocol"=""
[HKEY_CLASSES_ROOT\foo\shell\open\command] 
@="\"C:\\Program Files\\MyApp\\MyApp.exe\" \"%1\""

If your app is not already installed on the system you might want to look at ClickOnce instead.如果您的应用程序尚未安装在系统上,您可能需要查看ClickOnce

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM