WESL _ UserSetting. SetEnabledWESL_UserSetting.SetEnabled

此方法启用或禁用 Shell 启动器。This method enables or disables Shell Launcher.

语法Syntax

[Static] uint32 SetEnabled(
    [In, Required] boolean Enabled
);

参数Parameters

能够Enabled
[在中,需要 ] 一个指示是启用还是禁用 Shell 启动器的布尔值。[in, required] A Boolean value that indicates whether to enable or disable Shell Launcher.

返回值Return Value

返回一个 HRESULT 值,该值指示 wmi 状态wmi 错误Returns an HRESULT value that indicates WMI status or a WMI error.

备注Remarks

此方法通过修改注册表项 HKEY _ LOCAL _ MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Winlogon 中的 shell 值,启用或禁用 shell 启动程序。This method enables or disables Shell Launcher by modifying the Shell value in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon. 如果启用了统一写入筛选器 (UWF) ,则可能需要通过使用 uwf _ RegistryFilter 来禁用 uwf 或提交此注册表项,以便启用或禁用 Shell 启动程序。If Unified Write Filter (UWF) is enabled, you may need to disable UWF or commit this registry key by using UWF_RegistryFilter.CommitRegistry in order to enable or disable Shell Launcher.

在用户登录之前,启用或禁用 Shell 启动器不会生效。Enabling or disabling Shell Launcher does not take effect until a user signs in.

要求Requirements

Windows 版本Windows Edition 支持Supported
Windows 10 家庭版Windows 10 Home No
Windows 10 专业版Windows 10 Pro No
Windows 10 企业版Windows 10 Enterprise Yes
Windows 10 教育版Windows 10 Education Yes

WESL _ UserSettingWESL_UserSetting

Shell 启动程序Shell Launcher