Home / Microsoft / Microsoft DOS / required to work on stop and start services in a sequential order
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: required to work on stop and start services in a sequential order  (Read 615 times)
ateja2004
Topic Starter
Newbie



Posts: 2


« on: November 21, 2008, 04:05:19 PM »

I need to stop services in the following order
service1
service2
service3

Service 2 and service 3 should be stopped only after service1 has been stopped.
After Service 2 and 3 has been stopped, once confirmed, they have to be started and once it is done, service 1 has been to be started

 i found the way of stopping and starting of services. i.e, using sc command. All that I could not get is implementation of logic...

Request you to provide me some help.
IP logged
Prince_
Beginner



Thanked: 5
Posts: 63


« Reply #1 on: November 22, 2008, 10:39:06 PM »

Code: [Select]
sc stop service1
sc stop service2
sc stop service3

sc start service3
sc start service2
sc start service1
IP logged
ateja2004
Topic Starter
Newbie



Posts: 2


« Reply #2 on: November 25, 2008, 08:57:00 AM »

Actually, I am aware of this. But, I planning to automate. That means, If I go ahead like this. With confirmation of the stoppage of service 1 only, it will stop 2 and then 3. But, I want to get it confirmed and then only stop 2  and 3. Until service 1 is topped it has to wait, check the status and then it should stop service 2 and 3 after service 1 is done.
Similarly, for start up as well.
IP logged
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / required to work on stop and start services in a sequential order « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.091 seconds with 20 queries.