Auto-launching with file and URI associations (Windows Runtime apps using C#/VB/C++ and XAML)

Applies to Windows and Windows Phone

You can use the Windows.System.Launcher API to launch the user's default app for a file type or protocol. You can also enable your app to be the default app for a file type or protocol.

In this section

TopicDescription

How to handle file activation

An app can register to become the default handler for a certain file type. Both, desktop apps and Windows Runtime apps can register to be a default file handler. If the user chooses your app as the default handler for a certain file type, your app will be activated every time that type of file is launched.

How to handle URI activation

An app can register to become the default handler for a certain Uniform Resource Identifier (URI) scheme name. Both, desktop apps and Windows Runtime apps can register to be a default handler for a URI scheme name. If the user chooses your app as the default handler for a URI scheme name, your app will be activated every time that type of URI is launched.

How to launch the default app for a file

Learn how to launch the default app for a file. Many apps need to work with files that they can't handle themselves. For example, e-mail apps receive a variety of file types and need a way to launch these files in their default handlers.

How to launch the default app for a URI

Learn how to launch the default app for a URI. URIs allow you to launch another app on the operating system to perform a specific task. For example, if you want to allow the user to send a mail to a contact in your app, you can use the mailto: URI to launch the user’s default e-mail app.

 

Related topics

Guidelines
Guidelines and checklist for file types and protocols
Reference
Windows.System.Launcher

 

 

Show:
© 2014 Microsoft. All rights reserved.