Редагувати

Поділитися через


TaskService.GetRunningTasks method

For scripting, gets a collection of running tasks.

Note

TaskService.GetRunningTasks will only return a collection of running tasks that are running at or below a user's security context. For example, for members of the Administrators group, GetRunningTasks will return a collection of all running tasks, but for members of the Users group, GetRunningTasks will only return a collection of tasks that are running under the Users group security context.

Syntax

TaskService.GetRunningTasks( _
  ByVal flags _
)

Parameters

flags [in]

Pass in 1 to return all running tasks, including hidden tasks. Pass in 0 to return a collection of running tasks that are not hidden tasks.

Return value

A RunningTaskCollection object that contains the currently running tasks.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Type library
Taskschd.tlb
DLL
Taskschd.dll

See also

Task Scheduler