How to kill tasks in Windows 7 when even Task Manager won't open or respond?

25

10

Occasionally one of my computers will get so bogged down that everything locks up, Ctrl+Alt+Del doesn't work, Task Manager won't open, or they work, but are opening so slowly that it will take hours or days to shut down other processes and regain control of the computer, etc.

Is there a way to, for instance, force Task Manager to be highest priority so it always opens immediately with Ctrl+Shift+Esc even when some other process/driver is hogging the CPU? Is there some other program that can run in the background and open immediately like this?

This question isn't about fixing "underlying problems". No matter how much memory you have, it's still possible for a rogue process to eat it all up and lock up the computer in page fault thrashing, hog the CPU, etc. This question is about how to take back control of the computer when that happens.

Basically when these kind of lock-ups happen, I want to open some kind of task manager that pauses every other process and allows me to kill one of them, and then let everything resume so I can save my work, etc. Otherwise my only option is to hold down the power button.

Antifreeze is supposed to do exactly what i want, pausing all other applications and starting a task manager to kill the offender, but in my testing, it actually does neither.

endolith

Posted 2013-07-04T01:42:55.363

Reputation: 6 626

Answers

16

You can kill tasks using command prompt.

1) Windows Key + R (Run)

2) Type 'cmd' and hit enter

3) Type the command tasklist , press enter. you can see all tasks running in your system.

4) Kill particular task/application by taskkill /f /im taskname

Eg: If you want to kill notepad, type taskkill /f /im notepad.exe

Edit

If you know the application name, then you can issue the taskkill command directly in the run text field.

Harikrishnan

Posted 2013-07-04T01:42:55.363

Reputation: 1 334

4How can I use cmd when system hangs? – Serhiy – 2015-05-11T17:05:15.637

You don't have to open cmd. Just type & execute the command from Run textfield. But you should know the process name of the application to be killed. – Harikrishnan – 2015-05-11T17:15:22.087

1This doesn't always work. I've observed using /f and it displays a SUCCESS message indicating the process has been terminated, but it still runs and I can re-issue the same command repeatedly and it just gives the same SUCCESS message with the same PID repeatedly without actually terminating the process. – DavidJ – 2015-06-29T15:57:20.027

Make sure you use admin user or run cmd as Administrator. It will work. – Harikrishnan – 2015-06-29T16:30:12.790

1@Harikrishnan: I just ran cmd as Administrator and it didn't work. – SarahofGaia – 2015-08-04T23:40:06.060

@SarahofGaia Paste me the full command you have issued. Also what programme did you try to kill? – Harikrishnan – 2015-08-05T02:54:12.087

@Harikrishnan: First I typed tasklist as mentioned. Then I typed taskkill /f /im vlc.exe. (Although weirdly enough I don't have VLC installed. Only VLC Portable (through PortableApps.com), but that has the filename vlcportable.exe, not vlc.exe.) – SarahofGaia – 2015-08-06T17:50:38.410

@SarahofGaia If the process name listed as vlcportable.exe in tasklist, you should use that name in command taskkill /f /im vlcportable.exe – Harikrishnan – 2015-08-07T03:19:03.187

Okay. But vlcportable.exe doesn't show in command prompt after I type tasklist. – SarahofGaia – 2015-08-07T17:04:22.333

Only vlc.exe does. – SarahofGaia – 2015-08-07T17:04:33.187

Which I don't understand because I don't have VLC installed. I only have VLC Portable. – SarahofGaia – 2015-08-07T17:04:55.847

But VLC Portable, if I go under Properties, doesn't have vlc.exe as its file name, but only vlcportable.exe. – SarahofGaia – 2015-08-07T17:05:33.270

it doesn't work with either... The process won't die... – Ahmed Hamdy – 2016-06-09T20:11:21.307

1Add a "/T" to the taskkill to also nuke the child processes. – Ben – 2019-12-05T16:54:56.770

5

Process Tamer is a small and nifty utility that achieves your final goal, while going about it in a different and probably better way.

Rather than raise the priority of the Task Manager, it lowers the priority of any out of control process, preventing the kind of lock-ups that you are referring to.

However, if you still just want to permanently raise the priority of a process such as the task manager, you can use this other utility, Prio, but be careful when setting high priorities on multiple processes.

peanut_butter

Posted 2013-07-04T01:42:55.363

Reputation: 1 722

2

Sounds like there are deeper issues here, I rarely run across windows 7 machines that have difficulties launching task manager, (on even the most infected of machines)

With that said, even the lowly task manager requires memory to run so if you are maxing out your ram by opening hundreds of tabs or thousands of apps you will have issues using any utility.

Most of the time you can launch it but you have to wait for DAYS before it finally loads into memory, especially if other processes are hogging resources.

Add memory or consider cleaning your computer of apps and processes that don't need to be running.

Scandalist

Posted 2013-07-04T01:42:55.363

Reputation: 2 767

2

If you get the below error when trying to kill the process using taskkill:

C:\>taskkill /f /im firefox.exe
ERROR: The process "firefox.exe" with PID 7808 could not be terminated.
Reason: There is no running instance of the task.

Then it means Firefox is waiting for above service to be stopped. You need to kill that process first before killing Firefox process. Most likely it is Flash or Acrobat reader, ...

For my case killing Firesvc.exe always works. I hope that helps others too.

Bahram

Posted 2013-07-04T01:42:55.363

Reputation: 21

1No, it never works for my Windows 8 – Vipul Hadiya – 2015-06-28T14:30:04.710

0

I had loads of programs and documents opened and unsaved and my system hung. I could spawn new Task Managers but all of them would be frozen. I found that by pressing Ctrl+Alt+Del and choosing restart in the bottom right my Windows system starting shutting down but then presented the warning that programs with unsaved documents were preventing Windows from restarting. I chose cancel and got control of my system back.

Matthew Lock

Posted 2013-07-04T01:42:55.363

Reputation: 4 254

0

In windows it only has priorities for CPU time and not other resources on the system, and Task manager already has "high" cpu priority. The only other processes with a "high" priority are

  • dwm.exe (desktop window manager)
  • winlogon.exe (Windows Logon Application)
  • wininit.exe (Windows Start-Up Aplication)

Your computer is likely either starved of some other resource or you are running some other process with even higher priority, which is a bad idea to start with. There is no one solution to fix all, you can only prepare yourself as best you can for dealing with the problem while you track down each of the things causing the problems.

@peanut_butter that ProcessTamer program looks like a good idea for CPU resource shortages.

Whichever resource your server is short on, will make launching any process difficult. Launching cmd.exe and in turn taskkill or tskill will use a smaller memory footprint than task manager, but when you start cmd.exe you will want to increase it's cpu priority to High with task manager before trouble begins in case it is a cpu shortage.

Often when task manager is sluggish it is because the system is low on available ram and task manager has been swapped out of memory and on to disk because you weren't using it, or the disk is so busy with its swap file or other things that reading the taskmgr.exe or cmd.exe or taskkill.exe file from the disk takes ages. This can be caused by all sorts of things, and even servers with seemingly huge amounts of ram can be hit by an out of control process (even the windows memory manager process itself) can eat up too much ram and kills the system even to the point where programs start crashing or the entire system just BSOD. On my home Windows 7 machine I've had significant problems with Media Centre working fine for hours and then all of a sudden it will eat all the RAM and then some in about 5 seconds and then the PC is completely frozen and only pulling the power works.

You need to identify what actions are triggering these events before you can solve the problem. I suggest becoming familiar with the Performance Monitor program and how to make it log things.

Also note that just switching current applications to make task manager the current focus is handled by explorer.exe which is not and should not be high priority process. So leave task manager running in the foreground whenever you are trying to see if something is crashing your system.

BeowulfNode42

Posted 2013-07-04T01:42:55.363

Reputation: 1 629

1"You need to identify what actions are triggering these events before you can solve the problem." It's different things every time. I need a general solution that just halts other things and lets me kill them. – endolith – 2013-07-04T16:05:15.070