From: Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
To: Peter Egan <peter.egan@senetric.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Windows Dependency Issue
Date: Thu, 04 Jan 2007 18:37:48 +0000
Message-ID: <459D497C.3080506@mailnetwork.co.uk> (raw)
In-Reply-To: <003501c73029$24632c20$4a01a8c0@EganNotebook>
References: <003501c73029$24632c20$4a01a8c0@EganNotebook>
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 <service name> binpath= "<path to EXE>"
(eg.)
sc config "PostgreSQL Database Server <version>" binpath= "C:\Program
Files\PostgreSQL\bin\<postmaster EXE and flags>"
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: andy.shellam-lists@mailnetwork.co.uk, peter.egan@senetric.com
Subject: Re: Windows Dependency Issue
In-Reply-To: <459D497C.3080506@mailnetwork.co.uk>
References: <003501c73029$24632c20$4a01a8c0@EganNotebook> <459D497C.3080506@mailnetwork.co.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox