From: | "Andy Shellam (Mailing Lists)" <andy(dot)shellam-lists(at)mailnetwork(dot)co(dot)uk> |
---|---|
To: | Peter Egan <peter(dot)egan(at)senetric(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Windows Dependency Issue |
Date: | 2007-01-04 18:37:48 |
Message-ID: | 459D497C.3080506@mailnetwork.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Ben K. | 2007-01-04 23:31:10 | Re: Dump and Query (fwd) |
Previous Message | Peter Egan | 2007-01-04 17:52:45 | Windows Dependency Issue |