« VM Hung on StartupHOWTO: Remotely set permissions for a Windows Service »

HOWTO: Remotely set a startup dependency for a Windows Service

07/14/07

Permalink 09:37:31 pm by guy, Categories: Windows

This procedure will allow you to configure the startup of a Windows Service to be dependent on the startup of another.

This can solve multiple problems. One problem that this addresses is a Windows Service that can’t start without successful startup of another. It will delay startup of the service until a successful startup of it’s dependency.

This will also affect how the Service Control Manager responds when you try to stop the service that is the dependancy. When you do that, the Service Control Manager will warn you that there is a depenent service (or services) and will offer to shut them down first. In the case of a service Restart command it will stop and restart the affected dependent services as well, and in the right order.

This procedure requires the SC command which is built into WindowsXP.
The command can be run locally or be pointed to a remote machine for which you have admin privs.

Y:\>sc \\2qds941 config MyService depend= MSMQ
[SC] ChangeServiceConfig SUCCESS

I seem to remember that the extra space after the “depend=” is required, so keep that in mind if trying this.

September 2017
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
I'm a generalist, at least if I'm honest. In my job I am primarily a developer, but also a sysadmin, and (as little as possible) technical support. I know a little about a lot of things, a lot about some things, and everything about nothing. Here I will post random learnings...

Search

XML Feeds

User tools

powered by b2evolution free blog software