I am using the following code to open the .exe and then I would like to pass another argument to it:
ProcessStartInfo StartInfo = new ProcessStartInfo();
StartInfo.FileName = "cmd.exe";
StartInfo.Arguments = @"/k set inetroot=c:\depot&set corextbranch=surfacert_v2_blue_kit&c:\depot\tools\path1st\myenv.cmd";
Process.Start(StartInfo);`
Which opens up the window as below.
Now I also need to pass "sd sync dirs" which gives me some result and would like to capture the result to a variable.
To accomplish this I need to pass two agruments in the ProcessStartInfo.Arguments. How can I add this second argument in the above code to take care of everything in C# code.