Share via


Shell Launcher Overview (Standard 8)

7/8/2014

Learn how to add and configure Shell Launcher on your Windows Embedded 8 Standard (Standard 8) device.

You can use Shell Launcher to replace the default Windows 8 shell with a custom shell. You can use any application or executable as your custom shell, such as a command window or a custom dedicated application.

Warning

You may specify any executable file to be the default shell except C:\Windows\System32\Eshell.exe. Using Eshell.exe as the default shell will result in a blank screen after user logon.

You can also configure Shell Launcher to launch different shell applications for different users or user groups.

Important

You cannot use Shell Launcher to launch a Windows 8 app as a custom shell. However, you can use Windows 8 Application Launcher to launch a Windows 8 app at startup. For more information, see Windows 8 Application Launcher Overview.

Shell Launcher processes the Run and RunOnce registry keys before starting the custom shell, so your custom shell doesn’t need to handle the automatic startup of other applications and services.

Shell Launcher also handles the behavior of the system when your custom shell exits. You can configure the shell exit behavior if the default behavior does not meet your needs.

Launch Different Shells for Different User Accounts

By default, Shell Launcher runs the default shell, which is specified when you create the OS image at design time. The default shell is set to CMD.EXE, but you can specify any executable file to be the default shell.

You can configure Shell Launcher to launch a different shell for specific users or groups if you do not want to run the default shell. For example, you might configure a device to run a custom application shell for guest accounts, but run the standard Windows Explorer shell for administrator accounts in order to service the device.

If you use ICE to configure Shell Launcher for a new user at design time, you must first create the new user in the UserAccounts setting in Shell-Setup, under Embedded Core, during the 7 OOBE System phase.

If you use the WMI providers to configure Shell Launcher for a user or group at run time, you must use the security identifier (SID) for that user or group; you cannot use the user name or group name. If you use Embedded Lockdown Manager (ELM) to configure Shell Launcher, ELM converts user and group names to their SID value.

For more information about common security identifiers, see Well-known SIDs. For more information about ELM, see Embedded Lockdown Manager (ELM) Technical Reference.

When the current logon account belongs to two or more groups that have different configurations defined for each group, Shell Launcher uses the first configuration it finds. The search order is not defined, so we recommend that you avoid assigning a user to multiple groups with different Shell Launcher configurations.

Perform an Action When the Shell Exits

When a custom shell exits, Shell Launcher can perform one of four actions, based on the following return codes:

Return code

Action

0

Restart the shell.

1

Restart the device.

2

Shut down the device.

3

Do nothing.

Important

Make sure that your shell application does not automatically exit and is not automatically closed by any features such as Dialog Filter, as this can lead to an infinite cycle of exiting and restarting, unless the return code action is set to do nothing.

Default Return Code Action

You can define a default return code action for Shell Launcher with the DefaultReturnCodeAction setting. If you do not change the initial value, the default return code action is set to 0 (zero), which indicates that Shell Launcher restarts the shell when the shell exits.

Map the Exit Code to a Shell Launcher Action

Shell Launcher can take a specific action based on the exit code returned by the shell. For any given exit code returned by the shell, you can configure the action that Shell Launcher takes by mapping that exit code to one of the shell exit actions.

If the exit code does not match a defined value, Shell Launcher performs the default return code action.

For example, your shell might return exit code values of -1, 0, or 255 depending on how the shell exits. You can configure Shell Launcher to restart the system (1) when the shell returns a value of -1, restart the shell (0) when the shell returns a value of 0, and shut down the system (2) when the shell returns a value of 255. Your custom return code action mapping would look like this:

Exit code

Action

-1

1 (restart the system)

0

0 (restart the app)

255

2 (shut down the system)

For more information see SetCustomShell.

Add Shell Launcher to Your Image

You can add Shell Launcher to your image by adding the Shell Launcher module to your design in ICE or Image Builder Wizard (IBW).

Configure Shell Launcher

You can configure Shell Launcher at design time or run time. All configuration settings for Shell Launcher are stored in the registry, and configuration changes take effect immediately. You can configure the following options:

  • Specify a shell configuration for a specific user or group.
  • Remove a shell configuration for a specific user or group.
  • Change the default shell configuration.
  • Get information on a shell configuration for a specific user or group.

Design Time Configuration

You can use ICE to configure Shell Launcher while designing your system.

Note

By default, the Shell Launcher Shell setting is set to cmd.exe. If you use cmd.exe as the shell, we recommend that you turn off the default Modern UI themes. To do this, in ICE, navigate to Embedded Core, Themes, DefaultThemesOff, and set the DefaultThemesOff setting to true.

Run-time Configuration

You can use the Shell Launcher WMI providers directly in a PowerShell script or in an application to configure Shell Launcher at run time. You can also use Embedded Lockdown Manager (ELM) to configure Shell Launcher. The ELM can generate PowerShell scripts that use the WMI providers.

For more information about Shell Launcher WMI providers, see Shell Launcher WMI Provider Reference.

For more information about the ELM, see Embedded Lockdown Manager (ELM) Technical Reference.

Remarks

A custom shell is launched with the same level of privileges as the logged on user. This means that a user with administrator privileges can perform any system action that requires administrative privileges, including launching other applications with administrator privileges, while a user without administrator access cannot.

Warning

If your shell application requires administrator privileges and needs to be elevated, and User Account Control (UAC) is present on your device, you must disable UAC in order for Shell Launcher to launch the shell application.

See Also

Concepts

Branding Features for Standard 8