Редагувати

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


TaskFolder object

Scripting object that provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder.

Members

The TaskFolder object has these types of members:

Methods

The TaskFolder object has these methods.

Method Description
CreateFolder Creates a folder for related tasks.
DeleteFolder Deletes a subfolder from the parent folder.
DeleteTask Deletes a task from the folder.
GetFolder Gets a folder that contains tasks at a specified location.
GetFolders Gets all the subfolders in the folder.
GetSecurityDescriptor Gets the security descriptor for the folder.
GetTask Gets a task at a specified location in a folder.
GetTasks Gets all the tasks in the folder.
RegisterTask Registers (creates) a new task in the folder using XML to define the task.
RegisterTaskDefinition Registers (creates) a task in a specified location using the ITaskDefinition interface to define a task.
SetSecurityDescriptor Sets the security descriptor for the folder.

Properties

The TaskFolder object has these properties.

Property Access type Description
Name
Read-only
Gets the name that is used to identify the folder that contains a task.
Path
Read-only
Gets the path to where the folder is stored.

Examples

For more information and example code for this scripting object, see Time Trigger Example (Scripting), Event Trigger Example (Scripting), Daily Trigger Example (Scripting), Registration Trigger Example (Scripting), Weekly Trigger Example (Scripting), Logon Trigger Example (Scripting), Boot Trigger Example (Scripting), or Displaying Task Names and States (Scripting).

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 Objects

Task Scheduler