Killing the Windows Shell

4

7

On Linux machines you have the handy Ctrl+Alt+Backspace to restart the X server, if your GUI hangs.

Is there something comparable on Windows? I.e., a combination of key strokes to kill/restart the Windows shell in situations where the task manager is not a viable way?

Cheers,

EDIT: To make my point clear: Suppose, the UI freezes, because some app goes banana. Then you can spend hours waiting for the task manager to come up and get rendered after hitting Ctrl+Alt+Del, or you can just use this magical keystroke: (fill in your answer here) and you will be brought back to the login screen magically, just like Dorothy but without red shoes... ;-)

Boldewyn

Posted 2009-07-16T08:53:53.987

Reputation: 3 835

If Ctrl+Alt+Del doesn't work, nothing else will either. That key stroke is caught at (almost) the lowest level and no user-mode process could prevent it. So if it doesn't work then your system simply hangs and you'd have to reboot. – Joey – 2009-08-10T22:33:03.517

I guess not being able to invoke the task manager indicates critical system failure. The power button is probably the most suitable next step. – nik – 2009-07-16T09:06:39.170

X is a shell "on top of" TTYs, Windows Explorer shell no longer sits upon a command line interface. I'd be interested to know if the entire Windows graphical framework (and not just Explorer) can be bounced without rebooting. – None – 2009-07-16T09:17:32.660

To clarify my question: I need specifically a keystroke, for the causes when the user interface freezes or is extremely slow. In my case I had an ill-going backup software that led to the fact, that the task manager (XP, Ctrl+Alt+Del) needed over 3 minutes to appear and didn't display anything. – Boldewyn – 2009-07-16T18:05:58.913

On Ubuntu, Ctrl+Alt+Bksp is now the Alt-SysReq-K keychord. Braindead, I know. – kmarsh – 2009-09-22T12:56:19.023

Answers

6

You could make a new shortcut in your Quick Launch bar - the shortcut would go to:

C:\Windows\System32\taskkill.exe /f /fi "status eq not responding"

You could then make a key command to run it.

The shortcut will close all processes with the "Not Responding" status.

James T

Posted 2009-07-16T08:53:53.987

Reputation: 388

cool! This is really the worst abuse of the key command feature I ever heard :-) – Boldewyn – 2009-09-07T14:42:45.427

8

You can launch task manager by pressing control-shift-escape, handy to know if control-alt-delete isn't playing nicely. Kill the explorer.exe process, then file, new task, explorer.exe.

wikiti

Posted 2009-07-16T08:53:53.987

Reputation: 628

1That's even more useful in Vista/7 because [Ctrl]+[Alt]+[Delete] shows a menu for locking/logging off and among other things opening the Task Manager. With [Ctrl]+[Shift]+[Escape] you don't have to go through that screen to open Task Manager. – R. Martinho Fernandes – 2009-08-10T22:35:19.817

2Related: it's advisable to enable the "Open folder windows in a separate process", so you can kill the one explorer.exe that hangs, and still have the task-bar (with all of the systray-icons and their state) in a separate explorer.exe – Stijn Sanders – 2009-07-16T21:58:56.797

(especially when you're developing a shell namespace) – Stijn Sanders – 2009-07-16T21:59:44.047

+1 The magic keystroke request. Ever since Vista, explorer will recreate the tray icons correctly if restarted btw... – Oskar Duveborn – 2009-09-22T13:42:11.173

Cool, but I can't find the 'separate process' thingy. Could you tell me where my blind spot lies? – Boldewyn – 2009-07-17T10:46:55.093

1Windows Explorer: Tools -> Folder Options --> View – Javier – 2009-07-17T21:15:40.697

2

On Windows XP you can hit Ctrl + Alt + Del to switch to the secure window station.

Click Shut Down and then in the confirmation dialog press Shift + Ctrl + Alt and click No. This will kill your current shell and if I remember correctly restart it.

I haven't however found a similar trick on Vista.

Martin Liversage

Posted 2009-07-16T08:53:53.987

Reputation: 1 066

I have an Ok-Cancel dialog. Which one means No? – None – 2009-07-16T09:13:32.480

My mistake. You have to hit Cancel instead of No. I'm updating my answer. – None – 2009-07-16T09:20:42.560

2

It's unclear to me what you mean by "shell". On Windows, this would typically refer only to explorer.exe, which provides the taskbar, desktop, and folder views. However, your example of killing the X server with Ctrl+Alt+Backspace is very different: it kills the graphical engine running your display.

For similar behavior, set the following registry keys and reboot.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters]
"CrashOnCtrlScroll"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\kbdhid\Parameters]
"CrashOnCtrlScroll"=dword:00000001

Now, when you hold Ctrl and hit ScrLk twice in quick succession, the graphics system will be terminated. See MSKB 244139 for more details.

(Before complaints arise: this actually terminates all running programs, services, and drivers, by initiating a blue screen. UNIX systems can generally tolerate the graphical system being killed and restarted, but Windows... this is as close as I can get.)

ephemient

Posted 2009-07-16T08:53:53.987

Reputation: 20 750

Very interesting response. – Chris Marisic – 2009-07-31T14:54:04.853

I wait just some more days, then I'll accept this answer for getting as close as possible. Like dotnetchris stated, it's really an interesting answer. – Boldewyn – 2009-08-10T21:59:52.103

4Erm, this is a debugging tool for breaking into the kernel debugger on purpose. It is not a handy shortcut to kill the GDI. Heck, it's a blue screen on purpose. It's probably the equivalent of killing init on Unices ... if there is an equivalent at all. Forcibly halting the kernel would be it, actually. – Joey – 2009-08-10T22:25:48.790

Yes, I know. But it is the only answer that goes noticebly beyond Ctrl+Alt+Del. As such, though not really an answer to my question, it has at least provided new knowledge. – Boldewyn – 2009-08-11T07:53:16.473

...to me, that is. – Boldewyn – 2009-08-11T07:53:48.110

@Boldewyn : Then You can upvote it, since you find it interesting. But marking this as a real solution to your question is wrong, in my opinion, for the simple reason that it does not answer it. – Gnoupi – 2009-08-20T15:39:42.227

Hihi, cool! Not what I intended, but I like the idea of producing a BSoD. If I got you right, this will kind of crash the system, won't it? The difference to *nix systems is, that they recover by restarting X, while Windows just perishes with a BSoD... – Boldewyn – 2009-07-22T12:09:57.107

This doesn't directly kill the windowing system -- it kills the OS, which obviously kills everything running -- but indeed, it is usually possible to recover by restarting X on UNIX, while there is no such possibility (as far as I know) on Windows. – ephemient – 2009-07-22T16:45:55.477

1

Suppose, the UI freezes, because some app goes banana. Then you can spend hours waiting for the task manager to come up.

Here's the remedy for your woes:

AntiFreeze offers a last recourse when you find your computer in a hung state. Because programs consume too much CPU or too much memory or too many programs have been started, your computer has become unresponsive. The mouse still moves but no programs are responding, you cannot switch to other programs or even close them. You have even tried to start the Windows Task Manager even that won’t work because it does not get enough attention from the scheduler to respond to your mouse clicks and keyboard presses. You are ready to press the reset button, instead you can press the hotkey of AntiFreeze. It will put to sleep all running programs except the most critical ones, giving you the opportunity to close down the programs which are causing problems. You may even be able to save or recover your work.

alt text

AntiFreeze is free for non-commercial use

Molly7244

Posted 2009-07-16T08:53:53.987

Reputation:

0

I think you can kill the process explorer.exe and it will restart automatically after that. But I don't see how this is useful. For Windows it is always better to restart it completely.

carnz

Posted 2009-07-16T08:53:53.987

Reputation:

It is probably somewhat useful since I've seen Windows do this to itself. – None – 2009-07-16T09:06:05.287

1Explorer typically crashes because of Shell Extensions (though that's far less now with the COM Surrogate), and typically you don't need to reboot, just restart Explorer. If it crashed, it's also usually restarted by the system. – None – 2009-07-16T09:11:04.420

0

There is no combination of keystrokes that will kill the shell in the way that you describe, although in my opinion it's a very rare situation that Control+Alt+Delete doesn't work in.

I find that once I can get Task Manager up you can usually kill the offending process(es) and be on your way. I fully admit though that often the process is explorer.exe.

Coxy

Posted 2009-07-16T08:53:53.987

Reputation: 1 586

0

The way I do this is Ctrl-alt-delete then start task manager, kill the process. If that doesn't work then it is time for the big, red switch.

Bruce McLeod

Posted 2009-07-16T08:53:53.987

Reputation: 5 490