launch an application from browser with parameters (cross browser)

Deadly 提交于 2019-12-12 00:54:25

问题


I am trying to launch an application from a webpage with parameters. Activex shown below works only at IE.

MyObject = new ActiveXObject( "WScript.Shell" );  
MyObject.Run('"C:\\Program Files\\application.exe" -guiparm=".." -system=..-client=..-user=.. -pw=..');  `

Is there any other way to do that cross browser?

Thank you very much for your help


回答1:


You can use the following:

<a href="c:\windows\Notepad.exe" 
type="application/octet-stream">Launch Notepad</a>

From what I remember using file:// is blocked by Chrome and Firefox. I don't know how to send parameters but at least you can launch an application without using an ActiveXObject.



来源:https://stackoverflow.com/questions/17591439/launch-an-application-from-browser-with-parameters-cross-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!