Thread: Postgres 9.2 beta2 one-click installer on windows

Postgres 9.2 beta2 one-click installer on windows

From
"Marc Watson"
Date:

Hi all,

Just a note that the 32 and 64-bit installers fail on windows 7 64-bit with the error ‘An error occurred executing the Microsoft VC++ runtime installer.’. The beta-1 32-bit installer works OK.

- Mark Watson

Re: Postgres 9.2 beta2 one-click installer on windows

From
Craig Ringer
Date:
On 06/07/2012 10:00 PM, Marc Watson wrote:

Hi all,

Just a note that the 32 and 64-bit installers fail on windows 7 64-bit with the error ‘An error occurred executing the Microsoft VC++ runtime installer.’. The beta-1 32-bit installer works OK.


Well, they fail on your particular Windows 7 install. They work fine everywhere I use them.

To find out why the MSVC++ runtime is failing to install on your machine you need to collect the installer log. See:

http://wiki.postgresql.org/wiki/Troubleshooting_Installation

--
Craig Ringer

Re: Postgres 9.2 beta2 one-click installer on windows

From
"Marc Watson"
Date:

Thanks, Craig

It was failing on vcredist_x86 and vcredist_x64, because I had newer versions installed (10.0.40219). After uninstalling them, all is OK.

Mark Watson

 

De : Craig Ringer [mailto:ringerc@ringerc.id.au]
Envoyé : June-08-12 1:35 AM
À : Marc Watson
Cc : pgsql-general@postgresql.org
Objet : Re: [GENERAL] Postgres 9.2 beta2 one-click installer on windows

 

On 06/07/2012 10:00 PM, Marc Watson wrote:

Hi all,

Just a note that the 32 and 64-bit installers fail on windows 7 64-bit with the error ‘An error occurred executing the Microsoft VC++ runtime installer.’. The beta-1 32-bit installer works OK.


Well, they fail on your particular Windows 7 install. They work fine everywhere I use them.

To find out why the MSVC++ runtime is failing to install on your machine you need to collect the installer log. See:

http://wiki.postgresql.org/wiki/Troubleshooting_Installation

--
Craig Ringer

Re: Postgres 9.2 beta2 one-click installer on windows

From
Craig Ringer
Date:
On 06/08/2012 08:04 PM, Marc Watson wrote:

Thanks, Craig

It was failing on vcredist_x86 and vcredist_x64, because I had newer versions installed (10.0.40219). After uninstalling them, all is OK.


Oooh! That shouldn't happen. At all. The vc redists should, as far as I know, either:

(a) Silently skipping installation and returning success; or
(b) installing themselves into WinSxS whether or not a newer version exists already

They absolutely should not be failing. Can you please post your installation logs?

--
Craig Ringer

Re: Postgres 9.2 beta2 one-click installer on windows

From
"Marc Watson"
Date:

De : Craig Ringer [mailto:ringerc@ringerc.id.au]
Envoyé : June-08-12 9:20 AM

On 06/08/2012 08:04 PM, Marc Watson wrote:

Thanks, Craig

It was failing on vcredist_x86 and vcredist_x64, because I had newer versions installed (10.0.40219). After uninstalling them, all is OK.


Oooh! That shouldn't happen. At all. The vc redists should, as far as I know, either:

(a) Silently skipping installation and returning success; or
(b) installing themselves into WinSxS whether or not a newer version exists already

They absolutely should not be failing. Can you please post your installation logs?

--
Craig Ringer

 

Here it is:

 

Log started 06/08/2012 at 07:48:00

Preferred installation mode : qt

Trying to init installer in mode qt

Mode qt successfully initialized

Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.2 Data Directory. Setting variable iDataDirectory to empty value

Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.2 Base Directory. Setting variable iBaseDirectory to empty value

Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.2 Service ID. Setting variable iServiceName to empty value

Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.2 Service Account. Setting variable iServiceAccount to empty value

Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.2 Super User. Setting variable iSuperuser to empty value

Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.2 Branding. Setting variable iBranding to empty value

Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.2 Version. Setting variable brandingVer to empty value

Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.2 Shortcuts. Setting variable iShortcut to empty value

Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.2 DisableStackBuilder. Setting variable iDisableStackBuilder to empty value

[07:48:04] Existing base directory:

[07:48:04] Existing data directory:

[07:48:04] Using branding: PostgreSQL 9.2

[07:48:04] Using Super User: postgres and Service Account: postgres

[07:48:04] Using Service Name: postgresql-x64-9.2

Executing cscript //NoLogo "C:\Users\Mark Watson\AppData\Local\Temp\prerun_checks.vbs"

Script exit code: 0

 

Script output:

The scripting host appears to be functional.

 

Script stderr:

 

Executing C:\Users\Mark Watson\AppData\Local\Temp\postgresql_installer\vcredist_x64.exe /q

Script exit code: 5100

 

Script output:

 

Script stderr:

Program ended with an error exit code

 

Error running C:\Users\Mark Watson\AppData\Local\Temp\postgresql_installer\vcredist_x64.exe /q : Program ended with an error exit code

 

When I ran the vcredist_x64.exe without any parameters, it complained that it could not be installed because there was a newer version already installed.

 

-          Mark Watson

Re: Postgres 9.2 beta2 one-click installer on windows

From
Craig Ringer
Date:
(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

Re: Postgres 9.2 beta2 one-click installer on windows

From
"Marc Watson"
Date:

De : Craig Ringer [mailto:ringerc@ringerc.id.au]
Envoyé : June-09-12 3:50 AM

(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 originally had version 10.0.40219 installed in both 32 and 64 bit,  which gave me the error. I uninstalled these versions just to get around the 9.2 beta2 install, which installed 10.0.30319.01.

 

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.

That was probably the case, since it’s a new computer.


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

Mark Watson

Re: Postgres 9.2 beta2 one-click installer on windows

From
Sachin Srivastava
Date:
[CCed the list]

On Tue, Jun 12, 2012 at 12:33 PM, Sachin Srivastava <sachin.srivastava@enterprisedb.com> wrote:

On Tue, Jun 12, 2012 at 12:31 PM, Craig Ringer <ringerc@ringerc.id.au> wrote:
On 06/11/2012 08:36 PM, Marc Watson wrote:

*De :*Craig Ringer [mailto:ringerc@ringerc.id.au]



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 originally had version 10.0.40219 installed in both 32 and 64 bit,  which gave me the error. I uninstalled these versions just to get around the 9.2 beta2 install, which installed 10.0.30319.01.


OK, so that confirms it. The Pg installer needs to have an updated redist bundled when the final version is released, and needs to treate error 5100 as success.

I have updated the redist and modified the installer to not treat 5100 as error (we already handle 3010 return code properly).

I am in the process of testing the changes. 


--
Craig Ringer



--
Regards,
Sachin Srivastava
EnterpriseDB, India



--
Regards,
Sachin Srivastava
EnterpriseDB, India

Re: Postgres 9.2 beta2 one-click installer on windows

From
"Marc Watson"
Date:

Original message:

 

De : pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] De la part de Marc Watson
Envoyé : June-11-12 8:36 AM
À : Craig Ringer
Cc : pgsql-general@postgresql.org; dpage@pgadmin.org; sachin.srivastava@enterprisedb.com
Objet : Re: [GENERAL] Postgres 9.2 beta2 one-click installer on windows

 

De : Craig Ringer [mailto:ringerc@ringerc.id.au]
Envoyé : June-09-12 3:50 AM

(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 originally had version 10.0.40219 installed in both 32 and 64 bit,  which gave me the error. I uninstalled these versions just to get around the 9.2 beta2 install, which installed 10.0.30319.01.

 

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.

That was probably the case, since it’s a new computer.


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

Mark Watson

 

Just for a follow-up, the 9.2 beta-3 install is behaving correctly.

-Mark