Check if Service is running and start it when it is not running.

Created a batch script that will check if a service is running and will start it when it is not running. It is also usable with a scheduled task. Plain and simple, see below:

You only need to change in the second line ServiceName to the name of the service you would like to check. For example, to check if Windows Update is running, you need to change it to wuauserv. The name can be found if you open the properties in Services, see the picture below.

Windows Update Properties

If you want to use it in a scheduled task and don’t want to create a lot of scripts, you can change the script to:

You can start the task with check-service.cmd “wuauserv” or any other service name. See the picture: