Search code examples
clickonceprotocol-handlercustom-url-protocol

How can I associate a custom URL protocol with a ClickOnce app?


I want to associate a custom URL protocol (for example, myprotocol://SomeFolder/SomePage) with a ClickOnce application.

I can create the association without a problem - the issue is that every time the application is updated (which is frequently) the path to the EXE file changes.

Is there any way around this issue?


Solution

  • It seems the answer to this is you can't, however I did come up with a solution.

    I created a launcher (very simple application) which finds the shortcut and passes its startup parameters to the ClickOnce application. I need to install the launcher in the traditional way, but the main application can still be updated via ClickOnce when needed.

    I found these links useful: