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
  • 22,002
  • 12
  • 63
  • 67
xGIx
  • 509
  • 3
  • 7
  • 26

2 Answers2

1

You can do this using TaskKill

taskkill /F /IM processname.exe /T
Tom Schardt
  • 470
  • 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
  • 8,857
  • 3
  • 29
  • 45