title: Getting Database cluster error while installing PostgreSql 12 on Windows 10
body: <p>When I tried to install PostgreSql 11/12 on my windows machine I was getting the below error : </p>
  
  <p><strong>Error while initializing database cluster</strong></p>
  
  <p><img src="https://i.stack.imgur.com/laMWy.png" alt="Screenshot of the error"></p>
  
  <p>Below are the details - 
  Port No - 5432
  Installation Location - I have tried installing it in C:/ProgramFiles and also directly in C drive
  Password - test123 
  I am running the installer as administrator
  I have access to Temp directory as well.
  I have tried moving data folder outside of the main folder.
  Below are the solutions I have tried -</p>
  
  <ul>
  <li><a href="https://postgresrocks.enterprisedb.com/t5/PostgreSQL/Installing-PostgreSQL-12-on-Windows-fails-when-initialising-the/td-p/4511/" rel="nofollow noreferrer">Sol 1</a></li>
  <li><a href="https://stackoverflow.com/questions/32453451/postgres-installation-the-database-cluster-initialization-failed-postgresql-ve">Sol 2</a></li>
  </ul>
  
  <p>Below is the error in log file:</p>
  
  <pre class="lang-none prettyprint-override"><code>Error running cscript //NoLogo "C:\pg/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Users\u6105742\AppData\Local\Temp/postgresql_installer_2714a75545" "C:\pg" "C:\pg\data" 5432 "DEFAULT" 0: Program ended with an error exit code
  Problem running post-install step. Installation may not complete correctly
  The database cluster initialisation failed.
  Executing icacls "C:\Users\u6105742\AppData\Local\Temp/postgresql_installer_e172900ce0" /inheritance:r Script exit code: 0
  </code></pre>
  
  <p>Could someone please help me in this issue?</p>