Jump to content

start service with parameters on restart


Recommended Posts

Guest exotericist
Posted

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.

Guest Pegasus \(MVP\)
Posted

Re: start service with parameters on restart

 

 

"exotericist" <nospamthanks@hotmail.com> wrote in message

news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

> 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

Guest exotericist
Posted

Re: start service with parameters on restart

 

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@hotmail.com> wrote in message

> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

> > 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

>

>

>

Guest Pegasus \(MVP\)
Posted

Re: start service with parameters on restart

 

Plug the parameter into ImagePath field via regedit, then start the service.

Example:

 

ImagePath="C:\Program Files\RealVNC\WinVNC\winvnc.exe" -nIS1527

 

 

"exotericist" <nospamthanks@hotmail.com> wrote in message

news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

> 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@hotmail.com> wrote in message

>> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

>> > 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

>>

>>

>>

Guest exotericist
Posted

RE: start service with parameters on restart

 

many thanks, i'll try it and get back to you.

 

e.

 

"exotericist" wrote:

> 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.

Guest exotericist
Posted

Re: start service with parameters on restart

 

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@hotmail.com> wrote in message

> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

> > 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@hotmail.com> wrote in message

> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

> >> > 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

> >>

> >>

> >>

>

>

>

Guest Pegasus \(MVP\)
Posted

Re: start service with parameters on restart

 

"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@hotmail.com> wrote in message

news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@microsoft.com...

> 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@hotmail.com> wrote in message

>> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

>> > 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@hotmail.com> wrote in message

>> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

>> >> > 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

>> >>

>> >>

>> >>

>>

>>

>>

Guest exotericist
Posted

Re: start service with parameters on restart

 

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@hotmail.com> wrote in message

> news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@microsoft.com...

> > 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@hotmail.com> wrote in message

> >> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

> >> > 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@hotmail.com> wrote in message

> >> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

> >> >> > 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

> >> >>

> >> >>

> >> >>

> >>

> >>

> >>

>

>

>

Guest Pegasus \(MVP\)
Posted

Re: start service with parameters on restart

 

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@hotmail.com> wrote in message

news:8BBC9468-CFDC-4A51-9848-890E10CC4B2B@microsoft.com...

> 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@hotmail.com> wrote in message

>> news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@microsoft.com...

>> > 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@hotmail.com> wrote in message

>> >> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

>> >> > 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@hotmail.com> wrote in message

>> >> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

>> >> >> > 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

>> >> >>

>> >> >>

>> >> >>

>> >>

>> >>

>> >>

>>

>>

>>

Guest exotericist
Posted

Re: start service with parameters on restart

 

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@hotmail.com> wrote in message

> news:8BBC9468-CFDC-4A51-9848-890E10CC4B2B@microsoft.com...

> > 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@hotmail.com> wrote in message

> >> news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@microsoft.com...

> >> > 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@hotmail.com> wrote in message

> >> >> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

> >> >> > 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@hotmail.com> wrote in message

> >> >> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

> >> >> >> > 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

> >> >> >>

> >> >> >>

> >> >> >>

> >> >>

> >> >>

> >> >>

> >>

> >>

> >>

>

>

>

Guest Pegasus \(MVP\)
Posted

Re: start service with parameters on restart

 

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@hotmail.com> wrote in message

news:5C47CFD1-B050-4AA2-A82D-C6DEEE185D5D@microsoft.com...

> 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@hotmail.com> wrote in message

>> news:8BBC9468-CFDC-4A51-9848-890E10CC4B2B@microsoft.com...

>> > 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@hotmail.com> wrote in message

>> >> news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@microsoft.com...

>> >> > 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@hotmail.com> wrote in message

>> >> >> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

>> >> >> > 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@hotmail.com> wrote in message

>> >> >> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

>> >> >> >> > 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

>> >> >> >>

>> >> >> >>

>> >> >> >>

>> >> >>

>> >> >>

>> >> >>

>> >>

>> >>

>> >>

>>

>>

>>

Guest exotericist
Posted

Re: start service with parameters on restart

 

service start process won't recognise any changes made directly to the

registry

 

why, then, does the displayed "path to executable" change?

 

is this a bug?

 

 

"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@hotmail.com> wrote in message

> news:8BBC9468-CFDC-4A51-9848-890E10CC4B2B@microsoft.com...

> > 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@hotmail.com> wrote in message

> >> news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@microsoft.com...

> >> > 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@hotmail.com> wrote in message

> >> >> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

> >> >> > 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@hotmail.com> wrote in message

> >> >> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

> >> >> >> > 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

> >> >> >>

> >> >> >>

> >> >> >>

> >> >>

> >> >>

> >> >>

> >>

> >>

> >>

>

>

>

Guest Pegasus \(MVP\)
Posted

Re: start service with parameters on restart

 

Many applications and many Windows components read the

registry at startup time only. When you hack the registry directly

then you need to make them aware of the change. This is by

design.

 

 

"exotericist" <nospamthanks@hotmail.com> wrote in message

news:5A785C40-0E95-4010-BE0C-BC8AAC886283@microsoft.com...

>

service start process won't recognise any changes made directly to

> the

> registry

>

> why, then, does the displayed "path to executable" change?

>

> is this a bug?

>

>

> "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@hotmail.com> wrote in message

>> news:8BBC9468-CFDC-4A51-9848-890E10CC4B2B@microsoft.com...

>> > 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@hotmail.com> wrote in message

>> >> news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@microsoft.com...

>> >> > 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@hotmail.com> wrote in message

>> >> >> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

>> >> >> > 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@hotmail.com> wrote in message

>> >> >> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

>> >> >> >> > 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

>> >> >> >>

>> >> >> >>

>> >> >> >>

>> >> >>

>> >> >>

>> >> >>

>> >>

>> >>

>> >>

>>

>>

>>

Guest exotericist
Posted

Re: start service with parameters on restart

 

but that's not true.

 

opening the properties dialog displays the new values. it must have got them

by reading the registry.

 

or are you saying that there are two entirely separate processes at work,

one of which reads the registry in real time to display the values to the

user, and the other that applies the values it got when the application

started?

 

if so, that's beyond bad design and into wilful ineptitude.

 

 

"Pegasus (MVP)" wrote:

> Many applications and many Windows components read the

> registry at startup time only. When you hack the registry directly

> then you need to make them aware of the change. This is by

> design.

>

>

> "exotericist" <nospamthanks@hotmail.com> wrote in message

> news:5A785C40-0E95-4010-BE0C-BC8AAC886283@microsoft.com...

> >

service start process won't recognise any changes made directly to

> > the

> > registry

> >

> > why, then, does the displayed "path to executable" change?

> >

> > is this a bug?

> >

> >

> > "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@hotmail.com> wrote in message

> >> news:8BBC9468-CFDC-4A51-9848-890E10CC4B2B@microsoft.com...

> >> > 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@hotmail.com> wrote in message

> >> >> news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@microsoft.com...

> >> >> > 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@hotmail.com> wrote in message

> >> >> >> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

> >> >> >> > 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@hotmail.com> wrote in message

> >> >> >> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

> >> >> >> >> > 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

> >> >> >> >>

> >> >> >> >>

> >> >> >> >>

> >> >> >>

> >> >> >>

> >> >> >>

> >> >>

> >> >>

> >> >>

> >>

> >>

> >>

>

>

>

Guest Pegasus \(MVP\)
Posted

Re: start service with parameters on restart

 

See below.

 

"exotericist" <nospamthanks@hotmail.com> wrote in message

news:2808178F-0750-43BA-B95E-4EDA7CD0D836@microsoft.com...

> but that's not true.

>

> opening the properties dialog displays the new values. it must have got

> them

> by reading the registry.

*** Correct.

> or are you saying that there are two entirely separate processes at work,

> one of which reads the registry in real time to display the values to the

> user, and the other that applies the values it got when the application

> started?

*** Correct.

> if so, that's beyond bad design and into wilful ineptitude.

*** Maybe, but I consider it risky to make such a statement

*** without being fully aware of the underlying design constraints.

*** Keep in mind Microsoft's advice on registry hacks:

*** a) You make them at your own risk, and

*** b) You must reboot the machine to make them effective.

*** Anyway, I gave you an easy way to deal with the issue,

*** so why spend so much time on this minor point?

> "Pegasus (MVP)" wrote:

>

>> Many applications and many Windows components read the

>> registry at startup time only. When you hack the registry directly

>> then you need to make them aware of the change. This is by

>> design.

>>

>>

>> "exotericist" <nospamthanks@hotmail.com> wrote in message

>> news:5A785C40-0E95-4010-BE0C-BC8AAC886283@microsoft.com...

>> >

service start process won't recognise any changes made directly

>> > to

>> > the

>> > registry

>> >

>> > why, then, does the displayed "path to executable" change?

>> >

>> > is this a bug?

>> >

>> >

>> > "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@hotmail.com> wrote in message

>> >> news:8BBC9468-CFDC-4A51-9848-890E10CC4B2B@microsoft.com...

>> >> > 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@hotmail.com> wrote in message

>> >> >> news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@microsoft.com...

>> >> >> > 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@hotmail.com> wrote in message

>> >> >> >> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

>> >> >> >> > 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@hotmail.com> wrote in message

>> >> >> >> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

>> >> >> >> >> > 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

>> >> >> >> >>

>> >> >> >> >>

>> >> >> >> >>

>> >> >> >>

>> >> >> >>

>> >> >> >>

>> >> >>

>> >> >>

>> >> >>

>> >>

>> >>

>> >>

>>

>>

>>

Guest exotericist
Posted

Re: start service with parameters on restart

 

i've rebooted the server with the registry hack in place.

 

the service is still coming up listening on the default port and ignoring

the passed parameter.

 

"so why spend so much time on this minor point" you ask.

 

well, for a start your suggested solution does not work.

 

in addition, your explanation of why it didn't work was a load of rubbish.

if i change the value of ImagePath to a path that doesn't exist the service

manager applies the new value immediately and complains loudly.

 

which leaves me exactly where i started, except with fourteen levels of

nested comments going nowhere.

 

moving on, since i can start the service using sc.exe, is there a way to run

sc.exe at boot time without having to connect?

 

 

"Pegasus (MVP)" wrote:

> See below.

>

> "exotericist" <nospamthanks@hotmail.com> wrote in message

> news:2808178F-0750-43BA-B95E-4EDA7CD0D836@microsoft.com...

> > but that's not true.

> >

> > opening the properties dialog displays the new values. it must have got

> > them

> > by reading the registry.

> *** Correct.

>

> > or are you saying that there are two entirely separate processes at work,

> > one of which reads the registry in real time to display the values to the

> > user, and the other that applies the values it got when the application

> > started?

> *** Correct.

>

> > if so, that's beyond bad design and into wilful ineptitude.

> *** Maybe, but I consider it risky to make such a statement

> *** without being fully aware of the underlying design constraints.

> *** Keep in mind Microsoft's advice on registry hacks:

> *** a) You make them at your own risk, and

> *** b) You must reboot the machine to make them effective.

> *** Anyway, I gave you an easy way to deal with the issue,

> *** so why spend so much time on this minor point?

>

> > "Pegasus (MVP)" wrote:

> >

> >> Many applications and many Windows components read the

> >> registry at startup time only. When you hack the registry directly

> >> then you need to make them aware of the change. This is by

> >> design.

> >>

> >>

> >> "exotericist" <nospamthanks@hotmail.com> wrote in message

> >> news:5A785C40-0E95-4010-BE0C-BC8AAC886283@microsoft.com...

> >> >

service start process won't recognise any changes made directly

> >> > to

> >> > the

> >> > registry

> >> >

> >> > why, then, does the displayed "path to executable" change?

> >> >

> >> > is this a bug?

> >> >

> >> >

> >> > "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@hotmail.com> wrote in message

> >> >> news:8BBC9468-CFDC-4A51-9848-890E10CC4B2B@microsoft.com...

> >> >> > 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@hotmail.com> wrote in message

> >> >> >> news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@microsoft.com...

> >> >> >> > 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@hotmail.com> wrote in message

> >> >> >> >> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

> >> >> >> >> > 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@hotmail.com> wrote in message

> >> >> >> >> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

> >> >> >> >> >> > 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

> >> >> >> >> >>

> >> >> >> >> >>

> >> >> >> >> >>

> >> >> >> >>

> >> >> >> >>

> >> >> >> >>

> >> >> >>

> >> >> >>

> >> >> >>

> >> >>

> >> >>

> >> >>

> >>

> >>

> >>

>

>

>

Guest Pegasus \(MVP\)
Posted

Re: start service with parameters on restart

 

 

"exotericist" <nospamthanks@hotmail.com> wrote in message

news:918CFB1E-2B1D-4947-9DD0-1A57E699E300@microsoft.com...

> i've rebooted the server with the registry hack in place.

>

> the service is still coming up listening on the default port and ignoring

> the passed parameter.

>

> "so why spend so much time on this minor point" you ask.

>

> well, for a start your suggested solution does not work.

>

> in addition, your explanation of why it didn't work was a load of rubbish.

> if i change the value of ImagePath to a path that doesn't exist the

> service

> manager applies the new value immediately and complains loudly.

>

> which leaves me exactly where i started, except with fourteen levels of

> nested comments going nowhere.

>

> moving on, since i can start the service using sc.exe, is there a way to

> run

> sc.exe at boot time without having to connect?

 

A good method would be to show a small amount of appreciation

for the assistance you have received so far from a total stranger,

instead of showering him with criticism. Sometimes a little extra

effort is required to find a workable solution, which requires a degree

of good will and tolerance from both sides.

 

Since your expectations are quite high, I recommend that you lodge

a call with Microsoft. For a moderate fee an engineer will help you

solve your problem, with a guaranteed outcome.

Guest exotericist
Posted

Re: start service with parameters on restart

 

pointing out that your solutions do not work is not showering you with

criticism.

 

i have not criticised you at all.

 

it's now the end of day two and we still don't have anything near an answer.

 

what, apart from your time, do i have to be thankful to you for?

how, exactly, have you helped me?

in fact, by taking a thread for which you don't know the answer you've

potentially stopped someone who does from providing a solution.

 

 

 

"Pegasus (MVP)" wrote:

>

> "exotericist" <nospamthanks@hotmail.com> wrote in message

> news:918CFB1E-2B1D-4947-9DD0-1A57E699E300@microsoft.com...

> > i've rebooted the server with the registry hack in place.

> >

> > the service is still coming up listening on the default port and ignoring

> > the passed parameter.

> >

> > "so why spend so much time on this minor point" you ask.

> >

> > well, for a start your suggested solution does not work.

> >

> > in addition, your explanation of why it didn't work was a load of rubbish.

> > if i change the value of ImagePath to a path that doesn't exist the

> > service

> > manager applies the new value immediately and complains loudly.

> >

> > which leaves me exactly where i started, except with fourteen levels of

> > nested comments going nowhere.

> >

> > moving on, since i can start the service using sc.exe, is there a way to

> > run

> > sc.exe at boot time without having to connect?

>

> A good method would be to show a small amount of appreciation

> for the assistance you have received so far from a total stranger,

> instead of showering him with criticism. Sometimes a little extra

> effort is required to find a workable solution, which requires a degree

> of good will and tolerance from both sides.

>

> Since your expectations are quite high, I recommend that you lodge

> a call with Microsoft. For a moderate fee an engineer will help you

> solve your problem, with a guaranteed outcome.

>

>

>

Guest Pegasus \(MVP\)
Posted

Re: start service with parameters on restart

 

 

"exotericist" <nospamthanks@hotmail.com> wrote in message

news:6AB84B0D-1678-48CC-AD20-019BC6ECFEB0@microsoft.com...

> pointing out that your solutions do not work is not showering you with

> criticism.

>

> i have not criticised you at all.

>

> it's now the end of day two and we still don't have anything near an

> answer.

>

> what, apart from your time, do i have to be thankful to you for?

> how, exactly, have you helped me?

> in fact, by taking a thread for which you don't know the answer you've

> potentially stopped someone who does from providing a solution.

 

To me the phrase "your explanation of why it didn't work was a load of

rubbish" would well fall under the definition of "criticism". You don't

have to be thankful for anything but seeing that you're in a demanding

rather than a cooperative mood, I will not volunteer any more of my time

in trying to find a satisfactory solution to your problem. Good luck!

-

Guest exotericist
Posted

Re: start service with parameters on restart

 

the letters "MVP" suggest that you knwo something about your subject.

 

you gave me a solution which did not work.

you gave me two reasons why it did not work, both of which were untrue.

 

i admit that i could have phrased things a little less bluntly, but the

undelying meaning would have been the same.

 

i apologise if i have hurt your feelings.

 

i have a call in with oracle at the moment. one of our servers hangs for no

apparent reason. it's been running fine for six months, last tuesday it just

died. there are three pieces of software, third party, db and os, which are

all implicated. there are literally tens of thousands of variables one of

whose missetting could be causing this behaviour. for this reason i feel

confident that we will not get an answer and a rebuild will be inevitable.

that kind of question does not belong on a public forum.

 

my original question, though, is one that is ideally suited to such "open"

conditions. it's a very narrow question about the way stuff works. either

someone has done this before and knows the solution or they don't, and the

more people you ask the more likely you are to get an answer.

 

i am sorry i lost my temper. if, however, you don't want to get yelled at,

try not to make stuff up, at least make an attempt to actuallly be helpful or

hold you peace.

 

 

"Pegasus (MVP)" wrote:

>

> "exotericist" <nospamthanks@hotmail.com> wrote in message

> news:6AB84B0D-1678-48CC-AD20-019BC6ECFEB0@microsoft.com...

> > pointing out that your solutions do not work is not showering you with

> > criticism.

> >

> > i have not criticised you at all.

> >

> > it's now the end of day two and we still don't have anything near an

> > answer.

> >

> > what, apart from your time, do i have to be thankful to you for?

> > how, exactly, have you helped me?

> > in fact, by taking a thread for which you don't know the answer you've

> > potentially stopped someone who does from providing a solution.

>

> To me the phrase "your explanation of why it didn't work was a load of

> rubbish" would well fall under the definition of "criticism". You don't

> have to be thankful for anything but seeing that you're in a demanding

> rather than a cooperative mood, I will not volunteer any more of my time

> in trying to find a satisfactory solution to your problem. Good luck!

> -

>

>

>

Guest Monitor
Posted

Re: start service with parameters on restart

 

 

"exotericist" <nospamthanks@hotmail.com> wrote in message

news:8E5315B0-5CE0-4481-A449-82F482FB5D8E@microsoft.com...

> the letters "MVP" suggest that you knwo something about your subject.

>

> you gave me a solution which did not work.

> you gave me two reasons why it did not work, both of which were untrue.

>

> i admit that i could have phrased things a little less bluntly, but the

> undelying meaning would have been the same.

>

> i apologise if i have hurt your feelings.

>

> i have a call in with oracle at the moment. one of our servers hangs for

no

> apparent reason. it's been running fine for six months, last tuesday it

just

> died. there are three pieces of software, third party, db and os, which

are

> all implicated. there are literally tens of thousands of variables one of

> whose missetting could be causing this behaviour. for this reason i feel

> confident that we will not get an answer and a rebuild will be inevitable.

> that kind of question does not belong on a public forum.

>

> my original question, though, is one that is ideally suited to such "open"

> conditions. it's a very narrow question about the way stuff works. either

> someone has done this before and knows the solution or they don't, and the

> more people you ask the more likely you are to get an answer.

>

> i am sorry i lost my temper. if, however, you don't want to get yelled at,

> try not to make stuff up, at least make an attempt to actuallly be helpful

or

> hold you peace.

 

I have been following this thread with a degree of curiosity. There are

a few things that you appear to be blissfully unaware of:

- The respondents in this newsgroup are volunteers. They don't get paid

for the advice they provide.

- Pegasus has been a regular contributor for a long time. He may not always

get it right the first time but he usually perseveres until he finds a

solution.

- You don't bite the hand that feeds you.

- First you offer an apology, then you follow it immediately with a lecture

for Peg how to behave when talking to you.

This thread is a perfect illustration of how to shoot yourself in the foot.

Peg's advice for you to get paid assistance from Microsoft was probably

the best thing he said. You'd be at liberty to order these guys around -

until they hang up on you.

Guest exotericist
Posted

Re: start service with parameters on restart

 

keep quiet on subjects about which you know nothing isn't a lecture, it's

just sound advice.

 

i must admit that after i discovered the "some applications only read the

registry at startup and that's just the way things are" was more than a bit

wrong i've been trolling somewhat.

 

for someone to feel their way into a problem that has a single, narrow

solution is pretty unacceptable. either you know it or you don't.

 

had you, monitor, known the solution, would you have interrupted peg to give

it, or would you have stood back out of courtesy?

 

by replying to a question he didn't know the answer to and then giving wrong

information in defence of his non-solution he gave up any right to that,

although the way you defend him you don't seem to see it.

 

just because you think you're helping doesn't mean you are. if you're not

then people have no obligation to be grateful.

 

you say you've been following this closely: have i been wrong in my analysis

of the suggested solutions?

 

i accept that i could have been less abrasive and for that i am genuinely

sorry. it is not my intention to insult. i hope i have been careful to point

my criticism at the solution and not its giver. my first instinct is always

to yell "you are an idiot! you know nothing!" but, in this instance, i tried

to rein it in.

 

as far as microsoft employees goes, they've pretty much always provided an

immediate solution, so i have no experience of being rude to them.

 

 

"Monitor" wrote:

>

> "exotericist" <nospamthanks@hotmail.com> wrote in message

> news:8E5315B0-5CE0-4481-A449-82F482FB5D8E@microsoft.com...

> > the letters "MVP" suggest that you knwo something about your subject.

> >

> > you gave me a solution which did not work.

> > you gave me two reasons why it did not work, both of which were untrue.

> >

> > i admit that i could have phrased things a little less bluntly, but the

> > undelying meaning would have been the same.

> >

> > i apologise if i have hurt your feelings.

> >

> > i have a call in with oracle at the moment. one of our servers hangs for

> no

> > apparent reason. it's been running fine for six months, last tuesday it

> just

> > died. there are three pieces of software, third party, db and os, which

> are

> > all implicated. there are literally tens of thousands of variables one of

> > whose missetting could be causing this behaviour. for this reason i feel

> > confident that we will not get an answer and a rebuild will be inevitable.

> > that kind of question does not belong on a public forum.

> >

> > my original question, though, is one that is ideally suited to such "open"

> > conditions. it's a very narrow question about the way stuff works. either

> > someone has done this before and knows the solution or they don't, and the

> > more people you ask the more likely you are to get an answer.

> >

> > i am sorry i lost my temper. if, however, you don't want to get yelled at,

> > try not to make stuff up, at least make an attempt to actuallly be helpful

> or

> > hold you peace.

>

> I have been following this thread with a degree of curiosity. There are

> a few things that you appear to be blissfully unaware of:

> - The respondents in this newsgroup are volunteers. They don't get paid

> for the advice they provide.

> - Pegasus has been a regular contributor for a long time. He may not always

> get it right the first time but he usually perseveres until he finds a

> solution.

> - You don't bite the hand that feeds you.

> - First you offer an apology, then you follow it immediately with a lecture

> for Peg how to behave when talking to you.

> This thread is a perfect illustration of how to shoot yourself in the foot.

> Peg's advice for you to get paid assistance from Microsoft was probably

> the best thing he said. You'd be at liberty to order these guys around -

> until they hang up on you.

>

>

>

Guest James Watkins
Posted

Re: start service with parameters on restart

 

You can use Pegasus' suggestion of running sc.exe, but with a twist. Stop

the service, then use sc.exe to delete the service. Now recreate it with the

parameters you require, using sc.exe, then restart it. No need to hack the

registry!

 

 

"exotericist" <nospamthanks@hotmail.com> wrote in message

news:5C47CFD1-B050-4AA2-A82D-C6DEEE185D5D@microsoft.com...

> 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@hotmail.com> wrote in message

> > news:8BBC9468-CFDC-4A51-9848-890E10CC4B2B@microsoft.com...

> > > 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@hotmail.com> wrote in message

> > >> news:D90B5E32-8EA2-4ECC-B8CC-7230EAB4991D@microsoft.com...

> > >> > 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@hotmail.com> wrote in message

> > >> >> news:45F80102-91F7-4E59-8D44-CBE77170142F@microsoft.com...

> > >> >> > 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@hotmail.com> wrote in message

> > >> >> >> news:4210AAC2-EAF6-4D94-B5E3-2F4E95D9852D@microsoft.com...

> > >> >> >> > 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

> > >> >> >>

> > >> >> >>

> > >> >> >>

> > >> >>

> > >> >>

> > >> >>

> > >>

> > >>

> > >>

> >

> >

> >

×
×
  • Create New...