PostgreSQL Install Fail in Windows 10 (icacls error / access denied)

I tried installing both postgresql-10.10-1-windows-x64 and postgresql-11.5-1-windows-x64 on Windows 10 x64. Got the similar error.

Try downloading postgresql-11.2-1-windows-x64 from the following official link: https://get.enterprisedb.com/postgresql/postgresql-11.2-1-windows-x64.exe

Hope this helps.


This happened to me as well. Turned out I couldn't use a Domain user (even though it is an admin on the local machine). I had to log in as a local admin user, and then the installation worked. This is very weird.


I tried installing Postgresql-9.5.19.1-windows-x64 version (downloaded from official page) on Windows 10 x64 and it gave me the same error. I tried executing it with administrator privileges, giving permissions to the temp folder, moving temp folder to another location but nothing worked...

The solution for me was using a different version of 9.5: PostgreSQL-9.5.2-1-windows-x64.