How do I kill a program that hung with an always-on-top fullscreen window?


Has this ever happened to you? You're hard at work blasting zombies being super-productive with a program that has an always-on-top fullscreen window. And then the program hangs. How can you get to Task Manager so you can kill the hung program?

One way to do this is to launch Task Manager and use keyboard accelerators to get it to be always-on-top:

  • Hit Ctrl+Alt+Del and say that you want to run Task Manager. Task Manager will run, but it's covered by the always-on-top fullscreen window.
  • Whenever you need to see Task Manager, use Alt+Tab to select Task Manager and hold the Alt for a few seconds. This will give you a preview of Task Manager so you can see what state it is in. You can't interact with it, but you can at least see it.
  • If Task Manager is in compact mode, then press Alt+D to get out of compact mode into details mode. If you're the sort of person who likes to open Task Manager a lot, you are probably already in details mode.
  • Type Alt+O followed by Alt+D to enable Always on Top.

You now have an always-on-top Task Manager, and you can now use it to select the hung program and terminate it.

But here's a shortcut: Use virtual desktops.

  • Press Win+Tab to call up the switcher.
  • Click the + to create a new virtual desktop. This gives you a clean desktop with nothing on it. In particular, the hung application is not on this desktop.
  • Run Task Manager on this new virtual desktop and use it to terminate the hung program.
Comments (38)
  1. xcomcmdr says:

    I have a lot of problems debugging fullscreen games with OllyDbg. Can’t focus on Olly, can’t Alt-Tab because then I will be only debugging the game’s message loop (not very interesting), etc.

    Somehow, it never occured to me that I could just use another virtual desktop !

  2. henke37 says:

    Much faster to just hit ctrl-shift-esc to open the task manager directly. No need to do the switch to the secure desktop and back and no need to press an additional button.

    1. The MAZZTer says:

      Using Ctrl+Shift+Esc has one fatal flaw: It won’t work if Explorer is the application that is hung/crashed. But otherwise yeah.

      1. alegr1 says:

        Ctrl+Shift+Esc works with Explorer killed

        1. cheong00 says:

          Not if the explorer is hang itself. At least it didn’t work on a Win7 machine that the shell itself is not responsive.

          Calling Secure Desktop is the “sure work” way.

  3. Wear says:

    That’s a lot easier than what I normally do. Open task manager, press first letter of the name of the application, press delete, hope it terminates the right application.

    1. The MAZZTer says:

      It’s like virtual Russian Roulette! Whoops, there goes csrss!

      1. Simply type the first few letters of the executable’s name.

        1. Assuming there’s only one instance. If you’re doing full-screen Chrome or something similar, it might be harder if you hit one of the tab processes instead of the main process.

  4. AberAber says:

    Win+Tab for me in Win 7 just zooms in. Is that Win 8+ only?

    1. Entegy says:

      Windows 10 only. That was the one that added multiple desktops.

    2. SimonRev says:

      Yeah, they reworked it in Windows 8 and again in Windows 10. Frankly I thought the Windows 7 behavior was kind of useless and just used Alt+Tab.

      On Windows 7 Win+Tab did 3d flip zoom (only if Aero Glass was enabled)
      On Windows 8 Win+Tab from what I can read did the same thing as the drag in from the left gesture did on a touch screen which was to pull up a thumbnail of all running applications on a side bar. I just tried it on my Win 8.1 VM and did get anything when pressing Win+Tab.
      On Windows 10, I think it is actually useful for the first time, showing a fairly large tile of every application on the monitor where it is currently running, plus the switch desktop functionality too!

      1. MarcK4096 says:

        I really like Win+Tab on Windows 10. I’d love to find a way to swap what Alt-Tab and Win-Tab do as Alt-Tab is an easier combination to press.

    3. Apparently for Windows 7 there is the “Desktops” tool from Sysinternals — https://technet.microsoft.com/en-us/sysinternals/cc817881

  5. AberAber says:

    On Win 7, it seems like it is also not Alt-O, Alt-D. It looks to be Alt-O, Alt-A for Always on Top.

    1. RP says:

      Isn’t it just Alt-O, A? i.e. You don’t need to hold down the Alt while you’re pressing the A.

  6. GL says:

    I guess Windows 10 removed the peek for Alt+Tab? So the first method won’t work exactly as described on Windows 10 — you can’t preview Task Manager with other windows temporarily removed, it’s directly in the Alt+Tab interface, if you have Explorer running and has not switched to the classic Alt+Tab interface (by setting AltTabSettings = 0x1).

    1. Yeah, Alt+Tab no longer peeks, which annoys me a couple of times a week when I really want it to. Win+0-9 still peeks, at least.

  7. Antonio Rodríguez says:

    Those instructions are highly specific to Windows 10. In Windows 7, there is no details view in the Task Manager (instead, it has Applications and Processes tabs), and Win+Tab shows the “Aero Switch” introduced in Windows Vista, which displays all open windows in a three-dimensional view (remember those “wow!” TV ads?). Also, multiple desktop support was introduced in Windows 10, and thus, inexistent in Windows 8.

    It’s much easier to have the Administrator account enabled, and switch to it to kill the offending process using the Task Manager. It’s simple, and it works all the way down to Windows XP. Just press Win+L from the hung application and use the mouse. Plus, in Windows XP, you get to use Raymond’s Tweak UI PowerToy to enable the Administrator account :-) .

    1. GL says:

      Detail view is the view of Windows 7 Task Manager, while the other view (starting from Windows 8?) hides the tabs. Flip 3D is actually good since you automatically get rid of top-most windows and you can see Task Manager, just a bit distorted.

      1. Antonio Rodríguez says:

        Right. But my point is that Raymond’s instructions involve a series of very specific keypresses which won’t work on anything other than Windows 10. The detail view in Windows 8+ may be equivalent to the Processes tab in Windows 7 and earlier, but the menu bar and the keypresses have changed. And the same goes to the rest of the “recipe”.

  8. Piotr says:

    pshhh… I just keep clicking the window until windows error reporting does that for me. Too much work.

  9. Blubbeh says:

    It should be noted that window/menu shortcuts are, as always, dependent on the system language. Alt+O & Alt+D will probably not work as expected on a non-english system.

    Looking for your own ones in that case makes a nice exercise, I guess.

  10. Other keyboard shortcuts are Win+Ctrl+D to open a new desktop, and Win+Ctrl+F4 to close the current desktop.

    You can also be hardcore and blindly type “taskkill /im program_name.exe” into a cmd window. :)

    1. You might need the /f flag, too.

  11. Darran Rowe says:

    I have a multiple display system and task manager remembers where it was placed last. Since I am most likely to run these always on top programs on my left monitor, task manager mostly stays on my right.

  12. On Windows 7 without virtual desktops (provided you have an extra, dummy user created) after you’ve hit Ctrl+Alt+Del select “Switch User”, log in to that dummy user and voila a clean desktop.

  13. Joshua says:

    Well you would have gotten annoyed when the focus stealing program went in a loop clearing WS_EX_TOPMOST from everybody else.

    “You are posting comments too quickly. Slow down.” when I haven’t posted in about a day.

  14. Ezhik says:

    One of the first things I do when setting up a new Windows machine is making sure that Task Manager always stays on top. Has saved me quite a few times.

    The last time I didn’t do that I had to blindly type out a taskkill command into the Win+R prompt.

  15. Kirby FC says:

    I thought there was no such thing as an “always on top” window.

    https://blogs.msdn.microsoft.com/oldnewthing/20110310-00/?p=11253

    “We already know that you can’t create a window that is always on top, even in the presence of other windows marked always-on-top. An application of the What if two programs did this? rule demonstrates that it’s not possible, because whatever trick you use to be on-top-of-always-on-top, another program can use the same trick, and now you have two on-top-of-always-on-top windows, and what happens?”

    1. Scarlet Manuka says:

      No, there’s no such thing as an always-on-top window that is guaranteed to always be on top of *other* always-on-top windows.

      1. Datzau Sheelyksit says:

        Yes, that link describes what happens with multiple windows with the “topmost” setting, but Raymond is describing here a different situation, where the process with the hung-window is in “fullscreen-exclusive” mode.. In that mode, the window truly is “always on top”. If the process is hung, then it will not exit this mode. Switching to another desktop gets the process out of that mode.

  16. Tobias Langer says:

    Amazing. That’s the feature I always needed when I used Windows 3.1

  17. The most annoying thing with a game or similar fullscreen program crashing is that a error requester shows up, and you must click Ok or close that for the program to close/window to force it to quit. I never understood why it behaves that way, or why Windows can’t just alt-tab to the desktop automatically in this case. But I guess these requesters are not created by the OS but rather the runtime the program uses. But this feels like a solvable problem though.

  18. helloacm says:

    Always On Top + Full Screen is really evil! I don’t understand why people would ever do that.

  19. Benjamin says:

    I’ll definitely give it a try the next time it happens but honestly my experience has been that once a fullscreen app gets wedged enough to *need* a force closing it’s often messed things up so royally that getting the normal ‘lock / switch user / taskman / etc.’ to appear in the first place is a chore. I wouldn’t doubt your Win+Tab notion wouldn’t suffer the same fate.

  20. joeking says:

    Has anyone else ever noticed the bug in TaskManager where its actual AlwaysOnTop state is ON, even while Options->AlwaysOnTop is off?

    Usually, the way to fix it is to toggle it twice.

    I’ve never managed to get a simple repro, it just shows up sometimes to annoy me – usually when it happens, it keeps happening a number of times.

Comments are closed.

Skip to main content