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
  • 20,737
  • 10
  • 61
  • 64
xGIx
  • 469
  • 3
  • 7
  • 24

2 Answers2

1

You can do this using TaskKill

taskkill /F /IM processname.exe /T
Tom Schardt
  • 460
  • 1
  • 9
  • 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,161
  • 2
  • 24
  • 37