[Mono-list] command line apps from ASP.NET

Kornél Pál kornelpal at hotmail.com
Fri Jul 22 09:56:07 EDT 2005

> But when: GACRead.StartInfo.Arguments = " -l | grep Version=1;
> It returns nothing. Same result regardless of what is grep'd for.

The | character is used to redirect the output of one command to another. It
is not an argument for the executable it is interpreted by the shell.

Also note that you are using UseShellExecute = true (default) in the first
example while you are using UseShellExecute = false in the second example.
The first one works because it will execute the shell and pass both FileName
and Arguments to the shell as the arguments.

I think you should put the entire command line to FileName and use
UseShellExecute = true (default).


More information about the Mono-list mailing list