简体   繁体   English

如何从浏览器运行桌面应用程序?

[英]How to run desktop app from browser?

I need to launch program from browser(like battlefield when you see dialog with confirmation of starting app).我需要从浏览器启动程序(当你看到确认启动应用程序的对话框时,就像战场一样)。 Should I make an extension or there is native way to do it with javascript?我应该做一个扩展还是有原生的方式用javascript来做?

If the basic idea is to launch a desktop app from the web browser, the first step is to create a new Registry in Windows and path a URL Custom protocol.如果基本思想是从 Web 浏览器启动桌面应用程序,那么第一步是在 Windows 中创建一个新的注册表并路径一个 URL 自定义协议。 And if is you need it you can also send parameters by changing console arguments in your app and append the parameters in your html file.如果您需要它,您还可以通过更改应用程序中的控制台参数来发送参数,并将参数附加到您的 html 文件中。

You can check here:你可以在这里查看:

https://weblogs.asp.net/morteza/How-to-run-a-desktop-application-from-a-web-page https://weblogs.asp.net/morteza/How-to-run-a-desktop-application-from-a-web-page

check out: Running .exe from Javascript查看: 从 Javascript 运行 .exe

There are cross-browser compatibility issues with executing a .EXE on a clients machine.在客户端计算机上执行 .EXE 存在跨浏览器兼容性问题。 i would suggest you look into alternative languages such as Java or even Flash.我建议您研究替代语言,例如 Java 甚至 Flash。 But it can be done in Javascript.但它可以在 Javascript 中完成。

-normally i wouldn't answer a question like this, but i saw someone say it's not possible. - 通常我不会回答这样的问题,但我看到有人说这是不可能的。 ANYTHING is possible.一切皆有可能。

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

相关问题 如何让我的桌面应用程序从浏览器运行? - how can I make my desktop application run from a browser? 如何创建可以运行 python 的桌面应用程序 - how to create a desktop app that can run python 如何从浏览器与桌面应用程序通信? - how to communicate with a desktop application from browser? JS,我们如何从浏览器打开桌面应用程序,例如 Zoom 或 Webex - JS, How can we open the desktop app from browser, like Zoom or Webex does 从浏览器网页检测应用程序是否安装在桌面上 - Detect if app is installed on desktop from browser web page 如何使用在桌面浏览器上运行的移动应用程序渲染移动屏幕? - How to render a mobile screen with mobile app running on desktop browser? 从另一个NW应用程序运行一个节点Webkit桌面应用程序 - Run one node webkit desktop application from another nw app 始终在后台运行的桌面应用 - Desktop app that always run in background window.open('my-app://', '_blank'); 不会从浏览器启动桌面应用程序,但会在浏览器中转到 my-app:// - window.open('my-app://', '_blank'); does not launch desktop app from the browser, but going to my-app:// in the browser does 如何防止桌面应用模仿浏览器请求? - How to prevent desktop apps from mimicking browser requests?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM