高手请进:如何使用批处理命令杀掉用户打开的svchost.exe?

BlueskyWide 2010-03-30 02:50:22
如使用:taskkill /im notepad.exe 命令可以关掉打开的记事本。

但面对多个svchost.exe,如何找出用户某个应用进程(而不是主系统进程,因为主系统进程结束时会关机),在批处理命令中关掉(kill)它。

...全文
177 4 打赏 收藏 转发到动态 举报
写回复
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
BlueskyWide 2010-04-01
  • 打赏
  • 举报
回复
后来换了个思维,采用交差taskkill,现在可以了。谢谢大家。
tz_being 2010-03-30
  • 打赏
  • 举报
回复

for /f "tokens=1,2,3*" %%i in ('tasklist /fi "imagename eq svchost.exe" /svc^| find /i "暂缺"') do taskkill /f /pid %%j
ljc007 2010-03-30
  • 打赏
  • 举报
回复
先总结一下你想结束的进程有哪些规律,在写命令。

[code=BatchFile]wmic process where name="svchost.exe" get * /value
[/code]
就是just4 2010-03-30
  • 打赏
  • 举报
回复
看一下就知道了,
[code=BatchFile]tasklist /fi "imagename eq svchost.exe" /svc[/code]

对于服务进程,直接net stop不就行了,干吗杀进程
相关推荐

6,767

社区成员

发帖
与我相关
我的任务
社区描述
Windows 2016/2012/2008/2003/2000/NT
社区管理员
  • Windows Server社区
  • qishine
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告