I\'ve been trying to install the 64bit version of PostgreSQL 9.2 for Windows on my machine (Windows 7 64bit) and get this error:
The environment variable COMPS
Open Environment Variables, you can do this on Windows 7 by typing environment variables
in the Search program and files bar when pressing the start button at the bottom left of the desktop. And create a new System Variable(in the 'System Variable' instead of 'User Variable' section).
In the variable name, enter ComSpec
and then in the variable value , enter C:\Windows\system32\cmd.exe
.
That's all. Hope it works! Alternative fix:
If you already got the ComSpec
variable in the System Variable section, remove the ;
at the end of it this should fix it.
Just open Advanced System Settings in Control Panel and create a new System Variable( in the System Variable
instead of User Variable
section).
In the variable name, enter ComSpec
and then in the variable value , enter C:\Windows\system32\cmd.exe
.
If you have already the ComSpec
variable in the System Variable section, remove the ;
at the end of it this should fix it.
I got the same problem, and i found in the log:
Script stderr: 'C:\Users\S300' is not recognized as an internal or external command, operable program or batch file.
Error running C:\Users\S300 (i5)\AppData\Local\Temp/postgresql_installer_56caeadbd6/temp_check_comspec.bat : 'C:\Users\S300' is not recognized as an internal or external command, operable program or batch file.
I change in User Variables TEMP to D:\TEMP and TMP to D:\TEMP. And Solved My Problem.
I had a similar problem. After installation, the data folder contained no postgres.conf file. It only contained a single folder named "pg_log". I described the solution that I used here: Postgres Installation Error reading file postgresql.conf
Basically, it would be helpful to check if the user has full permissions for the postgres folder, and run "init_db" and "pg_ctl start" commands again. If the path contains a space character, try using a relative path for the pg_ctl data folder argument.
In my case , the Installer was in %USERPROFILE%\DownloadsP{ Windows download folder}, I moved the installer to desktop and ran again. weird it worked lol.