javascriptactivexexehtaactivex-exe

Run .exe from JavaScript cross-browser


I know how to run an .exe using ActiveX, but that is Internet Explorer only, and I also know how with .hta, but that has to be installed/used as an application.

This doesn't have to be online: actually I'd prefer this locally.

This doesn't have to work with all browsers: the solution could would only with Firefox.

Thank you a lot in advance! :)


Solution

  • It looks like you can run a .exe from Firefox using nsIProccess https://developer.mozilla.org/en-US/docs/Code_snippets/Running_applications so you should look into that.

    however, it is not advisable to run a .exe from browser, as this can make your site look malicious.

    I couldn't find anyway for chrome. however, you can load external libraries using the NPAPI, this may work for exe as well but I have no clue: http://developer.chrome.com/extensions/npapi.html