Windows Services - Shutdown Order

Hi

I would like to control the order in which my Windows Services are closed - I have a 'Manager' service which 'controls' several other services and I would like to this service to control the order/style of shutdown of the surpervised services.

My embedded PC is currently running Windows XP (sp3 I guess) and will eventually target Windows XP Embedded.

Cheers

AndyF.
 

Question Info


Last updated September 21, 2018 Views 3,419 Applies to:
I also have a service which depends on other services including the EventLog - so I've established dependencies to these. The startup order seems OK but windows insists on shuting down the EventLog before my service. The dependencies show up on my service's properties as well as in the EventLog's dependencies so they seem to be set up OK.

This raises the question raised above - how can you control the shutdown order of services?

Thanks

Mike

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

I've just discovered http://support.microsoft.com/default.aspx/kb/203878?p=1

It states it can't be done - unless I'm reading it wrong.

The banner at the top is telling me it doesn't apply to XP but the "Applies To" seems to say it does ("the operating system: Microsoft Windows XP")

Mike

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hi Mike

Thanks for your feedback.

I had reached a similar conclusion myself though I do intend to research again when I get chance.

If I do find anything of use I will post back.

Cheers

AndyF.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Service Control Handler Function looks interesting.  Consider handling  SERVICE_CONTROL_SHUTDOWN, and coordinating shutdown among your services in that fashion.  Use the dwCheckPoint and dwWaitHint members of the  SERVICE_STATUS struct to provide feedback to the SCM regarding service shutdown progress.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.