问题
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