ProcessStartInfo psi = new ProcessStartInfo("cmd.exe");
psi.CreateNoWindow = false;
psi.UseShellExecute = false;
psi.RedirectStandardInput = true;
psi.RedirectStandardOutput = true;
psi.RedirectStandardError = true;
psi.WorkingDirectory = "C:";
System.Diagnostics.Process process = System.Diagnostics.Process.Start(psi);
string sCommandLine = "echo test| gpg -es --passphrase-fd 0 --recipient jatinvmehta@gmail.com -o c:\test.gpg c:\test.txt";
process.StandardInput.WriteLine(sCommandLine);
process.StandardInput.Flush();
process.StandardInput.Close();
process.WaitForExit();
process.Close();
Same command run succesfully from commandline. I don't understand what is the problem.
Thanks in advance.