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 Initialising the database cluster (this may take a few minutes)... Executing cscript //NoLogo "E:\Postgres/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "E:\Postgres" "E:\Postgres\data" 5432 "DEFAULT" 0 Script exit code: 127 Script output: Script stderr: Program ended with an error exit code Error running cscript //NoLogo "E:\Postgres/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "E:\Postgres" "E:\Postgres\data" 5432 "DEFAULT" 0: Program ended with an error exit code Problem running post-install step. Installation may not complete correctly The script was called with an invalid command line Creating Uninstaller Creating uninstaller 25% Creating uninstaller 50% Creating uninstaller 75% Creating uninstaller 100% Installation completed Log finished 11/28/2018 at 14:18:57 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. Please advise.
... View more