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

1
  • 2
    Get-Process -Name "chromedriver" | Stop-Process in PowerShell. Commented Sep 6, 2017 at 8:30

2 Answers 2

1

You can do this using TaskKill

taskkill /F /IM processname.exe /T
Sign up to request clarification or add additional context in comments.

3 Comments

how would i add an if statement to check first whether the process is running and then attempt to end the process? thanks again
For using you should use powershell, that would be easy. Let me give the answer
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"
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.