简体   繁体   English

从 React.js 应用程序启动一个 .exe

[英]Start an .exe from React.js application

Is there a possible way to start an .exe application on shared location from react.js app.有没有办法从 react.js 应用程序在共享位置启动 .exe 应用程序。

The approach should be working on internet explorer also.该方法也应该适用于 Internet Explorer。

Yes, this can be done with a custom URL handler.是的,这可以通过自定义 URL 处理程序来完成。 For example :例如 :

  1. JavaScript code can navigate to a URL like (myexehandler://parameters) JavaScript 代码可以导航到像 (myexehandler://parameters) 这样的 URL
  2. Exe can be registered as handler for "myexehandler://" Exe 可以注册为“myexehandler://”的处理程序

Browser will delegate handling of custom URLs to OS and OS will invoke the exe.浏览器会将自定义 URL 的处理委托给操作系统,而操作系统将调用 exe。

Documentation : https://msdn.microsoft.com/en-us/windows/desktop/aa767914 , How do I register a custom URL protocol in Windows?文档: https : //msdn.microsoft.com/en-us/windows/desktop/aa767914如何在 Windows 中注册自定义 URL 协议?

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

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