PostgreSQL install failing on Windows Server 2016

PostgreSQL install failing on Windows Server 2016

I am trying to install postgresql-9.6.10-1-windows-x64.exe (run as Administrator) on Windows Server 2016. It worked fine in QA env., but in staging env. (PROD like) its consistently failing while calling initcluster.vbs

When I purposely added writeline within the initcluster.vbs file (by replacing initcluster.vbs during the installation & before above command is called with my local copy of initcluster.vbs), i found arguments are reaching without double quotes and hence breaking up on space i.e., 1st arg become NT and 2nd arg become AUTHORITY\NetworkService, and hence total arguments count become more than 8.

Surprisingly, when I called above command via cmd.exe, it works just fine. I tried installing on various different locations like C:, %TEMP%, etc., but its giving same error everywhere. I also tried newer postgresql 10 and 11 installers as well, but same error is thrown by them too.

Not sure if has anything to do with "windows script hosting" registry, firewall settings or other windows settings.

Re: PostgreSQL install failing on Windows Server 2016

Hi Ninid,

Changing data directory didn't solve the problem.

Finally able to root caused it. "BeyondTrust PowerBroker for Windows Service" is somehow interfering with postgresql installation. It was causing double quotes to be removed from cscript command and hence failing installation.

We stopped "BeyondTrust PowerBroker for Windows Service" and postgresql installation completed without error.

Re: PostgreSQL install failing on Windows Server 2016

Hi Ninid,

Changing data directory didn't solve the problem.

Finally able to root caused it. "BeyondTrust PowerBroker for Windows Service" is somehow interfering with postgresql installation. It was causing double quotes to be removed from cscript command and hence failing installation.

We stopped "BeyondTrust PowerBroker for Windows Service" and postgresql installation completed without error.