bat

  1. sc query ServiceName |find /i "STATE" |find /i "RUNNING"
  2. echo %errorlevel%
原文地址:https://www.cnblogs.com/dmdj/p/3678775.html