I'm trying to figure out the best way to add new tasks that are painless for the user but I'm running into an issue with my code where the Task Name can't be changed
Here is my code:
Here is my code:
Public Sub newTask()
Dim td As TaskDefinition = _tskSrvc.NewTask
td.RegistrationInfo.Description = ""
td.Actions.Add(New ExecAction("notepad.exe", "c:\test.log"))
' Register the task in the root folder
_rootFolder.RegisterTaskDefinition("New Task Service Monitor Task", td)
Dim dlg As New TaskEditDialog(_rootFolder.Tasks("New Task Service Monitor Task"), True, True)
If dlg.ShowDialog() = vbCancel Then
_rootFolder.DeleteTask("New Task Service Monitor Task")
End If
End Sub
But when the dialog box pops up I would like the user to be able to change the Task name but even with the task as editable it does not allow for this. Is there anyway to over this? Thanks