7

I am trying to build a (single page) local portal in Chrome that opens several things.

The problem is we want to run a local executable via a button on a (local) webpage. Is this possible?

The second thing is that i want to do is to run a .pps file directly in the powerpoint viewer.

I can control to the startup of chrome, so i can access local files.

All things i tried so far only made the file(s) to download, not to run.

Can somebody help me how i get this done?

4
  • 1
    Running an exe file from a website would be a major security flaw. I doubt it is possible. Perhaps it is possible to do so through a chrome extension however. Commented May 24, 2016 at 14:03
  • Security is not an issue. The webapp runs local without internet conncection. Commented May 24, 2016 at 14:05
  • It is for a web browser, which is why a browser would not typically allow it. If your website is offline, why run it through a browser instead of making an app with nodejs for instance ? Commented May 24, 2016 at 14:07
  • because a single installation is always cheaper than maintaining 500 client installations? Commented Sep 19, 2018 at 14:36

1 Answer 1

22

You can set a protocol like myapp://launch/activity or the like to automatically launch your app by setting up a registry key in HKEY_CLASSES_ROOT with the name of your protocol and the action it should take.

There is a MSDN article showing the following example of a registry for an alert protocol:

HKEY_CLASSES_ROOT
   alert
      (Default) = "URL:Alert Protocol"
      URL Protocol = ""
      DefaultIcon
         (Default) = "alert.exe,1"
      shell
         open
            command
               (Default) = "C:\Program Files\Alert\alert.exe" "%1"

Which would then be called by requesting a url with alert:YOURPARAMS, which would then call alert.exe YOURPARAMS.

Sign up to request clarification or add additional context in comments.

5 Comments

@AlainVanderbroeck Does this solution work on Chrome/Firefox ?
Yeah. Chrome and firefox will ask you to approve the app that is being called
@MiltoxBeyond It works in IE but not in chrome. Has anything changed since you answered?
@Marc Seems like there is an untriaged bug in the chromium bug tracker Last updated (Jan 4, 2021): bugs.chromium.org/p/chromium/issues/…
is it possible to interact with the web page? - that is send data back from exe to Javascript?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.