I want to launch a metro application in windows 8 when user clicks a link on a web page that is rendered in IE 10.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If you have a Metro application your website can ask IE to show an install/launch button by adding some meta tags:
<meta name="msApplication-ID"content="{ID}"/>
<meta name="msApplication-PackageFamilyName"content="{PackageFamilyName}"/>
Details at http://msdn.microsoft.com/en-us/library/ie/hh781489(v=vs.85).aspx
You can also register your Metro application to handle protocols and files which the link could point to. This would then prompt the user to open the default application or choose another (much like download files from the web).
Registering a protocol: http://msdn.microsoft.com/en-us/library/windows/apps/hh452686.aspx
Registering as a file handler: http://msdn.microsoft.com/en-us/library/windows/apps/hh452684.aspx