If you have a scheduled task and the task's program/script path has quotations in it, the library isn't returning a proper path using the Path() property (ie. it's keeping the quotations).
Dim execActionPath As String
If taskObject.Definition.Actions.Count = 1 Then
execActionPath = DirectCast(taskObject.Definition.Actions(0), TaskScheduler.ExecAction).Path
End If
As a workaround to this issue I added this to my code...If execActionPath.Contains(Chr(34)) = True Then
execActionPath = execActionPath.Replace(Chr(34), "")
End If