EnterpriseDB: The Enterprise Postgres Company EDB Postgres Forums: The PostgreSQL Open Source Database from EnterpriseDB
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 

Error with initdb and postgres.exe causing installation to fail  XML

Forum Index » PostgreSQL Installers for Windows, Linux and OS X
Author Message

New member

Joined: 15 Jan 2010 17:04:58
Messages: 1


I have been trying to install Postgres 8.4.2 on a Windows 7 64 bit machine and after trying several different permission changes on the installation folders and what not I still keep getting this error in the install-postgresql.log during the installation and my installation is failing.

Any ideas on what I am doing wrong?

Senior member

Joined: 28 Jan 2009 23:23:25
Messages: 184
Location: Andhra Pradesh,India

Check if windows scripting host (WSH) is enabled or not. If WSH script enabled, the Windows Script Host Settings dialog box will popup. If disabled, try to enable the WSH.

Please find more information for WSH using below link:-


And also possibility to getting this error, if wscript is enabled but there's no engine associated with .vbs files. For fixing this issue

Go to file %windir%\inf\wsh.inf, right click and select 'Install'

re-run postgresql installer and it will work successfully.

Thanks & Regards,

Raghu Ram
skypeID: raghu.ramedb

EnterpriseDB Corporation

[Email] [WWW]

New member

Joined: 11 May 2010 02:19:18
Messages: 1

Thie problem also bothered me long time.

the initdb action will use _popen function to invoke a new process postgres.exe.
in _popen function, the environment COMSPEC is used when call CreateProcess.

in default, the value of COMSPEC is c:\windows\system32\cmd.exe, but sometimes, the value was changed to "c:\windows\system32" which cause CreateProcess failed.

after change value of COMSPEC to the right value (c:\windows\system32\cmd.exe), the postres server can be installed successfully

New member

Joined: 18 Nov 2012 23:50:49
Messages: 3

Thank you. Your post was immensely useful.

I've seen this issue in the wild and have now written it up for others to try to make it easier to find:



I would really like to see the installer test for this as well as all the other windows broken-ness it checks for.
Forum Index » PostgreSQL Installers for Windows, Linux and OS X
Go to:   
Powered by JForum 2.1.8 © JForum Team