Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.
Hello Everybody, I am trying to develop a GUI wrapper over CVS.exe using C# by executing all the cvs commands with System.Diagnostics.Process class. Could execute most of the commands successfully except password related commands. Executing the "ls" command is successfull, but not able to write the password to the standardInput stream. How does cvs interpret password characters other than normal commands? Please help me to resolve this issue. Thanks in advance. private void SetPassword() { p = new Process(); StreamWriter sw; StreamReader sr; StreamReader err; p.StartInfo.EnvironmentVariables.Add("CVSROOT",":pserver:raju:vignesh at gia4f163:/BTT"); p.StartInfo.FileName="cmd"; p.StartInfo.RedirectStandardError=true; p.StartInfo.RedirectStandardInput=true; p.StartInfo.RedirectStandardOutput=true; p.StartInfo.UseShellExecute=false; p.StartInfo.CreateNoWindow=false; p.Start(); sw = p.StandardInput; sr = p.StandardOutput; err = p.StandardError; sw.AutoFlush = true; //sw.WriteLine("cvs ls"); //code to list the modules in the cvs repository sw.WriteLine("cvs login"); //code to login sw.WriteLine("aa"); // *Error* // not able to write the password to the stream sw.WriteLine("aa"); sw.Flush(); char[] c = null; string str1 = ""; //code to read the standard output and display it in Textbox. while (sr.Peek() >= 0) { c = new char[5]; sr.Read(c, 0, c.Length); string str = new string(c); str1 += str; } sw.Close(); textBox1.Text = str1; char[] c1 = null; string str2 = ""; while (err.Peek() >= 0) { c1 = new char[5]; err.Read(c1, 0, c1.Length); string str = new string(c1); str2 += str; } textBox1.Text += str2; } Thanks, Vignesh