<p>Okay, in that case can you post the stack trace and error message?</p>
<p>Thanks,<br>
Spink.</p>
<div class="gmail_quote">On Feb 21, 2012 10:28 PM, "? ?" <<a href="mailto:bmwfreak007@hotmail.com">bmwfreak007@hotmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><div dir="ltr">
hi<br><br>yes true, i forgot that, but i dont think thats the problem. because without that processstartinfo, streamwriter writes it in the homefolder and gives no error. <div><div></div><hr>Date: Tue, 21 Feb 2012 14:01:47 +0000<br>
Subject: Re: [Mono-dev] starting process in Linux environment<br>From: <a href="mailto:tspink@gmail.com" target="_blank">tspink@gmail.com</a><br>To: <a href="mailto:bmwfreak007@hotmail.com" target="_blank">bmwfreak007@hotmail.com</a><br>
<br>Are you on Linux or Windows? You're running a Linux program, but have a Windows path in your StreamWriter!<br>
There's your problem!<br>
Spink.<br>
<div>On Feb 21, 2012 1:59 PM, "pattex007" <<a href="mailto:bmwfreak007@hotmail.com" target="_blank">bmwfreak007@hotmail.com</a>> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">
thank you for your answer<br>
<br>
  Process procNetAdapters = new Process();<br>
<br>
        ProcessStartInfo startInfo = new<br>
ProcessStartInfo("/bin/bash");<br>
        startInfo.Arguments = "-c 'ifconfig | grep \\'inet<br>
addr:\\''";<br>
        startInfo.UseShellExecute = false;<br>
        startInfo.RedirectStandardOutput = true;<br>
        startInfo.CreateNoWindow = true;<br>
<br>
        procNetAdapters.StartInfo = startInfo;<br>
        procNetAdapters.Start();<br>
        file = new System.IO.StreamWriter(@"c:\" + setLogName +<br>
".log", true);<br>
<br>
      using (StreamReader r = procNetAdapters.StandardOutput)<br>
        {<br>
          string line;<br>
          // string removedLine;<br>
          while ((line = r.ReadLine()) != null)<br>
          {<br>
            file.WriteLine(line);<br>
<br>
          }<br>
<br>
        }<br>
<br>
      file.Close();<br>
      procNetAdapters.Close();<br>
<br>
if i run this i get an error with stacktrace<br>
<br>
--<br>
View this message in context: <a href="http://mono.1490590.n4.nabble.com/starting-process-in-Linux-environment-tp4406870p4407088.html" target="_blank">http://mono.1490590.n4.nabble.com/starting-process-in-Linux-environment-tp4406870p4407088.html</a><br>


Sent from the Mono - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Mono-devel-list mailing list<br>
<a href="mailto:Mono-devel-list@lists.ximian.com" target="_blank">Mono-devel-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
</blockquote></div></div>                                       </div></div>
</blockquote></div>