Re: start service with parameters on restart
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Wed, 20 Aug 2008 16:53:23 +0200
It probably would (as you can easily find out for yourself . . .)
but running sc.exe is much less intrusive than rebooting a server!
"exotericist" <nospamthanks@xxxxxxxxxxx> wrote in message
news:5C47CFD1-B050-4AA2-A82D-C6DEEE185D5D@xxxxxxxxxxxxxxxx
if you're saying that the changes aren't reflected in the service manager
only, would restarting the machine make them so?
thanks,
e
"Pegasus (MVP)" wrote:
It appears that the service start process won't recognise any changes
made directly to the registry. You can probably get around the problem
by following this sequence:
1. Use sc.exe to disable the service.
2. Make the registry change.
3. Use sc.exe to enable the service.
4. Start the service.
The syntax for sc.exe is as follows:
sc config NameOfService start= disabled
sc config NameOfService start= manual
The service name must be the short name, not the "DisplayName".
Note the space after the "=".
"exotericist" <nospamthanks@xxxxxxxxxxx> wrote in message
news:8BBC9468-CFDC-4A51-9848-890E10CC4B2B@xxxxxxxxxxxxxxxx
sorry, i was leaving the office, i should have put more detail in.
the parameter is a port number, to which the client connects.
(a small complication is that if two services come up with the same
port
number both are broken and the machine needs to be restarted)
if a service is started with no parameters, either automatically or by
clicking start in the service manager, it uses the default port 1526.
starting the service with a parameter of "-nIS1527" tells the service
to
use
port 1527 instead.
i applied your suggested change, adding the parameter to the image path
and
starting the service.
when i tried to communicate with the service on the non-default port it
wouldn't.
i could communicate over port 1526, though, suggesting that the
parameter
was not being passed.
thus "no joy."
"Pegasus (MVP)" wrote:
"No joy" sounds great but you need to be just a little more
specific, perhaps by posting
- What exactly you did with your parameters;
- How you checked what you did with your parameters;
- What you did with your service;
- How you determined that it did not work.
"exotericist" <nospamthanks@xxxxxxxxxxx> wrote in message
news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@xxxxxxxxxxxxxxxx
tried it, no joy.
e.
"Pegasus (MVP)" wrote:
Plug the parameter into ImagePath field via regedit, then start the
service.
Example:
ImagePath="C:\Program Files\RealVNC\WinVNC\winvnc.exe" -nIS1527
"exotericist" <nospamthanks@xxxxxxxxxxx> wrote in message
news:45F80102-91F7-4E59-8D44-CBE77170142F@xxxxxxxxxxxxxxxx
specifically, i need to start the service as if i'd typed
"-nIS1527"
in
the
"Start Parameters" textbox.
i can't see how that relates to the W32Time registry keys.
many thanks,
e.
"Pegasus (MVP)" wrote:
"exotericist" <nospamthanks@xxxxxxxxxxx> wrote in message
news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@xxxxxxxxxxxxxxxx
i'm charged with maintaining an application which has multiple
listener
services.
the first service can be set to auto.
subsequent services need to be passed a parameter to start.
in 2003 i've used sc.exe to pass a parameter to a service on
startup
and
this works fine. i could set it so that the services were
started
by
the
act
of logging in.
however, i'd like the services to come up automatically on
restart
without
the need for user intervention, since that's what services are
supposed
to
do.
my question is, therefore, the one in the title:
how can i start a service in windows server 2003 on machine
restart
and
pass
it a parameter?
many thanks,
e.
Have a look at the Windows Time service. It starts automatically
at
boot
time and it uses parameters.
HKLM\SYSTEM\CurrentControlSet\Services\W32Time
.
- References:
- start service with parameters on restart
- From: exotericist
- Re: start service with parameters on restart
- From: Pegasus \(MVP\)
- Re: start service with parameters on restart
- From: exotericist
- Re: start service with parameters on restart
- From: Pegasus \(MVP\)
- Re: start service with parameters on restart
- From: exotericist
- Re: start service with parameters on restart
- From: Pegasus \(MVP\)
- Re: start service with parameters on restart
- From: exotericist
- Re: start service with parameters on restart
- From: Pegasus \(MVP\)
- Re: start service with parameters on restart
- From: exotericist
- start service with parameters on restart
- Prev by Date: ESENT Error
- Next by Date: Downgrading Licence from Enterprise to Standard Edition 2008 Serve
- Previous by thread: Re: start service with parameters on restart
- Next by thread: Re: start service with parameters on restart
- Index(es):
Relevant Pages
|