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
2 Answers
Reset to default 3You 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"');