0

Is it possible to create a script which would in turn end a specific process?

I need to end the chromedriver.exe (Even if more than one process running): enter image description here

arco444
  • 19,715
  • 10
  • 57
  • 59
xGIx
  • 389
  • 3
  • 5
  • 22

2 Answers2

1

You can do this using TaskKill

taskkill /F /IM processname.exe /T
Tom Schardt
  • 400
  • 1
  • 7
  • 18
1

For conditional operation, you can use powershell;

if(Get-Process -Name ProcessName)
{
"Process is running. So ending the process"
Get-Process -Name ProcessName | Stop-Process -Force
}
Else
{
"Process is not running"
}
Ranadip Dutta
  • 7,709
  • 2
  • 20
  • 33