Killing A Program w/o Task Manager

Soldato
Joined
12 Dec 2003
Posts
2,588
I'm running W7 HP x64. Every so often a process freezes, but using Task Manager to end it does **** all. I know I know I could just restart and it would be fine but its irritating to have to do that just because a program won't end from task manager.

Is there another way to force a process to end when task manager fails to do it?

Thanks.
 
When using Task Manager are you ending the program under the Applications tab, or are you killing the process directly under the Processes tab?

Generally the former isn't always successful in ending some applications. Killing the process in the Processes tab should always work.

EDIT:

Since you are on Windows 7, you can give this a try:

Open a powershell console - Start > Run, enter powershell.exe and hit enter.

Then in the PS console enter:
Code:
Get-Process -Name "notepad" | % { $_.Kill() }

Obviously changing "notepad" to the process name [minus the .exe]. You might need to run Powershell as an Admin.
 
Last edited:
@Aod, Fair enough.

@dl763, Yea I know but I wanted to know if there was a quicker way

@SiriusB, I'm in the Processes tab. It happened a few days ago with MSN and tonight its QuickTimePlayer that wont die.
Tried that PS command as Admin - nothing :(
 
Are you getting any kind of error from PS?

I don't think I have ever had a process I can't kill... there have been some that come right back, but the original has always stopped.
 
I copied and pasted what you typed exactly and just changed "Notepad" to "QuickTimePlayer". After hitting enter it just returned the same command prompt

PS C:\Windows\system32>

Am I doing it wrong? Never used PS.
 
Nope, should make no difference. I have just opened QuickTime on my own computer - PS nuked it without issue.

Have you done anything to your machine lately, as it is slightly weird for processes not to die, and random ones at that.
 
Its been having a few problems lately.

*Some graphics not displaying properly.
*Lagging sometimes whenever I get Elevated Permission prompts
*Locking up whenever I use VLC/MPC/DivX Player (maybe I'm just lucky that QuickTime just froze itself and not the entire computer! :D)

Maybe it needs a reinstall / new gfx card etc.
 
Paste this into notepad, save as whatever.vbs

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'QuickTimePlayer.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next

Try that rather than the PS alternative?
 
Be interested to see a solution to this - I've had this a lot in the past and it drives me up the wall. Always annoyed when the task manager can't end a process - it's probably my 2nd biggest gripe after "file cannot be deleted as it is in use..." (god bless unlocker <3 ) :mad:
 
Paste this into notepad, save as whatever.vbs
...
Try that rather than the PS alternative?

Can I then set the process to run again after terminating? On one of my machines I need to restart explorer.exe from time to time - would love to have a simple shortcut, rather than having to us taskmanager every time?
 
You could just CMD tasklist/taskkill command.

tasklist first to get running processers and then use taskkill /? to find out what taskkill can do and use that. Works a treat!

Code:
Examples:
    TASKKILL /IM notepad.exe
    TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
    TASKKILL /F /IM cmd.exe /T
    TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
    TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM notepad.exe
    TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
    TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"
 
Wack this in a shortcut or a batch file:

Code:
powershell.exe "get-process -name explorer | %% {$_.Kill()}; start-process explorer.exe"
 
Last edited:
bugger!

boofu.jpg


never really used powershell so I'm not sure what the issue is?
 
@SiriusB, I'm in the Processes tab. It happened a few days ago with MSN and tonight its QuickTimePlayer that wont die.

it should kill those every time first time in process tab.

Are you clicking on the right one? try killing process tree instead (under right click).

if not you have bigger problems and should think about a reinstall or at least trying to fix the problem.
 
Back
Top Bottom