【问题标题】:script to check if windows service is running and if it ain't to start that service. Windows 2000脚本来检查 Windows 服务是否正在运行以及它是否不启动该服务。视窗 2000
【发布时间】:2012-12-10 08:54:24
【问题描述】:

很遗憾,SC 命令在 W2000 上还不可用,所以我不能使用它。

我正在尝试检查 W2000 服务器上是否正在运行服务,如果没有运行,脚本应该能够启动该服务。

如何在 Windows 2000 上做到这一点?

【问题讨论】:

    标签: windows batch-file windows-2000


    【解决方案1】:
    net start | find "yourservice"
    if %errorlevel%==1 net start "yourservice"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-20
      • 1970-01-01
      • 2016-05-06
      • 1970-01-01
      相关资源
      最近更新 更多