 | TaskFolderImportTask Method |
Imports a
Task from an XML file.
Namespace:
Microsoft.Win32.TaskScheduler
Assembly:
Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntaxpublic Task ImportTask(
string path,
string xmlFile,
bool overwriteExisting = true
)
Public Function ImportTask (
path As String,
xmlFile As String,
Optional overwriteExisting As Boolean = true
) As Task
public:
Task^ ImportTask(
String^ path,
String^ xmlFile,
bool overwriteExisting = true
)
Request Example
View SourceParameters
- path
- Type: SystemString
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
- Type: SystemString
The file containing the XML-formatted definition of the task. - overwriteExisting (Optional)
- Type: SystemBoolean
If set to , overwrites any existing task with the same name.
Return Value
Type:
TaskA
Task instance that represents the new task.
Exceptions
See Also