6

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?

Alain Vanderbroeck
  • 325
  • 1
  • 2
  • 10
  • 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. – zlandorf May 24 '16 at 14:03
  • Security is not an issue. The webapp runs local without internet conncection. – Alain Vanderbroeck May 24 '16 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 ? – zlandorf May 24 '16 at 14:07
  • because a single installation is always cheaper than maintaining 500 client installations? – Pwnstar Sep 19 '18 at 14:36

1 Answers1

20

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.

MiltoxBeyond
  • 2,683
  • 1
  • 13
  • 12