-1

How to add button in by web application which run an local exe file like github ?

enter image description here

In source code there is an link like href="github-windows://openRepo/https://github.com/tgalal/yowsup"

When i click on that button it prompt like bellow

enter image description here

how to add an functionality like this in my application ? Please help

suraj mahajan
  • 832
  • 1
  • 12
  • 21

1 Answers1

1

What you're describing is a "URI Scheme handler". You register that your program listens for SOMETHINGSOMETHING://.

The steps involves placing some information in the registry, which you likely need administrator access for, so a setup program is probably your best option.

The registry information you need to add is this:

HKEY_CLASSES_ROOT
   SOMETHINGSOMETHING
      (Default) = "URL:SOMETHINGSOMETHING Protocol"
      URL Protocol = ""
      DefaultIcon
         (Default) = "Path\To\Your\Executable.exe,1"
      shell
         open
            command
               (Default) = "Path\To\Your\Executable.exe" "%1"

Note that all of this has to be done on the client computer, you cannot force this on the computer from the webpage, other than letting the user download a setup program that will do the work.

Obviously this answer is for Windows, if you need to do similar actions on Linux or OS X then the work to do is similar but the steps involved are different.

You can read more about this on MSDN: Registering an Application to a URI Scheme.

Lasse V. Karlsen
  • 380,855
  • 102
  • 628
  • 825