for /f "tokens=2" %%s in ('sc query state^= all ^| findstr "SERVICE_NAME"') do @echo %%s