---
title: Create an Shell Launcher configuration file
description: Learn how to create an XML file to configure a device with Shell Launcher.
ms.date: 02/12/2024
ms.topic: how-to
---
# Create an Shell Launcher configuration file
This article provides practical examples of Shell Launcher XML configuration files.
Let's start by looking at the basic structure of the XML file.
- A configuration xml can define one or multiple `Profiles`
- Each profile has a unique `Profile Id` and defines a `Shell` elemnt, which is the application that executes when the user signs in
- A profile can define a default action to be taken when the application exits and may define actions to be taken when the application exits with a specific return code
- A profile must be associated to a user account to have an effect
- You can define a `Default profile` that is used when no other profile is associated to a user account
- A configuration xml can define one or multiple `configs`
- Each config associates a user account to a `profile Id`
- A profile has no effect if it's not associated to a user account
You can start your file by pasting the following XML code into a text editor, and saving the file with an xml extension. For example, `kiosk.xml`.
```xml
```
## Profiles node
If you want to define a default profile, you can use the `DefaultProfile` element:
```xml
```
Each profile is identified by a unique identifier `Profile Id`, for example:
```xml
```
### Shell node
The `Shell` node defines the application that executes when the user signs in:
- The `Shell` attribute is the path to the application
- The `V2:AppType` attribute defines the type of application
- The `V2:AllAppsFullScreen` attribute is a boolean value that defines if all applications are executed in full screen
```xml
```
```xml
```
## Default action, custom action, exit code
Shell Launcher defines four actions to handle app exits. You can customize Shell Launcher and use the actions based on different exit code.
| Value | Description |
|--|--|
| 0 | Restart the shell |
| 1 | Restart the device |
| 2 | Shut down the device |
| 3 | Do nothing |
These actions can be used as default action, or can be mapped to a specific exit code. Refer to [Shell Launcher](/windows-hardware/customize/enterprise/wesl-usersettingsetcustomshell) to see how these codes with Shell Launcher WMI.
To configure these actions with Shell Launcher CSP, use below syntax in the Shell Launcher configuration xml. You can specify at most four custom actions mapping to four exit codes, and one default action for all other exit codes. When app exits and if the exit code is not found in the custom action mapping, or there is no default action defined, it will be no-op, i.e. nothing happens. So it's recommended to at least define DefaultAction. [Get XML examples for different Shell Launcher v2 configurations.](https://github.com/Microsoft/Windows-iotcore-samples/tree/develop/Samples/ShellLauncherV2)
``` xml
```
## AllAppsFullScreen
In the XML for Shell Launcher v2, note the **AllAppsFullScreen** attribute. When set to **True**, Shell Launcher will run every app in full screen, or maximized for desktop apps. When this attribute is set to **False** or not set, only the custom shell app runs in full screen; other apps launched by the user will run in windowed mode.
### AppType
Allowed values are `Desktop` and `UWP`.
`AllAppsFullScreen` is a boolean value. If true, all applications are executed in full screen. If false...
:::row:::
:::column span="1":::
**Scenario**
:::column-end:::
:::column span="3":::
**Sample Xml**
:::column-end:::
:::row-end:::
:::row:::
:::column span="1":::
**Desktop application**
:::column-end:::
:::column span="3":::
In this example, Microsoft Edge is executed in full screen, opening a website. The website is reloaded after 2 minutes of inactivity.
```xml
```
:::column-end:::
:::row-end:::
:::row:::
:::column span="1":::
**UWP application**
In this example, the Weather app is executed in full screen.
:::column-end:::
:::column span="3":::
```xml
```
:::column-end:::
:::row-end:::
## Kiosk example
[!INCLUDE [shell-launcher-quickstart-xml](includes/shell-launcher-quickstart-xml.md)]