Hi i am using ActiveXObject to execute an exe file but it is working in only IE. IS there any thing that works in all browsers.
<script>
function LaunchApp() {
if (!document.all) {
alert ("Available only with Internet Explorer.");
return;
}
var ws = new ActiveXObject("WScript.Shell");
ws.Exec("C:\\Program Files\\Xyz.exe");
}
</script>
Hi i am using ActiveXObject to execute an exe file but it is working in only IE. IS there any thing that works in all browsers.
<script>
function LaunchApp() {
if (!document.all) {
alert ("Available only with Internet Explorer.");
return;
}
var ws = new ActiveXObject("WScript.Shell");
ws.Exec("C:\\Program Files\\Xyz.exe");
}
</script>
Share
Improve this question
asked Oct 7, 2013 at 12:37
DharmDharm
872 silver badges11 bronze badges
2
- Dare I ask, what kind of an .exe you are trying to run? How did this .exe get on the clients puter? – James A Mohler Commented Oct 7, 2013 at 14:21
- ya i want to execute an exe that changes the volume settings of the client system it gets downloaded on the client system with our application. – Dharm Commented Oct 7, 2013 at 15:12
4 Answers
Reset to default 8No, that is a huge security risk. Plus, it would not work on Macs or Linux machines.
Sorry to be brutal but I suggest you abandon all work on ActiveX now and consign it to the bin.
ActiveX is a piece of history that dates back to a time when Microsoft thought they ruled the world, thankfully nobody believes that any more, not even Microsoft.
Why not create a browser plugin for all browsers? Then it would be sand-boxed and have less potential risk for tanking the user's system. You never want to let JavaScript arbitrarily run code on a user's system. I'm sure that most anti-virus programs would detect this sort of behavior as malware or a sort of virus.
Take a look at Kango or FireBreath for cross-browser plugin development frameworks.
All the browsers have their own development APIs.
Chrome: https://developer.chrome./extensions/api_index Internet Explorer: http://msdn.microsoft./en-us/library/ie/hh828809(v=vs.85).aspx Safari: https://developer.apple./library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/Introduction/Introduction.html Firefox: https://addons.mozilla/en-US/developers/docs/reference
You will need to see which browser allows you the features you want. Not all browsers work the same way and that means you may have to write different functions for different browsers.
As for Skype. The application is installed on the users machine - the extension probably just reads the configuration file for what hardware is attached.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742297406a4417401.html
评论列表(0条)