taskkill 按路径区分 2 个图像 [英] taskkill to differentiate 2 images by path
本文介绍了taskkill 按路径区分 2 个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用 taskkill 按名称杀死进程并从特定路径启动?
How to kill a process by name and orginiated from a particular path using taskkill?
taskkill/F/IM
taskkill /F /IM
当然它无法区分从两个不同位置 C:\Dir1 和 C:\Dir2 启动的 2 个进程
certainly it cant differentiate 2 process started from two different locations C:\Dir1 and C:\Dir2
tasklist 有没有获取路径名的开关
Does tasklist has any switch to get the path name
推荐答案
taskkill
无法做到.但是,如果可以选择,您可以使用 PowerShell:
taskkill
cannot do it. But you could use PowerShell if it's an option:
(Get-WmiObject Win32_Process | Where-Object { $_.Path.StartsWith('C:\Dir1') }).Terminate()
这篇关于taskkill 按路径区分 2 个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文