title: How to extract a rar file in C#?
body: <p>I want to extract .rar files using cmd shell so I wrote this code:</p>
  
  <pre><code>string commandLine = @"c:\progra~1\winrar\winrar e  c:\download\TestedU.rar c:\download";
  ProcessStartInfo PSI = new ProcessStartInfo("cmd.exe");
  PSI.RedirectStandardInput = true;
  PSI.RedirectStandardOutput = true;
  PSI.RedirectStandardError = true;
  PSI.UseShellExecute = false;
  Process p = Process.Start(PSI);
  StreamWriter SW = p.StandardInput;
  StreamReader SR = p.StandardOutput;
  SW.WriteLine(commandLine);
  SW.Close(); 
  </code></pre>
  
  <p>The first time it worked fine, the second time it displayed nothing.</p>