Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to use the Windows GUI (not the command line) to close all copies of a particular running application, when the Taskbar is set to "Never combine"?

The fewer clicks and/or keystrokes, the better. (For example, one solution would be to individually close each application window, but a quicker way to do this is what I'm after.)

I'm running Windows 8.1, but I would be interested in answers applicable to any recent version of Windows.

share|improve this question
    
Doesn't the Task Manager do what you want? –  Ramhound Apr 2 at 15:49
    
@Ramhound I don't believe so. For example, if I have 5 instances of notepad.exe running, and I want to close them all, if I use Task Manager to kill one of those applications and/or processes, the other 4 remain open. I'd like to have a way to close all 5 at once. –  Jon Schneider Apr 2 at 15:50
1  
1  
Before you say "Answers on that duplicate talk about the command-line when I want GUI": a) it's the same question (even if you don't like the answers), and b) the accepted answer is suggesting creating a shortcut to run a command, therefor making the command into a clickable GUI item (a shortcut). :) –  Ƭᴇcʜιᴇ007 Apr 2 at 16:49
1  
@techie007 (and users who are voting to close this), this question is different in that it's asking for a method to close instances of any arbitrary Windows application (not necessarily known beforehand) -- not always notepad.exe (or some other specific application that can be hard-coded into a shortcut) as in the linked question. –  Jon Schneider Apr 2 at 17:52

1 Answer 1

Here's a PowerShell script you can play with.

Currently it makes a form that has a button for each active Process name.

Click the desired button and all processes with that name will be killed.

Add-Type -AssemblyName System.Windows.Forms 

$Processes = Get-Process | Select-Object Name -Unique

$Form = New-Object system.Windows.Forms.Form
$Form.Text = "Multi-Process Killer"

function KillProcs($ProcName) {
    Stop-Process -processname $ProcName
    $Form.Close()
}

for($x=0; $x -lt $Processes.Count-1; $x++){
    $Btn = New-Object System.Windows.Forms.Button
    $BtnSize = ($x*24)+4;
    $Btn.Location = New-Object System.Drawing.Size(10, $BtnSize)
    $Btn.Text = $Processes[$x].Name
    $Btn.Name = "btnKillProc$x"
    $Btn.Size = New-Object System.Drawing.Size(200, 24)
    $Btn.TabIndex=$x
    $Btn.Add_Click({ KillProcs($this.Text) })
    $Form.Controls.Add($Btn)
}

$Form.ShowDialog()

If I had time, I'd replace all the buttons with a scrollable, selectable listbox and a single "Kill" button, but this should be enough to point you (or someone) in that direction I'm sure. :)

share|improve this answer
    
Nice! I gave this a try and it does work fine on my Windows 8.1 system, albeit with the limitations that you alluded to, like lack of a scrollbar to scroll through the long list of processes. –  Jon Schneider Apr 4 at 18:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.