humbletech99 Posted December 20, 2007 Report Share Posted December 20, 2007 I need to be able to reliably and remotely restart a service from cmd/batch.So far I have been doingsc \\server stop servicenamesc \\server start servicenameBut because of a timing issue this invariably leaves the service as just stopped. So I introduced a time wait between the two commands, but this doesn't always work, if the server is slow to respond to the first one, it's not ready by the time of the second one and the service never restarts.Anyone got any good reliable method for restarting a service and making sure it comes back up from cmd/batch? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.