简体   繁体   中英

Is it possible to run an .exe file within Internet Explorer 11?

The OS is Windows 8.1 - I am wondering if it is possible to install an ActiveX based wrapper to run an .exe file within the IE11 window. It would be ideal if it can be launched via a link on a webpage.

Yes, that is possible via javascript. Here's an example to a working solution:

Running .exe from Javascript

In your case, you just need to make those lines of code a function and then create a hyperlink:

var executeShell = function(){
    var oShell = new ActiveXObject("Shell.Application");
    var commandtoRun = "C:\\Windows\\notepad.exe"; 
    oShell.ShellExecute(commandtoRun,"","","open","1");
};


<a href="#execute" onclick="executeShell();return false;">Run an exe</a> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM