TaskFolderDeleteTask Method
Deletes a task from the folder.
Namespace: Microsoft.Win32.TaskSchedulerAssembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.1
public void DeleteTask(
string name,
bool exceptionOnNotExists = true
)
Parameters
- name String
-
The name of the task that is specified when the task was registered. 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.
- exceptionOnNotExists Boolean (Optional)
- Set this value to false to avoid having an exception called if the task does not exist.