File type and URI associations model

Platforms

Clients - Windows 8
Servers - Windows Server 2012

Description

The file type and URI association model has changed in Windows 8. Apps are no longer able to programmatically set themselves as the default handler for a file type or URI. Instead, now the user always controls what the default handler is for a file type or URI scheme.

Manifestation

How this change presents to the user depends upon how the app is designed, for example:

  • Many apps check to see if they are the default every time they run and, if they are not, they prompt the user to set them as default. However, because apps can no longer accurately query to determine which app is the default handler for a file type or URI scheme, neither of these operations works.
  • Many apps have a dialog box or menu built in or in their installer that specifies the file types for which the app should serve as the default. However, because apps can no longer programmatically set themselves as the default handler for a file type or URI scheme, this no longer works.

Mitigation

There are several things users can do to accommodate these changes:

  • Users are prompted contextually to choose a default app to handle file types, URI schemes, or both when one has not been specified
  • Users are offered the option to change their default handler after installing new apps that can handle a file type or URI scheme
  • The default programs control panel allows users to set defaults for an app, or for a file type, URI scheme, or both; apps can link to the control panel
  • Defaults can be changed from Windows Explorer

Solution

As a result of these changes, this API guidance is provided:

Tests

  • Test to verify that apps register properly in Set Default Programs control panel
  • Test to verify that apps register properly to appear in the OpenWith list for the file types, URI schemes, or both, that they register to handle
  • Test to verify that new app notifications appear after your app is installed and the user invokes a file type, URI scheme, or both, that your app has registered to handle

Resources