How to kill an application in one go when there are multiple instances
At the moment, Slack has hung for me. Some times it's Chrome, sometimes another app.
Right clicking the icon in the task bar and choosing close does not close the application
I want to kill it in Task Manager.
When I open in task manager, it doesn't appear as a running app
When I review the running processes, it appears multiple times
At the moment, I have to close each of those processes individually (and it always seems that a random one will close all the processes)
I'd like to close these in 1 go! Is this possible?
Solution 1:
My go-to method for killing processes of any kind is PowerShell. It's very simple and quick, wildcard support means you don't need to know the exact process name, and it works with multiple instances. You don't usually have to know the exact file path. Although PowerShell is immensely powerful, this trick is quite simple so don't be put off.
WARNING: please take due care! If you killed all processes with the name set to *
then I presume every single process would die!
-
Open PowerShell (doesn't need to be opened as admin unless you get an error message requesting elevation). You can open it by searching "PowerShell" from the start menu, or going to Start > All Apps > Windows PowerShell > Windows PowerShell (Ignore the programs ending with "x86", or "ISE" - they do the same job pretty much)
-
Type in
Kill -name progam
whereprogram
is the name of the executable. There are various ways of doing this - if I don't know the exact name from memory, I will check theDetails
tab in Task manager and find the executable name. -
Press
Enter
to run the command.
Example:
I have 3x command prompts open:
Which are shown in Task manager as cmd.exe
Enter the command into PowerShell:
Press enter, and every process running called "cmd" will be killed.
For your case, you can simply enter kill -name slack
to kill off all your slack processes in one foul swoop.
Use of wildcards such as *
is permitted so to kill off all Dropbox proccesses, I can run kill -name drop*
- note that as I haven't run the command from an elevated PowerShell, there are some processes that can't be killed due to permissions. This is easily fixed by opening PowerShell as administrator of course.
Solution 2:
You can do this using taskkill, from an elevated command prompt (cmd run as administrator).
taskkill /F /IM [PROCESS EXE] /T
You need to know the exact .exe file name. To do that you can simply right click one of the slack processes and click "open file location". Here's an example:
I have two obs processes
I located the actual .exe by right clicking the process in task manager and clicking "open file location" (obs .exe file)
now, from an elevated command prompt, If I do:
taskkill /F /IM obs64.exe /T
Both of the processes will get killed simultaneously. I hope this answers your question and works for your specific process.