Equivalent to Process.Start() without separate arguments
.net, c#, command-line, process
Solution
Why don't you just run everything through cmd /C?
Process.Start("cmd", "/C " + command);
Problem
I'm writing a simple application that's required to run arbitrary commands, for example: ``` powershell -File myscript.ps1 cmd /C "ping localhost" ``` Process.Start() would be perfect except it requires the arguments be given as a separate parameter. Initially I thought I could just split the string on the first space character, but then what if the executable path is quoted and contains spaces? Is there something like Process.Start() which allows you to just give it a string, with or without arguments, and just have it execute it as if it was pasted to a command prompt?