How to run local program (exe) via Chrome via HTML/javascript How to run local program (exe) via Chrome via HTML/javascript google-chrome google-chrome

How to run local program (exe) via Chrome via HTML/javascript


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.