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/',
CurrentDirectory='',
PATH='/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/rob/bin'.
Check the path.
And locate shows:
[rob at localhost ~]$ locate gconftool-2
/usr/bin/gconftool-2
/usr/share/man/man1/gconftool-2.1.gz
[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");
process.WaitForExit();
Console.WriteLine (output.ReadToEnd());
Does any one have an idea as to why this is failing and where I could
start looking?
thanks
--
Rob