Microsoft-Windows-Embedded-ShellLauncherMicrosoft-Windows-Embedded-ShellLauncher

可以使用 shell 启动器将默认 OS shell 替换为自定义 shell。You can use shell launcher to replace the default OS shell with a custom shell. 可以使用任何应用程序或可执行文件作为自定义 shell,如命令窗口或自定义专用应用程序。You can use any application or executable as your custom shell, such as a command window or a custom dedicated application.

  • 除了 C: \ Windows System32Eshell.exe 之外,您可以将任何可执行文件指定为默认 shell \ \ 。You may specify any executable file to be the default shell except C:\Windows\System32\Eshell.exe. 将 Eshell.exe 用作默认 shell 将导致用户登录后黑屏。Using Eshell.exe as the default shell will result in a blank screen after a user signs in.
  • 你还可以配置 shell 启动器,为不同的用户或用户组启动不同的 shell 应用程序。You can also configure shell launcher to launch different shell applications for different users or user groups.
  • 不能使用 shell 启动器启动 Microsoft Store 应用程序作为自定义外壳程序。You cannot use shell launcher to launch a Microsoft Store app as a custom shell. 但是,你可以使用应用程序启动器启动 Microsoft Store 的应用程序。However, you can use the application launcher to launch a Microsoft Store app at startup.

Shell 启动器在启动自定义 shell 之前处理 Run 和 RunOnce 注册表项,因此,您的自定义 shell 不需要处理其他应用程序或服务的自动启动。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 or services. 当您的自定义 shell 退出时,Shell 启动器还会处理系统的行为。Shell launcher also handles the behavior of the system when your custom shell exits. 如果默认行为不符合你的需求,你可以配置 shell 退出行为。You can configure the shell exit behavior if the default behavior does not meet your needs.

重要

自定义 shell 使用所登录帐户的用户权限的相同级别启动。A custom shell is launched with the same level of user rights as the account that is signed in. 这意味着具有管理员权限的用户可以执行需要管理员权限的任何系统操作,包括使用管理员权限启动其他应用程序,而没有管理员权限的用户则不能。This means that a user with administrator rights can perform any system action that requires administrator rights, including launching other applications with administrator rights, while a user without administrator rights cannot. 如果 shell 应用程序需要管理员权限并且需要提升权限,并且用户帐户控制 (UAC) 在你的设备上,则必须禁用 UAC 才能使 shell 启动器启动 shell 应用程序。If your shell application requires administrator rights 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.

子元素Child elements

设置Setting 说明Description
DefaultReturnCodeActionDefaultReturnCodeAction 根据返回代码指定要执行的操作。Specifies what action to take, based on the return code.
ShellShell 指定要用作默认自定义 shell 的应用程序或可执行文件。Specifies the application or executable to use as the default custom shell.
UserSettingsUserSettings 使用 UserSettings 设置来指定要为特定用户或用户组使用的自定义 shell 和默认的返回代码操作。Use the UserSettings settings to specify what custom shell and what default return code action to use for specific users or user groups.

启用 shell 启动程序时,将使用默认 shell 设置 DefaultReturnCodeActionshell,但当前登录的用户的安全标识符 (SID) 不匹配任何自定义的 shell 启动器配置。The default shell settings, DefaultReturnCodeAction and Shell, are used when shell launcher is enabled but the security identifier (SID) of the user who is currently signed in does not match any custom defined shell launcher configurations.

使用 UserSettings 设置指定要用于特定用户或用户组的自定义 shell 和默认返回代码操作。Use the UserSettings settings to specify what custom shell and what default return code action to use for specific users or user groups.

适用于Applies to

若要确定某个组件是否适用于你在构建的映像,请将你的映像加载到 Windows SIM 中并搜索组件或设置名称。To determine whether a component applies to the image you’re building, load your image into Windows SIM and search for the component or setting name. 有关如何查看组件和设置的信息,请参阅 在答案文件中配置组件和设置For information on how to view components and settings, see Configure Components and Settings in an Answer File.