(Note: This question has been compeltely rewritten from its original form, so it reflects the actual problem and will help others find a solution to the same issue).
I still haven't been able to successfully install PostgreSQL on my Windows 7 Ultimate x64 computer. See this prior question for some history.
I did a fresh instillation of 9.2 and the only error I got was this one:
It reads:
"Problem running post-install step. Installation may not complete correctly. The database cluster initialisation failed".
This occurs even after I do a complete manual uninstall of PostgreSQL and pgAmdin-III:
- Ran the PostgreSQL uninstaller, which failed with the error
Error stopping service postgresql-x64-9.2
. - Removed all the PostgreSQL-related registry entries for PostgreSQL under
HKEY_LOCAL_MACHINE\SOFTWARE
andHKEY_CURRENT_USER\SOFTWARE
- Removed the
postgres
user account usingnet user postgres /delete
in an Administrator command prompt (shift-right clicked on "Command Prompt" in start menu, chose "Run as administrator") - Removed the
postgres
user profile - Deleted the
C:\Program Files\PostgreSQL\
directory, including the data directory within %appdata% - Removed some PgAdmin-III registry entries that pointed to PostgreSQL
- Removed the service account for postgres from
services.msc
When I reboot and try the installer again it fails with the same message.
The install-postgresql.log
file from %TEMP%
contains:
Executing cscript //NoLogo "C:\Program Files\PostgreSQL\9.2/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Program Files\PostgreSQL\9.2" "C:\Program Files\PostgreSQL\9.2\data" 5432 "DEFAULT"
Script exit code: 1
then another error a bit later:
creating template1 database in C:/Program Files/PostgreSQL/9.2/data/base/1 ... initdb: could not execute command ""C:/Program Files/PostgreSQL/9.2/bin/postgres.exe" --boot -x1 -F ": No error
See full installer log file download here.