WESL_UserSetting.GetDefaultShell

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

語法

[Static] uint32 GetDefaultShell (
    [Out, Required] string Shell,
    [Out, Required] sint32 DefaultAction
);

參數


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

DefaultAction
[out, required]殼層應用程式結束時,預設動作殼層啟動器會採用。

下表定義可能的動作:

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

傳回值

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

備註

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

規格需求

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