[Mono-list] Starting processes with parameters from Mono 0.31 and mono-0.31.99.20040331

Gonzalo Paniagua Javier gonzalo@ximian.com
Thu, 01 Apr 2004 15:58:45 +0200


On Thu, 2004-04-01 at 15:36, Vadim B. Guzev wrote:
> Hello!
> 
> 
> I've seen somewhere in the list before (but I can't find this letter now,
> when I really need it :( ) that someone had problems with starting processes
> with parameters from Mono 0.31. Was this problem solved?
> 
> I have the same problem now, as even the following simple application
> doesn't work anymore in Mono 0.31 (it worked correctly in Mono 0.29):
> 8<----------------------------------------------------------
> using System;
> using System.Diagnostics;
> 
> class ProcessStart {
>  static void Main(string[] args) {
>   Console.Out.WriteLine("Trying to start: 'mono --version'");
>   ProcessStartInfo psi = new ProcessStartInfo();
>   psi.FileName = "mono";
>   psi.Arguments = "--version";
> 
>   Process p = new Process();
>   p.Start( psi );
>  }
> }

add:

	psi.UseShellExecute = false;

and it will work.

-Gonzalo