The command I am trying to run in VB .net is as follows:
Shell("sc query > " & Chr(34) & "C:\Dir Name\ServicesRunning.txt" & Chr(34))
The Directory name has spaces and needs to keep them. I have output that code to a label and it reads exactly as it should:
sc query > "C:\Dir Name\ServicesRunning.txt"
Why Isn't it working? I really don't want to resort to my stop gap solution of running an external batch file to execute the command.