Search code examples
htmlbrowserexecute

custom browser protocols in combination with parameters


I would like to execute a desktop application from a browser.

The executable i would like to execute is x:/x/test/test.exe

I added several registry items to accomplish the launch of the program.( Custom URL Protocols ) When i use the following html code :

<a href="strkis: " >Run Desktop App</a>

It seem to work fine.

The next step is to add parameters to executable

For example x:/x/test/test.exe "00001999999999" "0" "1"

This is the part where i get lost, and couldn't get i working. Does anybody have a tip ?


Solution

  • We solved this by creating an intermediate handler application that could parse the singular URL into the arguments our application needed. The handler could create the appropriate registry entries when run as administrator, and then was called for different protocols to run the applications in different ways.

    foowod://nameToFileToBeOpened??secondArg??thirdArg
    

    So the association was set for foowod to call the handler, and the handler parsed the rest of the path based on our desired tokens.