title: OpenVPN --auth-user-pass FILE option on Windows
body: <p>If you try to pass the username/password to OpenVPN from a file via the --auth-user-pass switch, you get the following error:</p>
  
  <pre><code>"Sorry, 'Auth' password cannot be read from a file."
  </code></pre>
  
  <p>At least they're polite.</p>
  
  <p>So our workaround was to programmatically write to "standard in" when we get the Auth Username: and Auth Password: prompts (this is in C#).</p>
  
  <p>Something with the timing isn't 100% reliable, so I was looking for a way to pass the credentials to OpenVPN in a different way and came across this post: <a href="http://forum.mikrotik.com/viewtopic.php?f=2&amp;t=26211" rel="nofollow noreferrer">OpenVPN Post</a></p>
  
  <p>It says you can recompile the source with a --enable-password-save option.  Has anyone been able to do this?</p>
  
  <p>My final question is: How can I pass an auth username/password to openvpn.exe on the client side?  And does OpenVPNGUI somehow do this (maybe we can copy what they do)?     </p>