Can't install PostgreSQL: An error occurred executing the Microsoft VC++ runtime installer on Windows XP
One of the reasons this can happen is because the installer attempts to install an older version of the VC++ runtime than what you are currently using.
See this installation log, found in your user's temporary directory (e.g. dd_vcredist_amd64_20190214193107.log
):
[20C0:20E4][2019-02-14T19:31:07]e000: Error 0x80070666: Cannot install a product when a newer version is installed.
A workaround is to prevent the runtimes from installing with the --install_runtimes
option:
postgresql-9.6.12-1-windows-x64.exe --install_runtimes 0
-
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:
- Create a shortcut of your EXE file;
-
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 :)
I was having a similar issue and found a fix that worked for me from Garrett_H in this forum post:
http://forums.enterprisedb.com/posts/list/1747.page#6180
Go to file %windir%\inf\wsh.inf, right click and select 'Install'
re-run postgresql installer
I'm running Windows XP Pro, and I was trying to install postgresql-8.3.17-1-windows.exe
. I originally received the following error:
An error occurred executing the Microsoft C++ runtime installer.
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.