WESL_UserSetting.SetDefaultShell

此方法设置默认的 Shell 启动程序配置。

语法

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

参数


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

DefaultAction
[in,必需]Shell 应用程序退出时 Shell 启动程序执行的默认操作。

下表定义了可能的操作:

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

返回值

返回指示 WMI 状态WMI 错误的 HRESULT 值。

注解

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

要求

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