RegisteredTask.GetInstances method

For scripting, returns all currently running instances of the registered task.

Note

RegisteredTask.GetInstances will only return instances of the currently running registered task that are running at or below a user's security context. For example, for members of the Administrators group, GetInstances will return all instances of the currently running registered task, but for members of the Users group, GetInstances will only return instances of the currently running registered task that are running under the Users group security context.

Syntax

RegisteredTask.GetInstances( _
  ByVal flags, _
  ByRef runningTasks _
)

Parameters

flags

This parameter is reserved for future use and must be set to 0.

runningTasks [out]

A RunningTaskCollection object that contains all currently running instances of the task.

Return value

This method does not return a value.

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

RegisteredTask