WESL_UserSetting.GetCustomShell

此方法根据 SID) 的安全标识符 (检索特定用户或组的 Shell 启动器配置。

语法

[Static] uint32 GetCustomShell (
    [In, Required] string Sid,
    [Out, Required] string Shell,
    [Out, Required] sint32 CustomReturnCodes[],
    [Out, Required] sint32 CustomReturnCodesAction[],
    [Out, Required] sint32 DefaultAction
);

参数

Sid
[in, 必需]包含配置 Shell 启动器的用户或组的安全标识符 (SID) 的字符串。


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

CustomReturnCodes
[out,必需]shell 应用程序返回的自定义返回代码数组。

CustomReturnCodesAction
[out,必需]自定义返回代码操作的数组,用于确定 Shell 启动程序在 shell 应用程序退出时执行的操作。 自定义操作映射到 CustomReturnCodes 数组

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

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

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

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

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

返回值

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

备注

Shell 启动器使用 CustomReturnCodesCustomReturnCodesAction 数组根据应用程序的返回值来确定 shell 应用程序退出时的系统行为。

如果 CustomReturnCodes 中不存在返回值,或者 CustomReturnCodesAction 中定义的相应操作不是有效值,则 Shell 启动器使用 DefaultAction 来确定系统行为。 如果未定义 DefaultAction 或 不是有效值,Shell 启动器将重启 shell 应用程序。

要求

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