[Mono-list] External processes and Paths

Rob Brown-Bayliss uncertain.genius at gmail.com
Sat Sep 23 03:47:58 EDT 2006

Hi, I am having a path problem when running an external process.  The
problem is that the application I am atempting to start is in the path
as given by the error, but then it suggests I check the path.

Here is the error:

ApplicationName='gconftool-2 ', CommandLine=' -a /apps/',
Check the path.

And locate shows:

[rob at localhost ~]$ locate gconftool-2
[rob at localhost ~]$

And here is the offending code:

	Console.WriteLine ("===================");
	StringBuilder opts = new StringBuilder();
	opts.Append (" -a ");
	opts.Append (path);
	ProcessStartInfo gconftool = new ProcessStartInfo();
	gconftool.FileName = "gconftool-2 ";
	gconftool.Arguments = opts.ToString();
	gconftool.RedirectStandardOutput = true;
	gconftool.UseShellExecute = false;
	Console.WriteLine ("starting");
	Process process = Process.Start (gconftool);
	Console.WriteLine ("redirecting");
	System.IO.StreamReader output = process.StandardOutput;
	Console.WriteLine ("waiting");
	Console.WriteLine (output.ReadToEnd());

Does any one have an idea as to why this is failing and where I could
start looking?



More information about the Mono-list mailing list