I downloaded installer postgresql-9.0.1-1-windows.exe from the official site, ran it, and then got an error:
An error occurred executing the Microsoft VC+
right click on the shortcut → add --install_runtimes 0
at the end of the target path, e.g.:
postgresql-9.3.1-1-windows-x64.exe --install_runtimes 0
save and run it :)
In my case, when I was installing postgresql-11.0-1-windows-x64.exe
on Windows 10, I had faced the same problem.
I just uninstalled the Microsoft Visual C++ Redistributable (the latest one for both 32 and 64 bit) and then tried to install postgresql-11.0-1-windows-x64.exe
again, and it worked for me.
Windows Script Host (WSH) is unable to execute VBScript scripts. This can occur if the scripting host is disabled (which is unusual), or if the installation is broken. A sign of this problem is a message like
CScript Error: Can't find script engine "VBScript" for script "C:....
It can often be resolved by re-registering the VBScript interpreter, click Start * → * Run and enter the following and click OK:
regsvr32 %systemroot%\system32\vbscript.dll
Take special care that your Windows user's folder name does not contain spaces. PostgreSQL (as of version 9.2.2.1) handles that poorly. If I use this account on Windows XP, installation fails with the "An error occurred executing the Microsoft C++ runtime installer" message:
"C:\Documents and settings\Jimmy (admin)"
But it runs just fine with this:
"C:\Documents and settings\Jimmy-admin"
The spaces in "Documents and settings" don't seem to bother the installer. Go figure.
I too faced the same issue. I fixed it in the following way:
In one word, just try to install the latest version.
Create a shortcut of the downloaded file:
Right click of the shortcut → Properties → Shortcut. Add --install_runtimes 0 to the end of the file path: