Im having trouble getting the list of scheduled tasks for some servers where the scheduled tasks are located C:WINDOWS\System32\Tasks, the following code works if the scheduled tasks are located C:\WINDOWS\Tasks, how do I get the list of schedules tasks if they are located in the different folder?
Dim oScheduledTasks As ScheduledTasks
Try : oScheduledTasks = New ScheduledTasks("\\axisdev02")
Catch ex As Exception
End Try
Dim arrTasks() As String
Dim oTask As Task
arrTasks = oScheduledTasks.GetTaskNames
For Each t In arrTasks
oTask = oScheduledTasks.OpenTask(t)
Console.WriteLine("Name : " & oTask.Name)
Next
Console.ReadKey()