(CCing Dave Page & Sachin Srivastava who work on the installer):
Short version is that the Pg installer appears to need to:
- Include the latest release of the redist because there's a security
fix in it
- use /passive not /q when invoking it
- treat return 5100 as success
- swear at Microsoft for not documenting this
Continued below.
On 06/08/2012 11:55 PM, Marc Watson wrote:
Executing C:\Users\Mark
Watson\AppData\Local\Temp\postgresql_installer\vcredist_x64.exe /q
Script exit code: 5100
Is there any chance you can get the version of the currently installed
MSVC++ redistributible(s) on your computer? They're listed in programs
and features in the control panel.
I suspect you have a newer version of the same general version (eg 2010
SP1) of the VC++ redist installed, and rather than silently ignore the
newer version it's failing.
This appears to be a fairly common issue. It's even encountered by the
Visual C++ IDE installer its self. The short-term workaround appears to
be for the Pg installer to ignore error code 5100. Longer term, I'd like
a way to tell the VC++ redist "don't be stupid, just silently take no
action if a newer version is present."
We should also probably be using "/passive /norestart" not "/q
/norestart" when invoking the installer, since that lets the redist
display useful error messages to the user but doesn't demand interaction
from them.
BTW, exit code 3100 ("succeeded but a reboot is required) should also be
handled if it isn't already.
People are using some scary workarounds, like:
http://notepad.patheticcockroach.com/1666/installing-visual-c-2010-and-windows-sdk-for-windows-7-offline-installer-and-installation-troubleshooting/
(Warning: comments are content-free zone full of me-too, plus people not
understanding what the redist does, confusing the installation of the
runtime for the us of VC++ with the "install redistributables" option
that copies them for _you_ to use in _your_ software, etc).
Also:
http://ta.speot.is/2012/04/09/visual-studio-2010-sp1-windows-sdk-7-1-install-order/
http://social.microsoft.com/Forums/en/crm/thread/db84d4c3-c58e-4ff9-997f-f4e0116bf043
http://blogs.msdn.com/b/astebner/archive/2010/10/20/10078468.aspx
BTW, IBM seems to install the redist as:
|vcredist_x86.exe /q /c:"msiexec /i vcredist.msi /qn /l*v
%temp%\vcredist_x86.log"|
... not sure why yet.
--
Craig Ringer