How to check in Windows if the service is not installed using batch file

前端 未结 2 527
终归单人心
终归单人心 2021-01-21 12:49

I\'m trying to do a batch program that needs to check if the service is installed before checking if it is running/stopped.

I would just like to ask if there is any way

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-21 13:17

    sc query myService |find "myService" >nul will do the trick

提交回复
热议问题