title: C# and OpenSSL executable
body: <p>A friend of mine, at work came to me and asked why he can't run that code properly.</p>
  
  <pre><code>using System.Diagnostics;
  
  namespace ConsoleApplication1
  {
      class Program
      {
          static void Main(string[] args)
          {
              ProcessStartInfo startInfo = new ProcessStartInfo();
              string processExecutable = "C:\\OpenSSL-Win32\\bin\\openssl.exe";
  
              startInfo.FileName = processExecutable;
              startInfo.Arguments = @"genrsa -out Prvkey.key";
  
              startInfo.UseShellExecute = false;
              startInfo.RedirectStandardOutput = true;
              startInfo.RedirectStandardError = true;
              startInfo.RedirectStandardInput = true;
              startInfo.CreateNoWindow = true;
  
              Process.Start(startInfo);
          }
      }
  }
  </code></pre>
  
  <p>when he uses the openSSL.exe, regularly, clicking in the .exe and puts the instructions <strong><em>"genrsa -out Prvkey.key"</em></strong>, it works fine. So its not the instructions itself, but how to pass.
  Any ideas?</p>