UserId (logonTriggerType) Element

Identifier of the user. The task is started when this user logs on to the computer.

<xs:element name="UserId"
    type="nonEmptyString"
    maxOccurs="1"
    minOccurs="0"
 />

The UserId element is defined by the logonTriggerType complex type.

Parent element

ElementDerived fromDescription
LogonTrigger logonTriggerType

Specifies a trigger that starts a task when a user logs on.

Remarks

For scripting development, the user identifier for the logon trigger is specified using the LogonTrigger.UserId property.

For C++ development, the user identifier for the logon trigger is specified using the ILogonTrigger::UserId property.

Examples

For a complete example of the XML for a task that specifies a logon trigger, see Logon Trigger Example (XML).

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

See also

Task Scheduler Schema Elements
Task Scheduler

 

 

Show: