Old 28th July 2006, 20:09   #1
yugo45
Junior Member
 
Join Date: Jul 2006
Posts: 2
Postgres Silent Install Failure

Part of my installer executes a PostgreSQL silent installer.

The line of code that does this looks like this:
code:
execWait "MSIEXEC /i $\"postgresql-8.1-int.msi$\" /qb ADDLOCAL=server, nls, postgis, pljava, psql, pgadmin, jdbc, npgsql, psqlodbc, pgoledb, includefiles, libfiles, msvclibs, pgxs, binfiles INTERNALLAUNCH=1 DOSERVICE=1 CREATESERVICEUSER=0 DOINITDB=1 SERVICEDOMAIN=$\"%COMPUTERNAME%$\" SERVICEACCOUNT=$\"postgres$\" SERVICEPASSWORD=$\"randompass1$\" SERVICENAME=$\"PostgreSQL Database Server 8.1$\" SUPERUSER=$\"postgres$\" SUPERPASSWORD=$\"randompass2$\" LOCALE=C ENCODING=SQL_ASCII LISTENPORT=5432 PERMITREMOTE=1 PL_PGSQL=1 PL_PERL=1 PL_PERLU=1 PL_TCL=0 PL_TCLU=0 PL_PYTHONU=0 PL_JAVA=1 BASEDIR=$\"$INSTDIR\PostgreSQL\8.1$\""

When I run this line of code (minus the execWait) directly in the cmd window it works fine. However when ran from the nullsoft installer the Postgres installer starts up and then throws an error saying: "User account □□□□□□□s□□□□\□□□□□W does not exist"

So it seems that for some reason nullsoft installer messes with the command line arguments of msiexec, and instead of reading "postgres" as the user it uses a random unknown string (always the same one).

Any ideas why this happens?

Thanks.
yugo45 is offline   Reply With Quote
Old 4th October 2007, 07:08   #2
ginglese
Junior Member
 
Join Date: Jul 2006
Posts: 42
hi,

i have the same issue, have you find the solution ?

guillaume
ginglese is offline   Reply With Quote
Old 4th October 2007, 15:49   #3
yugo45
Junior Member
 
Join Date: Jul 2006
Posts: 2
It's been a long time since I worked on this, but if I remember well I didn't manage to get that particular line of code working. Instead, I placed that code into a batch file, and then I called that batch file from the installer. So in the installer script I had:

ExecWait "silentPostgresInstall.bat"

I hope that helps. It worked for me.
yugo45 is offline   Reply With Quote
Old 5th October 2007, 07:59   #4
ginglese
Junior Member
 
Join Date: Jul 2006
Posts: 42
Thanks !
In fact, i have tried this method before your answer and it works.I was curious to know if there were "better" solutions, seems not.

thanks again.
ginglese is offline   Reply With Quote
Old 5th October 2007, 08:07   #5
Wizou
Senior Member
 
Join Date: Aug 2007
Location: Paris, France
Posts: 304
you can use Process Explorer to verify the command line passed by NSIS installer to MsiExec process
Wizou is offline   Reply With Quote
Old 20th November 2007, 12:25   #6
3point2
Junior Member
 
Join Date: Nov 2007
Posts: 3
I've had similar problems running a silent PostgreSQL install. The batch file workaround worked for me, although it would be great if this problem was fixed.

As a result of the batch file workaround, I then had to then figure out how to avoid a command prompt window opening while the batch file ran (used nsExec).

A silent Java install runs with no problems from within NSIS. The error I would get from the postgresql install was "Internal account lookup failure. No mapping between account names and security IDs was done.", although in my efforts to get it to work I also stumbled on the error mentioned in the first post.

I can't figure out whether this is a problem in the postgresql installer or whether something about being run from within NSIS affects its attempts to create or administer the postgres system user.

Is there anyone who knows enough about NSIS internals to figure this one out?
3point2 is offline   Reply With Quote
Old 5th December 2007, 20:02   #7
nsisuser18
Junior Member
 
Join Date: Dec 2007
Posts: 2
Hello,
I have to do the postgres Install Using NSIS Installer.
I have to :
Uninstall postgres(If installed)
delete pguser(if account there)
Install postgres
add pguser to local group
stop postgres
start postgres
nsisuser18 is offline   Reply With Quote
Old 25th March 2008, 21:54   #8
acordner
Junior Member
 
Join Date: Mar 2008
Posts: 3
I am installing 8.1.4 on a Windows XP SP2 virtual machine (VMWare). It seems that if I specify BASEDIR=<path> in my command line, and <path> is NOT the default install path, I get the error "internal account lookup failure" immediately after the postgres user account is created. If I leave the BASEDIR statement out of the command line, the install succeeds.

When performing the initial installation, Simple File Sharing was enabled. My installation was disabling Simple File Sharing, but not until after the PostgreSQL install was complete. However, if I disable Simple File Sharing prior to installing PostgreSQL, I can specify a BASEDIR and I do not receive the error message indicated above.

Thus, it appears the Simple File Sharing setting interferes with the PostgreSQL installation's ability to set permissions on the \<BASEDIR> folder.

To disable Simple File Sharing, change the registry setting:

HKLM\SYSTEM\CurrentControlSet\Control\Lsa\forceguest = 0

Or uncheck the "Tools > Folder Options > View > Use simple file sharing" option from Windows Explorer.
acordner is offline   Reply With Quote
Old 26th March 2008, 22:27   #9
acordner
Junior Member
 
Join Date: Mar 2008
Posts: 3
After digging deeper, it seems that the Simple File Sharing setting is not the key to the problem. It has a lot to do with the SERVICEDOMAIN and BASEDIR settings.

- If I do not specify BASEDIR or SERVICEDOMAIN, the installation succeeds.

- If I specify BASEDIR but not SERVICEDOMAIN, the installation never succeeds regardless of the state of the Simple File Sharing setting.

- I have never been able to get the installation to succeed using SERVICEDOMAIN="%COMPUTERNAME%" - it fails every time with the same "Internal account lookup failure" error.

- If I specify SERVICEDOMAIN and pass the name of the computer as read from the Windows Registry (i.e. SERVICEDOMAIN="MYCOMPUTER"), I am also able to specify BASEDIR regardless of the state of the Simple File Sharing setting and the installation seems to succeed every time!

Hope this helps!
acordner is offline   Reply With Quote
Old 27th March 2008, 21:31   #10
acordner
Junior Member
 
Join Date: Mar 2008
Posts: 3
After more extensive testing on various operating systems (2K SP4, XP SP2, Server 2003, and Vista Business), here is information regarding the use of different "silent mode" switches in combination with the SERVICEDOMAIN and BASEDIR switches:


Using the command line: (do not specify SERVICEDOMAIN or BASEDIR)
msiexec /i "<path>\postgresql-8.1-int.msi" <UIType> INTERNALLAUNCH=1 SERVICEPASSWORD="<pwd>" CREATESERVICEUSER=1 SUPERPASSWORD="<pwd>" ENCODING=UTF8 ADDLOCAL=server,psql,pgadmin

where <UIType> =
/qr - install succeeds on 2K/XP/Server 2003/Vista
/qn - install fails on XP/Server 2003 (assumed "Internal account lookup failure" error)
/qb - install fails on 2K/XP/Server 2003 with "Internal account lookup failure" error



Using the command line: (specify both SERVICEDOMAIN and BASEDIR)
msiexec /i "<path>\postgresql-8.1-int.msi" <UIType> INTERNALLAUNCH=1 SERVICEDOMAIN="<ComputerName>" SERVICEPASSWORD="<pwd>" CREATESERVICEUSER=1 SUPERPASSWORD="<pwd>" ENCODING=UTF8 ADDLOCAL=server,psql,pgadmin BASEDIR="C:\PostgreSQL"

where <ComputerName> is setting read from Windows Registry and <UIType> =
/qr - install succeeds on 2K/XP/Vista but fails on Server 2003 with "Internal account lookup failure" error
/qn - install succeeds on XP but fails on Server 2003 (assumed "Internal account lookup failure" error)
/qb - install succeeds on 2K/XP but fails on Server 2003 with "Internal account lookup failure" error



Using the command line: (specify BASEDIR, do not specify SERVICEDOMAIN)
msiexec /i "<path>\postgresql-8.1-int.msi" <UIType> INTERNALLAUNCH=1 SERVICEPASSWORD="<pwd>" CREATESERVICEUSER=1 SUPERPASSWORD="<pwd>" ENCODING=UTF8 ADDLOCAL=server,psql,pgadmin BASEDIR="C:\PostgreSQL"

where <UIType> =
/qr - install succeeds on 2K/XP/Server 2003/Vista
/qn - install fails on XP/Server 2003 (assumed "Internal account lookup failure" error)
/qb - install fails on 2K/XP/Server 2003 with "Internal account lookup failure" error
acordner is offline   Reply With Quote
Old 5th September 2008, 02:08   #11
thready
Junior Member
 
Join Date: Sep 2008
Posts: 1
I have tried to run the same silent installer on the command line - without ever using NSIS - and I get the exact same error - "User account â–¡â–¡â–¡â–¡â–¡â–¡â–¡sâ–¡â–¡â–¡â–¡\â–¡â–¡â–¡â–¡â–¡W does not exist". This looks more like a Postgres .msi installer problem - not an NSIS problem..... Has anyone solved this problem?
thready is offline   Reply With Quote
Old 9th June 2009, 12:50   #12
ginglese
Junior Member
 
Join Date: Jul 2006
Posts: 42
Thready,

i know it's a late answer but here is my one cents:

Do not create the user account thanks to Posgresql installer.
Do it by hand in a batch file.

For exemple :
net user postgres password /passwordreq:yes /PASSWORDCHG:no /add

Guillaume
ginglese is offline   Reply With Quote
Old 22nd October 2011, 16:59   #13
vengaboy
Junior Member
 
Join Date: Oct 2011
Posts: 11
How to uninstall postgres

Hi all, I had install postgresql server in nsis in silent mode and i want to uninstall it from the installer,
How
vengaboy is offline   Reply With Quote
Old 22nd October 2011, 19:48   #14
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 543
Send a message via ICQ to T.Slappy
Answer is here: http://forums.winamp.com/showthread....=1#post2812056

Cool looking installers with custom design: www.graphical-installer.com
Design NSIS setup Pages easily: www.install-designer.com
Build NSIS installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 28th October 2011, 19:05   #15
kalverson
Senior Member
 
Join Date: May 2007
Location: Maple Grove, Minnesota
Posts: 134
Our experience with the create user was that the password for the new postgresql user was not passing the domain password policy.
kalverson is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump