IPrincipal::RunLevel property

Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal.

This property is read/write.

Syntax


HRESULT put_RunLevel(
  [in]   TASK_RUNLEVEL_TYPE runLevel
);

HRESULT get_RunLevel(
  [out]  TASK_RUNLEVEL_TYPE *pRunLevel
);

Property value

The identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal.

ValueMeaning
TASK_RUNLEVEL_LUA
0

Tasks will be run with the least privileges.

TASK_RUNLEVEL_HIGHEST
1

Tasks will be run with the highest privileges.

 

Error codes

NameMeaning
S_OK

The property value was successfully set or retrieved.

Remarks

If a task is registered using the Builtin\Administrator account or the Local System or Local Service accounts, then the RunLevel property will be ignored. The property value will also be ignored if User Account Control (UAC) is turned off.

If a task is registered using the Administrators group for the security context of the task, then you must also set the RunLevel property to TASK_RUNLEVEL_HIGHEST if you want to run the task. For more information, see Security Contexts for Tasks.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Taskschd.h

Library

Taskschd.lib

DLL

Taskschd.dll

See also

IPrincipal

 

 

Community Additions

ADD
Show:
© 2014 Microsoft