I know that using sc start/stop service name to start and stop services, but now I want to first judge whether the service is on or off. If it's on, close the service; if the service is off, start the service. How to achieve this? Is it using the query parameter? I'm just learning batch processing, please experts give me some pointers.
