Windows command to get service status?

后端 未结 12 765
渐次进展
渐次进展 2021-02-01 04:48

I need to know the status of a service at the end of my batch script which restarts services using \"net stop thingie\" and \"net start thingie\".

In my most favorite id

12条回答
  •  不思量自难忘°
    2021-02-01 05:30

    look also hier:

    NET START | FIND "Service name" > nul IF errorlevel 1 ECHO The service is not running

    just copied from: http://ss64.com/nt/sc.html

提交回复
热议问题