How can I launch my windows app when a users opens a url?
I would like to be able to send my users a url such as http://myname.com/users/edit/5, and when they click the link (or open it in IE/Chrome/etc..) it should open up my application to the "Edit user 5" screen. The app would already be installed on the users pc (but not necess开发者_Go百科arily running). What is the best way to hook into this?
You have to designate custom protocol name unused by any other app like for example "myapp".
Then bind your application to this protocol.
Then url like myapp://myname.com/users/edit/5
will open your application (and pass the URL to the application for further processing).
A custom protocol that your app has registered it can handle. Something like myapp://users/edit/5
.
Most browsers should support launching the app from something like that
Starting with Windows 10 Creators update, you can now use apps for websites. It allows browsers to open specific apps based on URL by putting URL information to the app and website.
See also an article on web.dev.
精彩评论