I'm trying to capture the output from other applications. Capturing the output from ping works well. The variable output contains the expected output.
var p = new Process();
p.StartInfo.FileName = "ping";
p.StartInfo.Arguments = "www.google.com";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
var output = p.StandardOutput.ReadToEnd();
p.WaitForExit();
But when I use this code for capturing the output of expdp (which is an oracle tool for exports), the variable is empty. Runnig the same command in the console will return some output.
p.StartInfo.FileName = "expdp";
p.StartInfo.Arguments = "help=y";
Am I missing something ?