Skip to content

Commit c32760d

Browse files
Merge pull request #3461 from MicrosoftDocs/alvinashcraft/main-update-defaultsettings-app
Add new Launch Default Apps settings topic
2 parents 3bf3738 + 2ab07a6 commit c32760d

File tree

3 files changed

+65
-13
lines changed

3 files changed

+65
-13
lines changed

uwp/develop/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,8 @@
13651365
href: ../launch-resume/launch-ringtone-picker.md
13661366
- name: Launch the Windows Settings app
13671367
href: ../launch-resume/launch-settings-app.md
1368+
- name: Launch the Default Apps settings page
1369+
href: ../launch-resume/launch-default-apps-settings.md
13681370
- name: Launch the Microsoft Store app
13691371
href: ../launch-resume/launch-store-app.md
13701372
- name: Launch the Windows Maps app
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Launch the Default Apps settings page
3+
description: Learn how to launch the Windows Settings app to display the Default Apps settings page from your app using the ms-settings URI scheme.
4+
ms.assetid: a1819f4b-af98-4366-b2de-a7aea26da3a9
5+
ms.date: 03/21/2023
6+
ms.topic: article
7+
keywords: windows, windows 11, uwp, default apps, windows app sdk
8+
ms.localizationpriority: medium
9+
dev_langs:
10+
- csharp
11+
- cppwinrt
12+
---
13+
14+
# Launch the Default Apps settings page
15+
16+
Learn how to launch the Windows Settings app to display the Default Apps settings page from your app using the ms-settings URI scheme.
17+
18+
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](launch-settings-app.md).
19+
20+
## The Default Apps settings URL
21+
22+
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) or 22H2 (with 2023-04 Cumulative Update), you can append an additional query string parameter in escaped URI format to launch directly to the settings page for a specific application.
23+
24+
There are three query string parameters. The query string parameter to be used depends on how the application was installed.
25+
26+
| Query string parameter | Value to pass |
27+
|--------|--------|--------|
28+
| registeredAppUser | Named value from HKEY_CURRENT_USER\Software\RegisteredApplications<br/><br/>Use when the app was installed per user, and the registration for the app was written to HKEY_CURRENT_USER\Software\RegisteredApplications. |
29+
| registeredAppMachine | Named value from HKEY_LOCAL_MACHINE\Software\RegisteredApplications<br/><br/>Use when the app was installed per machine, and the registration for the app was written to HKEY_LOCAL_MACHINE\Software\RegisteredApplications. |
30+
| registeredAUMID | Application User Model ID <br/><br/>Use when the app was registered with Package Manager using a manifest declaring that the app handles File Types ([uap:FileTypeAssociation](/uwp/schemas/appxpackage/uapmanifestschema/element-uap-filetypeassociation)) or URI schemes ([uap:Protocol](/uwp/schemas/appxpackage/uapmanifestschema/element-uap-protocol)). |
31+
32+
>[!NOTE]
33+
>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 to `10.0.22000.1817` for Windows 11, version 21H2 or `10.0.22621.1555` for Windows 11, version 22H2.
34+
35+
In the following example, `LaunchUriAsync` is called to launch the Windows Settings app. The ms-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 for **Microsoft Edge** should be shown.
36+
37+
```csharp
38+
private async void LaunchSettingsPage_Click(object sender, RoutedEventArgs e)
39+
{
40+
bool result = await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings:defaultapps?registeredAppMachine=" + Uri.EscapeDataString(("Microsoft Edge")));
41+
}
42+
```
43+
44+
```cppwinrt
45+
bool result = co_await Windows::System::Launcher::LaunchUriAsync(Windows::Foundation::Uri(L"ms-settings:defaultapps?registeredAppMachine=" + Uri::EscapeDataString(L"Microsoft Edge")));
46+
```
47+
48+
## See also
49+
50+
[Launch the Windows Settings app](launch-settings-app.md)
51+
52+
[Launch the default app for a URI](launch-default-app.md)

uwp/launch-resume/launch-settings-app.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Launch the Windows Settings app
33
description: Learn how to launch the Windows Settings app from your app using the ms-settings URI scheme.
44
ms.assetid: C84D4BEE-1FEE-4648-AD7D-8321EAC70290
5-
ms.date: 07/11/2022
5+
ms.date: 03/21/2023
66
ms.topic: article
77
keywords: windows 10, uwp
88
ms.localizationpriority: medium
@@ -20,7 +20,7 @@ dev_langs:
2020
- [**PreferredApplicationPackageFamilyName**](/uwp/api/windows.system.launcheroptions.preferredapplicationpackagefamilyname)
2121
- [**DesiredRemainingView**](/uwp/api/windows.system.launcheroptions.desiredremainingview)
2222

23-
Learn how to launch the Windows Settings app. This topic describes the **ms-settings:** URI scheme. Use this URI scheme to launch the Windows Settings app to specific settings pages.
23+
Learn how to launch the Windows Settings app. This topic describes the `ms-settings:` URI scheme. Use this URI scheme to launch the Windows Settings app to specific settings pages.
2424

2525
Launching to the Settings app is an important part of writing a privacy-aware app. If your app can't access a sensitive resource, we recommend providing the user a convenient link to the privacy settings for that resource. For more info, see [Guidelines for privacy-aware apps](../security/index.md).
2626

@@ -75,7 +75,6 @@ The following sections describe different categories of ms-settings URIs used to
7575
- [Extras](#extras)
7676
- [Family Group](#family-group)
7777
- [Gaming](#gaming)
78-
- [Home page](#home-page)
7978
- [Mixed reality](#mixed-reality)
8079
- [Network and internet](#network-and-internet)
8180
- [Personalization](#personalization)
@@ -125,9 +124,10 @@ The following sections describe different categories of ms-settings URIs used to
125124
|Settings page| URI |
126125
|-------------|-----|
127126
| Apps & Features | ms-settings:appsfeatures |
128-
| App features | ms-settings:appsfeatures-app (Reset, manage add-on & downloadable content, etc. for the app) <br><br> To access this page with a URI, use the `ms-settings:appsfeatures-app` URI and pass an optional parameter of the _package family name_ of the app. |
127+
| App features | ms-settings:appsfeatures-app (Reset, manage add-on & downloadable content, etc. for the app) <br><br> To access this page with a URI, use the ms-settings:appsfeatures-app URI and pass an optional parameter of the _package family name_ of the app. |
129128
| Apps for websites | ms-settings:appsforwebsites |
130-
| Default apps | ms-settings:defaultapps |
129+
| Default apps | ms-settings:defaultapps (**Behavior introduced in Windows 11, version 21H2 (with 2023-04 Cumulative Update) or 22H2 (with 2023-04 Cumulative Update), or later.**)<br/>Append the query string parameter in the following formats using the Uri-escaped name of an app to directly launch the default settings page for that app:<br/><br/>- registeredAppMachine=\<Uri-escaped per machine installed name of app\><br/>- registeredAppUser=\<Uri-escaped per user installed name of app\><br/>- registeredAUMID=\<Uri-escaped Application User Model ID\><br/><br/>For more information, see [Launch the Default Apps settings page](launch-default-apps-settings.md). |
130+
| Default browser settings | ms-settings:defaultbrowsersettings (**Deprecated in Windows 11**) |
131131
| Manage optional features | ms-settings:optionalfeatures |
132132
| Offline Maps | ms-settings:maps<br/>ms-settings:maps-downloadmaps (Download maps) |
133133
| Startup apps | ms-settings:startupapps |
@@ -166,7 +166,7 @@ The following sections describe different categories of ms-settings URIs used to
166166
| Printers & scanners | ms-settings:printers |
167167
| Touch | ms-settings:devices-touch |
168168
| Touchpad | ms-settings:devices-touchpad (only available if touchpad hardware is present) |
169-
| Text Suggestions | ms-settings:devicestyping-hwkbtextsuggestions)
169+
| Text Suggestions | ms-settings:devicestyping-hwkbtextsuggestions |
170170
| Typing | ms-settings:typing |
171171
| USB | ms-settings:usb |
172172
| Wheel | ms-settings:wheel (only available if Dial is paired) |
@@ -214,12 +214,6 @@ The following sections describe different categories of ms-settings URIs used to
214214
| Playing a game full screen | ms-settings:quietmomentsgame |
215215
| TruePlay | ms-settings:gaming-trueplay (**As of Windows 10, version 1809 (10.0; Build 17763), this feature is removed from Windows**) |
216216

217-
### Home page
218-
219-
|Settings page| URI |
220-
|-------------|-----|
221-
| Default browser settings | ms-settings:defaultbrowsersettings |
222-
223217
### Mixed reality
224218

225219
> [!NOTE]
@@ -415,4 +409,8 @@ The following sections describe different categories of ms-settings URIs used to
415409
| Provisioning | ms-settings:workplace-provisioning (only available if enterprise has deployed a provisioning package) |
416410
| Repair token | ms-settings:workplace-repairtoken |
417411
| Provisioning | ms-settings:provisioning (only available on mobile and if the enterprise has deployed a provisioning package) |
418-
| Windows Anywhere | ms-settings:windowsanywhere (device must be Windows Anywhere-capable) |
412+
| Windows Anywhere | ms-settings:windowsanywhere (device must be Windows Anywhere-capable) |
413+
414+
## See also
415+
416+
[Launch the default app for a URI](launch-default-app.md)

0 commit comments

Comments
 (0)