taskkill to differentiate 2 images by path

前端 未结 5 1959
再見小時候
再見小時候 2021-01-04 01:30

How to kill a process by name and orginiated from a particular path using taskkill?

taskkill /F /IM

certainly it cant differentiate 2 process started from t

5条回答
  •  Happy的楠姐
    2021-01-04 02:33

    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()
    

提交回复
热议问题