Skip to main content
Syntax highlighting
Source Link
Destroy666
  • 7.4k
  • 10
  • 23
  • 43

taskkill doesn't have such an option if you check its filters with taskkill /?

For pure cmd, there's wmic that you can use:

wmic process where ExecutablePath="D:\\Program Files\\Java\\jdk1.8.0_331\\bin\\java.exe" call terminate

Also a PowerShell solution:

Get-Process | ? { $_.Path -eq "D:\Program Files\Java\jdk1.8.0_331\bin\java.exe" } | Stop-Process

? is Where-Object shorthand, where you check for full path.

taskkill doesn't have such an option if you check its filters with taskkill /?

For pure cmd, there's wmic that you can use:

wmic process where ExecutablePath="D:\\Program Files\\Java\\jdk1.8.0_331\\bin\\java.exe" call terminate

Also a PowerShell solution:

Get-Process | ? { $_.Path -eq "D:\Program Files\Java\jdk1.8.0_331\bin\java.exe" } | Stop-Process

? is Where-Object shorthand, where you check for full path.

taskkill doesn't have such an option if you check its filters with taskkill /?

For pure cmd, there's wmic that you can use:

wmic process where ExecutablePath="D:\\Program Files\\Java\\jdk1.8.0_331\\bin\\java.exe" call terminate

Also a PowerShell solution:

Get-Process | ? { $_.Path -eq "D:\Program Files\Java\jdk1.8.0_331\bin\java.exe" } | Stop-Process

? is Where-Object shorthand, where you check for full path.

This sentence didn't make sense. Perhaps something the user forgot to delete?
Source Link

taskkill doesn't have such an option if you check its filters with taskkill /?

For pure cmd, there's wmic that you can use:

wmic process where ExecutablePath="D:\\Program Files\\Java\\jdk1.8.0_331\\bin\\java.exe" call terminate

wmic process where "ExecutablePath" delete

Also a PowerShell solution:

Get-Process | ? { $_.Path -eq "D:\Program Files\Java\jdk1.8.0_331\bin\java.exe" } | Stop-Process

? is Where-Object shorthand, where you check for full path.

taskkill doesn't have such an option if you check its filters with taskkill /?

For pure cmd, there's wmic that you can use:

wmic process where ExecutablePath="D:\\Program Files\\Java\\jdk1.8.0_331\\bin\\java.exe" call terminate

wmic process where "ExecutablePath" delete

Also a PowerShell solution:

Get-Process | ? { $_.Path -eq "D:\Program Files\Java\jdk1.8.0_331\bin\java.exe" } | Stop-Process

? is Where-Object shorthand, where you check for full path.

taskkill doesn't have such an option if you check its filters with taskkill /?

For pure cmd, there's wmic that you can use:

wmic process where ExecutablePath="D:\\Program Files\\Java\\jdk1.8.0_331\\bin\\java.exe" call terminate

Also a PowerShell solution:

Get-Process | ? { $_.Path -eq "D:\Program Files\Java\jdk1.8.0_331\bin\java.exe" } | Stop-Process

? is Where-Object shorthand, where you check for full path.

Source Link
Destroy666
  • 7.4k
  • 10
  • 23
  • 43

taskkill doesn't have such an option if you check its filters with taskkill /?

For pure cmd, there's wmic that you can use:

wmic process where ExecutablePath="D:\\Program Files\\Java\\jdk1.8.0_331\\bin\\java.exe" call terminate

wmic process where "ExecutablePath" delete

Also a PowerShell solution:

Get-Process | ? { $_.Path -eq "D:\Program Files\Java\jdk1.8.0_331\bin\java.exe" } | Stop-Process

? is Where-Object shorthand, where you check for full path.