문제

I know that Windows 8 apps can't directly launch executable files, but recently I downloaded an app that can launch something similar. The app could launch Steam games (which are run in executable files). I figured out that the app did this because any Steam game can be launched using a URL, for example for Alan Wake the URL is steam://rungameid/108710 (I got this by creating a desktop shortcut for a game in Steam and viewing the shorcut's properties)

How can I create these kinds of URLs for other application .exe files? (using a desktop app is fine, but using a Metro app would be even better)

도움이 되었습니까?

해결책

The technique is known as protocol activation (JavaScript reference | C#/VB/C++ reference) and you set most of this up in the manifest (see image below). If there is only one application that's installed and set up to handle protocol "XYZ" then that app will launch for the given URI; if there are multiple one that can handle it, then the user is prompted for which app they would like to launch.

Jerry Nixon has a great walkthrough on his blog as well.

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top