title: Silent initdb.exe postgresql
body: <p>I am trying to install postgresql on a server using a bat file. I am using initdb.exe with --pwfile option so that it picks up the password form a text file and continues...</p>
  
  <p>for some reason, even with --pwfile option, it is still prompting me for a password.. Not sure what the problem is.. This is the script I am using:</p>
  
  <pre><code>set DBPATH = something 
  set DBADMIN = something 
  
  set DBDATA = something
  
  RunAs /noprofile /user:%computername%\postgres ""%DBPATH%\initdb.exe" --locale=C --encoding=UTF-8 -U %DBADMIN% --pwfile="D:\Pass.txt" -D "%DBDATA%"" 
  </code></pre>
  
  <p>Thanks</p>