Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

Launch the Default Apps settings page

  • 2025-02-13
Feedback

In this article

Learn how to launch the Windows Settings app to display the Default Apps settings page from your app using the ms-settings URI scheme.

Windows defines a set of URIs that allow apps to launch the Windows Settings app and display a particular settings page. This article explains how to launch the Windows Settings app directly to the Default Apps settings page and, optionally, navigate directly to the settings for a specified default application. For more information, see Launch the Windows Settings app.

The Default Apps settings URL

ms-settings:defaultapps launches the Windows Settings app and navigates to the Default Apps settings page. Starting with Windows 11, version 21H2 (with 2023-04 Cumulative Update), 22H2 (with 2023-04 Cumulative Update), and 23H2 or later, you can append an additional query string parameter in escaped URI format to launch directly to the settings page for a specific application.

There are three query string parameters. The query string parameter to be used depends on how the application was installed.

Query string parameterValue to pass
registeredAppUserNamed value from HKEY_CURRENT_USER\Software\RegisteredApplications

Use when the app was installed per user, and the registration for the app was written to HKEY_CURRENT_USER\Software\RegisteredApplications.
registeredAppMachineNamed value from HKEY_LOCAL_MACHINE\Software\RegisteredApplications

Use when the app was installed per machine, and the registration for the app was written to HKEY_LOCAL_MACHINE\Software\RegisteredApplications.
registeredAUMIDApplication User Model ID

Use when the app was registered with Package Manager using a manifest declaring that the app handles File Types (uap:FileTypeAssociation) or URI schemes (uap:Protocol).

Note

To get the registeredAUMID query string parameter to work after an OS upgrade, an app may need to increment its TargetDeviceFamily...MaxVersionTested value in its manifest. This will ensure that the app is reindexed for the user, which in turn will update the appropriate definitions used to process the deep link via protocol activation. MaxVersionTested should be updated to10.0.22000.1817 for Windows 11, version 21H2 or10.0.22621.1555 for Windows 11, version 22H2.

In the following example, LaunchUriAsync is called to launch the Windows Settings app. Thems-settings:defaultapps Uri specifies that the Default Apps settings page should be shown. Next, the app that should be launched is determined. As an example, “Microsoft Edge” was registered by the app in HKEY_LOCAL_MACHINE\Software\RegisteredApplications. Since it is a per machine installed app,registeredAppMachine is the query string parameter that should be used. The optional query string parameter registeredAppMachine is set to the registered name, escaped with a call to Url.EscapeDataString, to specify that the page forMicrosoft Edge should be shown.

private async void LaunchSettingsPage_Click(object sender, RoutedEventArgs e){    bool result = await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings:defaultapps?registeredAppMachine=" + Uri.EscapeDataString("Microsoft Edge")));}
bool result = co_await Windows::System::Launcher::LaunchUriAsync(Windows::Foundation::Uri(L"ms-settings:defaultapps?registeredAppMachine=" + Uri::EscapeDataString(L"Microsoft Edge")));

Related content

Launch the Windows Settings app

Launch the default app for a URI

Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, seeour contributor guide.

Feedback

Was this page helpful?

YesNo

In this article

Was this page helpful?

YesNo