TaskFolderImportTask Method
Imports a
Task from an XML file.
Namespace: Microsoft.Win32.TaskSchedulerAssembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.1
public Task ImportTask(
string path,
string xmlFile,
bool overwriteExisting = true
)
- path String
- The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
- xmlFile String
- The file containing the XML-formatted definition of the task.
- overwriteExisting Boolean (Optional)
- If set to , overwrites any existing task with the same name.
TaskA
Task instance that represents the new task.