简体   繁体   English

网页启动桌面应用程序

[英]Webpage launching desktop application

Alright I have always accepted the answer of it's impossible to open a program on a local machine through javascript or html due to the obvious security vulnerabilities. 好吧,我一直都接受这样的答案:由于明显的安全漏洞,无法通过javascript或html在本地计算机上打开程序。 However, the best solution we can find right now to a problem with a browser based POS system is to launch a desktop application for certain things. 但是,我们现在可以找到的基于浏览器的POS系统问题的最佳解决方案是为某些事情启动桌面应用程序。

The reason i'm second guessing that it may be possible is because of magnetLinks(which i know little about other than that I click it and my browser prompts me whether it's okay to launch the application and all of a sudden uTorrent is running with the data loaded in it. We have root access to every machine that will be running this web application and can configure the machine in any way needed so running chrome with flags or whatever is an option, i would just prefer to avoid installing activeX objects. 我第二次猜测可能的原因是由于magnetLinks(除了单击它,我对它一无所知,我的浏览器提示我是否可以启动该应用程序,并且突然间uTorrent正在运行我们具有对将要运行此Web应用程序的每台计算机的root访问权限,并且可以以所需的任何方式配置该计算机,因此使用带有标志或任何选项的chrome浏览器,我只希望避免安装activeX对象。

Edit: I have seen another similar question, however; 编辑:但是,我看到了另一个类似的问题; in this instance all of the machines running the application are configured, installed, and maintained by our company. 在这种情况下,所有运行该应用程序的计算机均由我们公司配置,安装和维护。

  • You need a protocol defined in advance. 您需要预先定义的协议。
  • Your desktop app needs to register to the system as a potential handler of the protocol. 您的桌面应用需要注册为系统中潜在的协议处理程序。
  • You need a browser that can handle opening custom protocols. 您需要一个可以处理打开自定义协议的浏览器。

Since you have root access to the kiosk you have, you can install a modern browser like Chrome or Firefox. 由于您具有对自助服务亭的root访问权限,因此可以安装现代浏览器,例如Chrome或Firefox。 Then, make sure your desktop application registers itself to the system with the protocol. 然后,确保您的桌面应用程序使用该协议将其自身注册到系统。 When the browser opens the link, it detects the custom protocol, looks for an app in the system that handles it, and suggests it to the user. 当浏览器打开链接时,它会检测自定义协议,在系统中查找处理该协议的应用程序,然后将其建议给用户。 Usually the first time you access the protocol, the browser will throw a prompt to select which software installed should handle it. 通常,第一次访问该协议时,浏览器会提示您选择要安装的软件来处理该协议。

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

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