Share via


StartupTaskState Enum

Definition

Represents the state (enabled, disabled, or disabled by user) of a startup task.

public enum class StartupTaskState
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.StartupTaskContract, 65536)]
enum class StartupTaskState
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.StartupTaskContract), 65536)]
public enum StartupTaskState
var value = Windows.ApplicationModel.StartupTaskState.disabled
Public Enum StartupTaskState
Inheritance
StartupTaskState
Attributes

Windows requirements

Device family
Windows Desktop Extension SDK (introduced in 10.0.14393.0)
API contract
Windows.ApplicationModel.StartupTaskContract (introduced in v1.0)

Fields

Name Value Description
Disabled 0

The task is disabled.

DisabledByUser 1

The task was disabled by the user. It can only be re-enabled by the user.

Enabled 2

The task is enabled.

DisabledByPolicy 3

The task is disabled by the administrator or group policy. Platforms that don't support startup tasks also report DisabledByPolicy.

EnabledByPolicy 4

The task is enabled by the administrator or group policy.

Remarks

Version history

Windows version SDK version Value added
1709 16299 DisabledByPolicy
1803 17134 EnabledByPolicy

Applies to