title: Running an exe from C# with arguments that have spaces in
body: <p>I am scratching my head with this one.  I am trying to run an exe from C# using system.diagnostics but it isnt passing over my arguments correctly so the exe falls over.</p>
  
  <p>It splits the path after the word 'here' (see below) because of the space in it.</p>
  
  <p>Does anyone know how I can get round this without renaming the directory (which isn't an option for me)</p>
  
  <p><strong>This works from command line:</strong></p>
  
  <p>"C:\Users\me\Desktop\myexternalexe\myexternalexe.exe" comments “\192.168.1.1\a\here is the problem\c\d\"</p>
  
  <p><strong>This doesn't from with in Visual Studio:</strong></p>
  
  <pre><code>Process myexternalexe = new Process();
  
  myexternalexe.StartInfo.FileName = @"C:\Users\me\Desktop\myexternalexe\myexternalexe.exe";
  myexternalexe.StartInfo.Arguments = @"comments \\192.168.1.1\a\here is the problem\c\d\";
  
  myexternalexe.Start();
  </code></pre>