Welcome to MSDN Blogs Sign in | Join | Help

How to cleanly stop Explorer.exe on Windows Vista

This is the first time I have blogged here about something other than running with least privilege. It's about a neat trick, though, that can be useful for some people.

If you need to shut down the main Explorer process, you could just kill it from Task Manager or Process Explorer. But undesirable and unpredictable things can happen when you abruptly kill any process, particularly one as central as Explorer.

In Windows XP, you can get Explorer to exit cleanly by getting to the shutdown dialog (e.g., Start / Turn Off Computer, or Start/Shutdown), then hold down the Ctrl+Alt+Shift keys and click the "Cancel" button. (Ref: JeffDav's blog.)

In Windows Vista with its standard Start Menu, click on the Start button. Hold down Ctrl+Shift and right-click on any empty area of the menu or on the power/lock buttons at the bottom of the right half of the menu. One of the context menu choices is "Exit Explorer". Choose this and the main Explorer process will cleanly shut itself down. (Thanks to Mike Sheldon and Raymond Chen for this tip.)

If you are using the "Classic Start Menu" option in Vista, the XP Ctrl+Alt+Shift+Cancel method still works.

OK, so chances are right now you're looking at nothing but wallpaper and the Sidebar and wondering, "What do I do now?" There's no Start menu anymore, and Win+R doesn't display the Run dialog. Answer: press Ctrl+Shift+Esc. This starts Task Manager. In Task Manager, choose "File / New Task (Run)", type "Explorer" and click OK. The shell will come back to life.

Note that on both Windows XP and Windows Vista, only the "main" Explorer process exits – that is, the process that manages the Start menu, taskbar, and desktop. With default settings, all Explorer folder windows are managed by that process as well, and so they will close too. However, if you have configured Explorer to "launch folder windows in a separate process", then those folder windows will not close when you apply this trick. Furthermore, when I tried this on Windows XP, I needed to manually close all those folder windows before running a new instance of Explorer would display the taskbar, etc., instead of just displaying yet another folder window.

Why is this hidden nugget even there? Its purpose is to help developers and testers who work on shell extensions to be able to stop and restart Explorer quickly and cleanly without having to log out.

Obviously, though, this trick can also be used to launch Explorer elevated. If you've exited the shell process and start Explorer from an elevated context, the entire desktop shell will run elevated. I cannot say this without adding caveats. If you do this, everything you start from this point on will run elevated. Shell extensions will run elevated, including the ones with serious security flaws. If you shut down Explorer again, any child processes that were launched will continue to run elevated, including browsers, IM clients, etc., with all the risk that incurs. IE Protected Mode does not operate when IE is running elevated. Less important but also significant is that any processes running at Medium IL will not be able to interact with the elevated shell – for example, to display taskbar notification icons. In general, because Explorer was neither designed for nor tested with this kind of elevated execution, you should not assume that anything will work correctly, including something as fundamental as user logoff. If you really need an elevated Explorer window on Vista, you can try the unsupported trick I described in this post instead of elevating the entire shell.

Published Tuesday, July 17, 2007 5:08 PM by Aaron Margosis
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: How to cleanly stop Explorer.exe on Windows Vista

Friday, July 20, 2007 3:16 PM by thor

Thanks you,thats is cool.

Maybe i can escape for explorer.exe

If you know a program for xp pro

# re: How to cleanly stop Explorer.exe on Windows Vista

Friday, July 20, 2007 10:03 PM by evarlast

I was looking for this Yesterday and I googled and I googled and I could not find the answer.

Thank you so much!

# re: How to cleanly stop Explorer.exe on Windows xp

Monday, August 06, 2007 12:51 PM by mike76

search in regedit explorer.exe exact string

you can see some value key

ex.c:\windows\esplore 1dl% (or similar)

you change value and delete strange string "1dl%"(or similar, i don'remember exact string)

after you change this value key press f3 and it found other value key ex.c:\windows\esplore 1dl% (or similar)you change value and delete strange string "1dl%"(or similar, repeat i don'remember exact string)when the search is finish reeboot system. FINISH

[Aaron Margosis] Deleting random "strange strings" from the registry sounds like incredibly bad advice to me.  What are you trying to accomplish?

# re: How to cleanly stop Explorer.exe on Windows Vista

Monday, August 06, 2007 1:55 PM by mike76

[Aaron Margosis]

I'm not american i speak english not very well!

but i know when desktop and taskbar don't run you can repair this pc from regedit.exe. You can lanch

regedit Through taskmanager (file - new task - regedit). after you serch in regedit the word explorer.exe. The registry search found some key with the word explorer.exe near this word is added  

a strange string (ex. %SystemRoot%\Explorer.exe /idlist,%I,%L) one of this key is changed and explorer don't function if yuo cancel "idlist,%I,%L" after reboot explorer will be

reset. you can backup your registry firt and

try this metod (tested under xp)

# re: How to cleanly stop Explorer.exe on Windows Vista

Tuesday, August 07, 2007 3:16 PM by mikew

this is sort of unrelated to your orig post

but have you checked out suDown? and how does it compare to your MakeMeAdmin scripts for XP?

http://sudown.sourceforge.net/

# re: Window Explorer of Vista repeatedly restart

Sunday, August 26, 2007 2:33 PM by Vidjia

Hi all,

I am in Budapest. Two day ago, my vista was infected by a strange virus. I have no solution of this though i set up the "viewers' outsanding trojan remover".

The problem is that the there is an information pop up showing that the "Window exploer doesn't work", then another pop up shows "Window Exploer restarting", then 5 seconds later, they show up again, again, indefinitely. Every time, they show up, i can not go to window explorer or work any other progam.

Please help me. My assignment will be due this Wednesday.

vidjia

# Anothr feed track -Aaron Margosis' "Non-Admin" WebLog

Monday, September 03, 2007 10:45 PM by anothr user

One new subscriber from Anothr Alerts

# re: How to cleanly stop Explorer.exe on Windows Vista

Saturday, September 15, 2007 7:28 PM by Gurijala

Hi Aaron,

Nice tip on Explorer.exe.

Thank you.

# re: How to cleanly stop Explorer.exe on Windows Vista

Tuesday, November 20, 2007 5:44 PM by saj

unfortunately: my vista business pro crashes so all the taskbar goes messed up, and: no chance to kill explorer process (no such process) and unable to run it again as in task man all the menu is unavailable...

# re: How to cleanly stop Explorer.exe on Windows Vista

Sunday, December 30, 2007 7:03 PM by Kevin

Your fix seems to have worked Aaron. Good job!

# Перезапуск Explorer в Windows Vista и Windows Server 2008

Thursday, March 13, 2008 1:46 PM by Tr-Tr-Mitya

Давным-давно, до выхода Vista, разработчикам Shell Extensions иногда необходимо было выгрузить Explorer...

# re: How to cleanly stop Explorer.exe on Windows Vista

Friday, March 21, 2008 2:27 AM by Vlitist

Do you happen to have the rundll command to achieve this? I'd like to script it because tskill and pskill only kill explorer for a second and then it auto restarts.

# re: How to cleanly stop Explorer.exe on Windows Vista

Sunday, April 20, 2008 4:28 PM by anonymous

I wonder where your problem with the shell extensions is. The Explorer shell itself already is trivially vulnerable, so there's no reduction in security.

[Aaron Margosis]  In the context of this post... there is a difference between security vuln running as a standard user vs. running as admin...

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker