WESL_UserSetting.SetDefaultShell

這個方法會設定預設的 Shell 啟動器組態。

語法

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

參數


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

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

下表定義了可能的動作:

描述
0 重新開機殼層。
1 重新啟動裝置。
2 關閉裝置。
3 不執行任何動作。

傳回值

傳回 HRESULT 值,指出 WMI 狀態WMI 錯誤

備註

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

規格需求

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