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?

4

1 回答 1

19

您可以通过在 HKEY_CLASSES_ROOT 中使用您的协议名称及其应采取的操作设置注册表项来设置诸如 myapp://launch/activity 之类的协议以自动启动您的应用程序。

有一篇MSDN 文章显示了以下警报协议注册表示例:

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"

然后通过请求带有 的 url 来alert:YOURPARAMS调用它,然后调用alert.exe YOURPARAMS.

于 2016-05-24T14:10:45.500 回答