The IsServiceStarted function checks if the specified service is started.
Used to check if a service is started and take conditional action depending on the result.
var = IsServiceStarted(<service_name>)
<service_name>. string, name of the service to check (case insensitive).
var, integer. If <service_name> is started, the return value is 1. If it is not started, the return value is 0. If the function fails, the return value is different from 0 and from 1 (see System Functions Error codes).
a = IsServiceStarted("WTScheduler") ' Returns 1 if the WTScheduler service (the WinTask x64 Scheduler) is started.