WESL _ UserSetting. SetEnabledWESL_UserSetting.SetEnabled

這個方法會啟用或停用 Shell 啟動器。This method enables or disables Shell Launcher.


[Static] uint32 SetEnabled(
    [In, Required] boolean 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.


這個方法會藉由修改登錄機碼 HKEY _ 本機 _ 電腦 \ 軟體 \ 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 或使用 uwf _ RegistryFilter CommitRegistry 來認可此登錄機碼,才能啟用或停用 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.


Windows 版本Windows Edition 支援Supported
Windows 10 HomeWindows 10 Home No
Windows 10 ProWindows 10 Pro No
Windows 10 EnterpriseWindows 10 Enterprise Yes
Windows 10 EducationWindows 10 Education Yes

WESL _ UserSettingWESL_UserSetting

殼層啟動程式Shell Launcher