ProcessStartInf o psi = new ProcessStartInf o("cmd.exe");
psi.CreateNoWin dow = false;
psi.UseShellExe cute = false;
psi.RedirectSta ndardInput = true;
psi.RedirectSta ndardOutput = true;
psi.RedirectSta ndardError = true;
psi.WorkingDire ctory = "C:";
System.Diagnost ics.Process process = System.Diagnost ics.Process.Sta rt(psi);
string sCommandLine = "echo test| gpg -es --passphrase-fd 0 --recipient jatinvmehta@gma il.com -o c:\test.gpg c:\test.txt";
process.Standar dInput.WriteLin e(sCommandLine) ;
process.Standar dInput.Flush();
process.Standar dInput.Close();
process.WaitFor Exit();
process.Close() ;
Same command run succesfully from commandline. I don't understand what is the problem.
Thanks in advance.
psi.CreateNoWin dow = false;
psi.UseShellExe cute = false;
psi.RedirectSta ndardInput = true;
psi.RedirectSta ndardOutput = true;
psi.RedirectSta ndardError = true;
psi.WorkingDire ctory = "C:";
System.Diagnost ics.Process process = System.Diagnost ics.Process.Sta rt(psi);
string sCommandLine = "echo test| gpg -es --passphrase-fd 0 --recipient jatinvmehta@gma il.com -o c:\test.gpg c:\test.txt";
process.Standar dInput.WriteLin e(sCommandLine) ;
process.Standar dInput.Flush();
process.Standar dInput.Close();
process.WaitFor Exit();
process.Close() ;
Same command run succesfully from commandline. I don't understand what is the problem.
Thanks in advance.
Comment