sc query|find "tomcat6" && echo yes || echo no
sc query|find "eventlog" && echo yes || echo no
sc query|find "eventlog" STATE=4 && echo yes || echo no
sc query|find "eventlog" start=all && echo yes || echo no
sc query "eventlog" start=all && echo yes || echo no
sc query "eventlog" STATE=4 && echo yes || echo no
--增加输入参数
set /p input_source=
sc query|find %input_source% STATE=4 && echo yes || echo no
时间: 2024-11-14 05:00:23