Sourabh Somani

Sourabh Somani

  • Tech Writer
  • 47.6k
  • 10.8m

How to pass multiples arguments in processStartInfo

Apr 16 2014 6:10 AM
I want to run some cmd command from c# code. So I am using process class like as following:
 
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.FileName = "CMD";
p.StartInfo.Arguments = "/C IPCONFIG.....";//  here I want to pass multiple arguments but how can I pass multiple aruments please give me any idea about it.
 
I want to pass like p.StartInfo.Arguments = "/C IPCONFIG Tree".
 

Answers (4)