title: Using Writeline to create a batch file
body: <p>Trying to use the code below to use writeline to create a batch file. However it seems that the third line won't run in a batch file due to the spaces in the file path. I have tried to enclose in "" "" but that creates 6 new errors. Thanks I am new to this just trying to make some sense. After searching the web the just can't seem to find a solution. </p>
  
  <pre><code>StreamWriter w = new StreamWriter(@"C:\temp\InstallAgent.bat");
  w.WriteLine("C:\\temp\\framepkg.exe /install=agent /silent");
  w.WriteLine("C:\\PRogram Files\\McAfee\\Common Framework\\cmdagent.exe /p");
  w.Close();
  </code></pre>