sc query ServiceName |find /i "STATE" |find /i "RUNNING"echo %errorlevel% 转载于:https://www.cnblogs.com/dmdj/p/3678775.html