I have used following piece of code to execute schtasks command from VB6. While executing it, ignores folder if they contains spaces. For example, \"C:\
schtasks
\"C:\
Another example:
Dim myPath As String = """" & Path.Combine(part1, part2) & """"
Good luck!