title: Strange symbols stopping my batch file running in VB.net
body: <p>I am trying to create and run a batch file from VB.net, then get the output and print it out. But when it runs it is appended by these symbols '´╗┐. Causing this error '´╗┐cd' is not recognized as an internal or external command, operable program or batch file. When I look at the batch file in notepad++ there is no symbol there! What is happening! Thanks James.</p>
  
  <p>Code: </p>
  
  <pre><code>    Dim path As String = Directory.GetCurrentDirectory()
      Dim command As String = "cd " &amp; path &amp; " &amp; " &amp; argument
  
      MsgBox(command)
  
      Dim file As System.IO.StreamWriter
      file = My.Computer.FileSystem.OpenTextFileWriter(tempFile, False)
      file.WriteLine("@ECHO OFF")
      file.WriteLine(command)
      file.Close()
  
      Dim objProcess As New Process()
      Dim SROutput As System.IO.StreamReader
  
      With objProcess.StartInfo
          .FileName = tempFile
          .RedirectStandardOutput = True
          .UseShellExecute = False
          .Arguments = ""
      End With
      objProcess.Start()
      SROutput = objProcess.StandardOutput
  
      Do While SROutput.Peek &lt;&gt; -1
          'MessageBox.Show(SROutput.ReadLine)
          rtbOutput.Text = rtbOutput.Text &amp; SROutput.ReadLine &amp; vbNewLine
      Loop
      objProcess.Dispose()
  
      'Process.Start(tempFile)
      rtbOutput.Text = rtbOutput.Text &amp; message &amp; vbNewLine
  </code></pre>