dpac
dpac

Reputation: 155

run windows services in specific order

Is it possible to change the order of windows services or run one service after another?

The reason i want this: I have IIS configuration located on a shared drive. And when i reboot server, it first run IIS (w3wp) service and couldn't start it. because at that point, shared network drive is not available. So i want to first finishing the network service to map all network drives and then run IIS service. so i don't need to restart IIS service every-time i reboot the server. is there any other way to achieve this?

Thanks!

Upvotes: 4

Views: 7653

Answers (2)

ewall
ewall

Reputation: 28120

By default, some Windows services are configured with "dependencies" to ensure that the prerequisite services are started first... so you can just add to them.

Here's how to set dependencies with Registry edits , from the command-line (sc config ServiceName depend=servicetoDependOn), and from .NET.

Upvotes: 6

trutheality
trutheality

Reputation: 23465

If you're running Server 2008 / Vista / 7 you can set the IIS service for delayed start.

There are sort of two tiers: first all the "automatic" stuff, then the "automatic (delayed start)" stuff.

Upvotes: 2

Related Questions