CODE: [Copy to clipboard]for /f "eol=1 tokens=4" %a in ('sc query spooler ^|findstr "STATE"') do @if %a==RUNNING (echo 已启动) else echo 未启动