Run exe file from Javascript - Stack Overflow

How can I run exe file from Mozilla Filrefox?I tried this but it not working.varoShell = new ActiveXO

How can I run exe file from Mozilla Filrefox?

I tried this but it not working.

 var  oShell = new ActiveXObject("Shell.Application");
 var andtoRun = "C:\\Buziol Games\\Mario Forever\\Mario Forever.exe";
 oShell.ShellExecute(andtoRun,"","","open","1");

How can I run exe file from Mozilla Filrefox?

I tried this but it not working.

 var  oShell = new ActiveXObject("Shell.Application");
 var andtoRun = "C:\\Buziol Games\\Mario Forever\\Mario Forever.exe";
 oShell.ShellExecute(andtoRun,"","","open","1");
Share Improve this question asked Jul 9, 2015 at 8:27 SobirSobir 891 silver badge10 bronze badges 3
  • are you sure the path to file is right? You have spaces in it - this always makes problems :) – areim Commented Jul 9, 2015 at 8:31
  • 1 You can't use ActiveXObject in Firefox, it's an IE-only technology and has been removed pletely in Edge. – Karl-Johan Sjögren Commented Jul 9, 2015 at 8:48
  • if you have a website that needs to access an exe file, it is generally done by introducing a client app that runs a localhost application – Neville Nazerane Commented Sep 14, 2018 at 20:13
Add a ment  | 

2 Answers 2

Reset to default 3

You can't run any system mand from a web page. This was only possible with Internet Explorer under certain conditions, but fortunately it's not something you can do with modern browsers.

Perhaps your path isn't right. It could be produced by whitheSpaces.

You can solve it by quoting folder names wich contains whitespaces, like this.

 var  oShell = new ActiveXObject("Shell.Application");
 var andtoRun = "C:\\'Buziol Games'\\'Mario Forever'\\'Mario Forever.exe'";
 oShell.ShellExecute(andtoRun,"","","open","1");

If ActiveXObject not works on firefox, you can use window.open function.

window.open('file:///C:"Buziol Games"/"Mario Forever"/"Mario Forever.exe"');

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745202962a4616436.html

相关推荐

  • Run exe file from Javascript - Stack Overflow

    How can I run exe file from Mozilla Filrefox?I tried this but it not working.varoShell = new ActiveXO

    11小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信