Batch file for starting stopped services?
Hi folks - this will probably be a quick one.
I'm new to batch files, as in totally new. I'd like to run a batch file as a scheduled task every morning to check if a service on a server is running and if it's not, start it up.
The command to start eg print spooler runs fine as:
NET START "spooler"
And I'd assume the batch file to start the service if it's not running would be:
IF "spooler" == stopped NET START "spooler"
...But that might be nonsense. Computer definitely says no anyways.
What am I missing helpful edugeeks? :\