I'm trying to register my application that will handle opening of links, e,g, http://stackoverflow.com. I need to do this explicitly for Windows 8, I have itworking in earlier versions of Windows. According to MSDN this has changed in Win8.
I've been through the Default Programs page on MSDN (msdn.microsoft.com/en-us/library/cc144154.aspx) page on MSDN. It provides a great walkthrough on handling file types but is light on details for protocols. Registering an Application to a URL Protocol only goes over the steps involved in setting up a new protocol, but not how to correctly add a new handler to an existing protocol.
I've also tried the registry settings outlined in other SO posts.
One more thing, the application is not a Metro/Windows Store App, so adding an entry in the manifest won't work for me.
You were on the right track with the Default Programs web page - in fact, it's my reference for this post.
The following adapts their example:
First, you need a
ProgID
inHKLM\SOFTWARE\Classes
that dictates how to handle any input given to it (yours may already exist):Then fill the registry with DefaultProgram info inside a
Capabilities
key:Finally, register your application's capabilities with DefaultPrograms:
Now all "myprotocol:" links should trigger
%ProgramFiles%\MyApp\MyApp.exe %1
.LaunchUriAsync(Uri)
Starts the default app associated with the URI scheme name for the specified URI. You can allow the user to specify, in this case.
http://msdn.microsoft.com/library/windows/apps/Hh701476
Side note since this is a top answer found when googling this kind of an issue: Make sure the path in the shell command open is a proper path to your application. I spent an entire day debugging issue that seemed only to affect Chrome and Edge on Windows 10. They never triggered the protocol handler while Firefox did. What was the issue? The path to the .bat file used mixed \ and / slashes. Using only proper \ slashes in the path made Edge & Chrome suddenly able to pick up the request.