script to restart a service
Posted on 2015-01-08
Our company relies on software running on Windows Server 2003. The software relies on a service that often stops. When the Windows service stops, the program will not run. We are unable to set the service to automatically restart itself because the software goes into a loop and crashes.
The people with direct access to the server are not technical. They can't be trusted to find the correct Windows service to restart. I'm hoping someone can help me write a batch file that stops the service, then restarts the same service. My plan is to instruct the staff to click on one file which performs the stop/ start service automatically.
A bonus would be to use the same script as part of a scheduled task to refresh the service on a daily basis.
Is this possible?