[Mono-list] Capturing output from Linux Command Line
programs
Jonathan Gilbert
2a5gjx302 at sneakemail.com
Tue Aug 16 13:03:56 EDT 2005
At 01:20 PM 16/08/2005 +0100, Chris Aitken chris-at-ion-dreams.com
|mono-list subscription| wrote:
>Tracy,
>
>If you need help with this, shout (I wrote it).
>
>> public class GACReader
>> {
>> private static void Main()
>> {
>> System.Diagnostics.Process GACRead;
>>
>> GACRead = new System.Diagnostics.Process();
>> GACRead.StartInfo.FileName = "gacutil";
>> GACRead.StartInfo.Arguments = " -l | grep Version=1";
>> GACRead.StartInfo.UseShellExecute = true;
>> GACRead.StartInfo.RedirectStandardOutput = false;
Shouldn't this read "... = true;" ?
>> GACRead.Start();
>>
>> contents = GACRead.StandardOutput.ReadToEnd();
>>
>> GACRead.WaitForExit();
>> GACRead.Close();
>> }
>>
>> }
Jonathan Gilbert
More information about the Mono-list
mailing list