【问题标题】:Killing service through batch or something similar通过批处理或类似的方式杀死服务
【发布时间】:2014-05-05 09:21:00
【问题描述】:

我朋友的 win8 电脑上的 WIA 服务 (stisvc) 经常停止正常工作。从 MMC 停止/重新启动时,它返回错误“服务未及时响应”,因此我从任务管理器中将其杀死,然后从 MMC 中启动它。
有没有办法制作一个脚本来杀死 stisvc,然后重新启动它?

【问题讨论】:

    标签: batch-file service windows-8 wia


    【解决方案1】:

    这对你有用(你应该在你的系统上拥有管理员权限):

    @echo off
    
    taskkill /F /IM svchost.exe /FI "SERVICES eq stisvc"
    
    sc query stisvc | find /i "running"
    if errorlevel 1 (
    echo Not running...
    echo Starting Windows Image Acquisition (WIA) service....
    net start stisvc
    )
    

    依赖关系:

    如果以下服务停止或禁用,Windows Image Acquisition (WIA) 将不会启动:

    Remote Procedure Call (RPC)
    Shell Hardware Detection
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-04-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-05
      • 1970-01-01
      相关资源
      最近更新 更多