title: C# Passing Multiple Arguments to BAT File
body: <p>I have this BAT file "iARP.BAT"</p>
  
  <pre><code>Content Begin
  @ECHO OFF
  npg -vv -f %1 -d %2
  Content End
  </code></pre>
  
  <p>And I'm trying to pass a file name (in a loop) as the first argument and device name (variable previously declared) as the second argument. I'm trying to do this:</p>
  
  <pre><code>for (int i = 1; i &lt; arpFiles.Count; i++) {
  
  p = new Process();
  p.StartInfo.UseShellExecute = false;
  p.StartInfo.RedirectStandardOutput = true;
  p.StartInfo.WorkingDirectory = Application.StartupPath;
  p.StartInfo.FileName = Application.StartupPath + "\\iARP.bat";
  String argument1 = Application.StartupPath + "\\" + arpFiles[0].Name;
  p.StartInfo.Arguments = argument1 + deviceName;
  p.StartInfo.Verb = "runas";
  p.StartInfo.CreateNoWindow = true;
  p.Start();
  }
  </code></pre>
  
  <p>BTW arpFiles = List
  but it is not executing can anyone help me with this?</p>