BUG #12802: Error running loadmodules.vbs while installation

From: gis(dot)dur(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #12802: Error running loadmodules.vbs while installation
Date: 2015-02-25 05:30:52
Message-ID: 20150225053052.2536.30387@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 12802
Logged by: gis_dur
Email address: gis(dot)dur(at)gmail(dot)com
PostgreSQL version: 9.4.1
Operating system: Windows7(64bit)
Description:

Does "other external projects should not be reported here" apply to
installation scripts? Sorry if I have mistaken where to report...

* Short description
Error running loadmodules.vbs while installation

* The exact sequence of steps
(1) Download 'postgresql-9.4.1-1-windows-x64.exe'
(2) Run the exe
(3) Set the admin password (user:postgres) something that contains more than
one '%'s, or a '<', or a '>'. Example: =%1234%>
(4) Leave every other option by default, go next, go next...

* The output I got
On the installer, it says a 'non-Fatal' error occurred.
In the 'install-postgresql.log', it says the following:
Executing cscript //NoLogo "C:\Program
Files\PostgreSQL\9.4\installer\server\loadmodules.vbs" "postgres" "****"
"C:\Program Files\PostgreSQL\9.4" "C:\Program Files\PostgreSQL\9.4\data"
5432
Script exit code: 2
Failed to install the 'adminpack' module in the 'postgres' database
Error running cscript //NoLogo "C:\Program
Files\PostgreSQL\9.4\installer\server\loadmodules.vbs" "postgres" "****"
"C:\Program Files\PostgreSQL\9.4" "C:\Program Files\PostgreSQL\9.4\data"
5432: Program ended with an error exit code

* The output I expected
The 'adminpack' gets intalled with no errors.

* Any command line options and other start-up options
None

* Anything I did at all differently from the installation instructions
As I wrote above, it fails when I use more than one '%'s, or a '<', or a '>'
for the admin password.

* The PostgreSQL version
9.4.1

* Platform information
Windows 7 Home Premium (64 bit) Service Pack 1
This is my first install to this PC.
(Below) I don't think it matters, but just in case...
locale: jp (japan)
CPU: Intel Core i7-2860QM @ 2.50GHz
RAM: 4.00GB (using around 40%-60% while installation)
Microsoft Visual C++ 2005 Redistributable 8.0.61001
Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.17
Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.4148
Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.6161
Microsoft Visual C++ 2008 Redistributable - x86 9.0.21022
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30411
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.17
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4148
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161
Microsoft Visual C++ 2010 x64 Redistributable - 10.0.40219
Microsoft Visual C++ 2012 Redistributable (x64) - 11.0.61030
Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.21005

* Other information
I think there are at least two points needed to be fixed in
'loadmodules.vbs'
(1) Line 23: regExp.Pattern = "[%]"
Needs to set a flag "g" for the regExp object to replace all '%'s to '%%',
not only once.
(2) Line 42: objBatchFile.WriteLine "SET PGPASSWORD=" &
strFormattedPassword
Needs to escape special characters for bat files (like '<' or '>') by
inserting '^' before them.

I guess the same thing goes to 'startupcfg.vbs', but for me, this script was
run by "NT AUTHORITY\NetworkService", so the password wasn't used, therefore
no error occurred.

* Postscript
As a workaround, I did the "CREATE EXTENSION adminpack;" manually, and there
seems to be no problem; no need to hurry, no need to reply.
Keep up the good work!

Browse pgsql-bugs by date

  From Date Subject
Next Message seongsu.yun 2015-02-25 07:53:21 BUG #12803: the download link is wrong.
Previous Message kyle.sletmoe 2015-02-24 22:52:35 BUG #12801: data_directory postgresql.conf setting is not honored on Centos 6.6