如何从Mozilla Filrefox运行exe文件?
我试过了,但不起作用。
var oShell = new ActiveXObject("Shell.Application");
var comandtoRun = "C:\\Buziol Games\\Mario Forever\\Mario Forever.exe";
oShell.ShellExecute(comandtoRun,"","","open","1");
发布于 2015-07-09 16:57:34
您不能从网页运行任何系统命令。只有在某些情况下,Internet Explorer才能做到这一点,但幸运的是,在现代浏览器中不能做到这一点。
发布于 2015-07-09 16:31:54
也许你的道路是不正确的。它可以由whitheSpaces生产。
您可以通过引用包含空格的文件夹名称来解决此问题,如下所示。
var oShell = new ActiveXObject("Shell.Application");
var comandtoRun = "C:\\'Buziol Games'\\'Mario Forever'\\'Mario Forever.exe'";
oShell.ShellExecute(comandtoRun,"","","open","1");
如果ActiveXObject在火狐上不起作用,你可以使用window.open
函数。
window.open('file:///C:"Buziol Games"/"Mario Forever"/"Mario Forever.exe"');
https://stackoverflow.com/questions/31312081
复制相似问题