[Mono-devel-list] bug in System.Diagnostics.Process

Marcus mathpup at mylinuxisp.com
Sun Mar 21 18:03:55 EST 2004

There was a bug, and then a fix, and then a possible new bug, as well as some 
confusion about how the ProcessStartInfo.UseShellExecute property should 
affect Linux.

Under Windows, I'm told that with UseShellExecute=true (the default), 
Process.Start(...) can be used both to run binaries or to open documents. So 
passing "mydocument.pdf" as the fileName will cause Windows to attempt to 
launch the file using, say, Acroread. Gonzalo was working about on this 
yesterday, I believe, but I'm not sure what the resolution was.

This might be in bug #55866, but Bugzilla seems to be down at the moment.

For now, try something like this:

ProcessStartInfo psi = new ProcessStartInfo ("ls", "-la");
psi.UseShellExecute = false;
 Process.Start (psi);

On Sunday 21 March 2004 9:13 pm, Borja Sánchez Zamorano wrote:
> Hello, I try this code and it run correctly:
>   System.Diagnostics.Process.Start("mini.exe");
> and try this and run correctly:
>   System.Diagnostics.Process.Start("mono");
> but, I try this and only run mono without arguments
>   System.Diagnostics.Process.Start("mono","mini.exe");  // I want this ->
> "mono mini.exe" System.Diagnostics.Process.Start("mono","--profile
> mini.exe");  // I want this -> "mono --profile mini.exe"

More information about the Mono-devel-list mailing list