WESL_UserSetting.GetDefaultShell

此方法检索默认的 Shell 启动器配置。

语法

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

参数


[out,必需]Shell 启动程序作为 shell 启动的应用程序或可执行文件。

DefaultAction
[out,必需]Shell 应用程序退出时 Shell 启动器采取的默认操作。

下表中定义了可能的操作:

描述
0 重启 shell。
1 重启设备。
2 关闭设备。
3 不执行任何操作。

返回值

返回一个 HRESULT 值,该值指示 WMI 状态WMI 错误

备注

当当前登录的用户的安全标识符 (SID) 与任何自定义定义的 Shell 启动器配置不匹配时,Shell 启动器使用默认配置。

要求

Windows 版本 支持
Windows 主页
Windows 专业版
Windows 企业版
Windows 教育版
Windows IoT 企业版