Running an .exe file from a browser (in any way)

22,612

Solution 1

Do you have the ability to install software on the computer you wish to run the executable on?

If so, you can create an Adobe AIR application that launches your file. Have the user install that AIR app on their computer. Next, create a small flash widget to sit on your web page. Have the flash widget invoke the AIR app.

Some API info: http://www.rogue-development.com/blog2/2008/03/interacting-with-an-air-app-from-a-browser-based-app/

Solution 2

A link with a File URI might do the trick. Have you tried that?

Solution 3

There are ways to do this, but it is a security risk so you can't do it without the user's specific permission. If on IE, you can do this with activeX, if on another browser it is more complicated -- you may have to install a special addon or dll.

One easy option is to register your program as a handler for a certain type of URI. If you've ever seen itunes:// links on the web, if you have itunes installed on your computer that will launch itunes directly. E.g. here's an explanation of how itunes does it. Actually it's an explanation of how to stop it, but you can use that to set up your own system to do the same thing.

One other place where this is done is on the google chrome download page. If you've ever installed any google product on your (windows) computer, google also installs a dll that allows it to execute any signed google product just by clicking on a link. Go to the google chrome download page and you can reverse the javascript to see how they do this, (ultimately theres a natively compiled dll though that allows them to do it), but installing this extra software makes it quite seamless, although a little disturbing.

So as you can see there are a variety of methods.

Solution 4

Running local files will require embedding an object in a page that has access to the local machine. This is achievable by building an ActiveX control or java applet. This is generally frowned apon for public websites etc but perfectly fine for a local network or controlled environment.

Share:
22,612
kremuwa
Author by

kremuwa

Updated on May 02, 2020

Comments

  • kremuwa
    kremuwa about 4 years

    I have got a page which lets me control some devices in a local network. However, some of the advanced settings can be set only using an .exe file which is located on the computer where I run the configuration page. I would like to have all the configurational tools "in one place" so it would be nice to have a kind of link/block/button/flash animation/whatever which - after being clicked by the user - would run a specified .exe file. I think that it is possible somehow, because I've seen MMO games which are launched using a webpage. I also suspect that html/javascript will not let me to do something like that, so maybe the answer is Flash? Hope you'll have some ideas.

    Thank you in advance for any clues, Michael.

  • Sikshya Maharjan
    Sikshya Maharjan about 13 years
    This seems incorrect, it is, certainly, a security risk, but it is, also, certainly possible through file-URIs and/or ActiveX among other options.