Hello Gurus,
I am very new to MS-DOS batch programming.
My requirement is like this:
I want to start a windows service and wait until it is completely started and display a message that it is running.
I know that we can start a service using sc command (sc start myservice), and check the status by sc query (sc query myservice)....
But how to wait in a batch program until the service status changes to running..
My requirement is that, I need to wait until the service is UP and proceed further.
I don't know how to keep checking the status of a service in a loop. If the status of the service changes to running then I should come out of the loop.
Does anybody know how to write this kind of batch program ?
Thanks in Advance.
Regards,
Karbi