[ADMIN] Windows Dependency Issue

2007-01-04 Thread Peter Egan
Hello,

We have a windows-based server that uses postgres (8.1) as the db. We use a 
'silent install' to install postgres as a windows service. Our server is then 
installed as a service with a dependency on postgres.

As seen in other posts, to ensure that postgres starts up before the server 
starts, one should use the pg_ctl command with the '-w' flag. When installed as 
a service, the '-w' flag isn't set. 

My question - is there a way to set this '-w' flag through the silent install 
process? Or is there another way to accomplish this without requiring the user 
to set this after the installation process?

Any help would be appreciated.

Thanks,
Pete


Re: [ADMIN] Windows Dependency Issue

2007-01-04 Thread Andy Shellam (Mailing Lists)

Hello Pete,

There is certainly a Windows command you can run that will alter the 
command used to start a service - it's "sc" (which can also be used to 
start/stop a service programmatically.)

The command syntax to modify the EXE path is:

sc config  binpath= ""

(eg.)
sc config "PostgreSQL Database Server " binpath= "C:\Program 
Files\PostgreSQL\bin\"


If it's successful, you'll get the message: "[SC] ChangeServiceConfig 
SUCCESS"


Also note there's a space between "binpath=" and the EXE name - that 
took me a while to figure out!


Hope this can be of use.

Andy.

Peter Egan wrote:

Hello,
 
We have a windows-based server that uses postgres (8.1) as the db. We 
use a 'silent install' to install postgres as a windows service. Our 
server is then installed as a service with a dependency on postgres.
 
As seen in other posts, to ensure that postgres starts up before the 
server starts, one should use the pg_ctl command with the '-w' 
flag. When installed as a service, the '-w' flag isn't set.
 
My question - is there a way to set this '-w' flag through the silent 
install process? Or is there another way to accomplish this without 
requiring the user to set this after the installation process?
 
Any help would be appreciated.
 
Thanks,

Pete
 
!DSPAM:37,459d40d631947254553576! 



--
Andy Shellam
NetServe Support Team

the Mail Network
"an alternative in a standardised world"

p: +44 (0) 121 288 0832/0839
m: +44 (0) 7818 000834


---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org