Shell Launcher Technical Reference (POSReady 7)

4/29/2013

Windows Embedded POSReady 7 uses Explorer.exe as the default shell, however, if you want to use a custom shell, Shell Launcher will be very helpful.

Shell Launcher can be enabled on the default installation of POSReady 7 by changing two registry keys:

  • HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell
  • HKLM\Software\Microsoft\Windows Embedded\EEF\Shell Launcher\Shell

To simplify this process, you can create the following three files and save them to the root of the system drive:

Shell_eShell.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell"="eShell.exe"

Shell_Explorer.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell"="explorer.exe"

eShell_Cmd.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Embedded\EEF\Shell Launcher]
"Shell"="cmd.exe"

Note

You can replace cmd.exe in the previous example with your custom shell. If your custom shell is in a folder included in the %PATH% environment variable, you have the option of just typing the name of your custom shell. Otherwise, you must type the full path of your custom shell.

Important

If your shell does not have a way to start Reg.exe or Regedit.exe so that you can restore the changes to the default Windows, you may have to modify the registry offline or reinstall if you are not familiar with offline registry editing.

Important

Before you begin to change the system registry, note your Administrator account name and make sure that the account has a password. You cannot reverse the changes you are about to make unless your Administrator account has a password. The only way to recover is to modify the registry offline or reinstall.

Configure Shell Launcher to run CMD.EXE

  1. Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.

  2. The following commands enable Shell Launcher and configure it to use CMD.EXE as the shell:

    Reg import %systemdrive%\Shell_eShell.reg
    Reg import %systemdrive%\eShell_Cmd.reg
    

Restart the computer and notice that the shell is now the Command Prompt window.

Restore Default Windows Shell (Explorer.exe)

  1. At a Command Prompt, type Regedit and answer Yes in the User Account Control dialog box.
  2. Select Import… from the File menu.
  3. Select Shell_Explorer.reg from the root of the system drive, right-click and select Open, and then click OK on the confirmation dialog box.
  4. To restart the computer, press CTRL+ALT+DEL, and then select Restart from the menu in the lower-right corner of the screen, or click on the button in the lower-left corner to shut down the computer.

When the computer restarts, you should see that the shell is the default Windows shell.

Shell Launcher Settings

You can configure Shell Launcher to control the behavior of POSReady 7 when your application is shut down or crashes by manipulating the following registry section:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Embedded\EEF\Shell Launcher]

  • CustomReturnCodeAction
    Configure the value for Action under CustomReturnCodeAction to define the behavior when a specific return code is encountered.
  • AllOtherReturnCodeAction
    Configure the value for Action under AllOtherReturnCodeAction to define the behavior when any other return code is encountered.

Set the registry value for Action to configure the desired behavior:

Value Description

0

Restart the custom shell.

1

Restart the device.

2

Turn off the device.

3

No action.