First, download unzip
1, download postgresql-9.4.0-1-windows-x64-binaries.zip
2, unzip postgresql-9.4.0-1-windows-x64-binaries.zip to E: \
Second, add users
1, add windows Span style= "font-family: Arial" > user, used to start postgresql windows
net user postgres pgsqlpw /add /expires:never /passwordchg:no
2, for security, this user is not allowed to log on locally
net localgroup users postgres /del
3, is assigned to windows Span style= "font-family: Arial" > user postgres Access postgresql permissions for the installation directory
CACLS . /t /e /p postgres:r
Third, initialize the database
1, switch to windows user postgres command-line environment
D:\PGSQL>RUNAS /NOPROFILE /ENV /USER:POSTGRES    cmd  
Note: With the Administrator account, the postgres account initialization, change the password on it.
2, initialize the database , If you do not use -u admin, The database automatically add the current Windows user ( i.e. postgres) is a database account
initdb.exe-d E:\postgresql-9.4.0-1-windows-x64\data-E UTF-8--locale=chs
3, start database
pg_ctl.exe -d e:\postgresql-9.4.0-1-windows-x64\data -l logfile Start
4, Stop the database
Pg_ctl.exe-d E:\postgresql-9.4.0-1-windows-x64\data Stop
Iv. registering as a Windows service
1, registered as a Windows service , the current windows user ( IE postgres) will act as a login user for the PostgreSQL service
Pg_ctl.exe register-d E:\postgresql-9.4.0-1-windows-x64\data-NPostgreSQL
2. start the PostgreSQL service
net start PostgreSQL
Postgresql 9.4.0 Win7 x64 decompression installation steps