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

您可以使用 shell 啟動器,以自訂 shell 取代預設的 OS 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.

  • 您可以指定任何可執行檔做為預設 shell,但 C: \ Windows \ System32Eshell.exe 除外 \ 。You may specify any executable file to be the default shell except C:\Windows\System32\Eshell.exe. 使用 Eshell.exe 作為預設殼層,將會導致使用者登入之後出現空白畫面。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 應用程式做為自訂 shell。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. 若預設行為無法滿足您的需求,您可以自行設定殼層結束行為。You can configure the shell exit behavior if the default behavior does not meet your needs.

重要

自訂殼層會以登入帳戶的相同等級權限啟動。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 設定 DefaultReturnCodeActionshell會在啟用 shell 啟動器時使用,但目前登入之使用者的安全識別碼 (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.

您可以使用 [ u ] 設定來指定哪個自訂 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.