共用方式為


WESL_UserSetting.SetDefaultShell

這個方法會設定預設殼層啟動器組態。

語法

[Static] uint32 SetDefaultShell (
    [In, Required] string Shell,
    [In, Required] sint32 DefaultAction
);

參數


[in, required]Shell Launcher 啟動為殼層的應用程式或可執行檔。

DefaultAction
[in, required]Shell 啟動器在 Shell 應用程式結束時所採取的預設動作。

下表定義可能的動作:

說明
0 重新啟動殼層。
1 重新開機裝置。
2 關閉裝置。
3 什麼也不做。

傳回值

傳回指出 WMI 狀態WMI 錯誤的 HRESULT 值。

備註

當目前登入之使用者的安全標識碼 (SID) 不符合任何自定義定義的Shell Launcher 設定時,Shell Launcher 會使用預設組態。

需求

Windows 版本 支援
Windows 首頁
Windows 專業版
Windows 企業版
Windows 教育版
Windows IoT 企業版