Hi guys, I'm working with the below code to create a scheduled task and then bring up the properties window of that task. It has no trouble creating the task and loading the properties window, however any changes I make within that properties window is ignored. The code doesn't set a trigger for the task to run, so I click the triggers tab and set a date and time for it to begin, I then OK the window. If I then open up task scheduler and double click on my new task, the triggers tab is empty. Even if I enter in a description, it doesn't keep it.
Not sure what I'm doing wrong?
Using ts As TaskService = New TaskService
' Create a new task definition and assign properties
Dim td As TaskDefinition = ts.NewTask
td.RegistrationInfo.Description = "Does something"
' Add an action (shorthand) that runs Notepad
td.Actions.Add(New ExecAction("notepad.exe", "c:\test.log"))
' Register the task in the root folder
Dim TaskName As String = "Test"
Dim EditorForm As New TaskEditDialog()
Dim t As Task
t = ts.GetTask(TaskName)
EditorForm.Editable = True
If EditorForm.ShowDialog = Windows.Forms.DialogResult.Cancel Then