1

I'm looking to gracefully exit/terminate Windows Explorer either from the UI or possibly from the command line.

There are many articles out there which explain how to do this in various versions of Windows (XP, Vista, 7 & 8).

There has been one Stack Overflow thread, which discusses exiting Windows Explorer programmatically.

There have been some very detailed & technical responses posted here, so I'm hoping someone on Stack Overflow will actually be able to explain why I do not have the "Exit Explorer" option via the GUI?.

I've tried Ctrl+Shift+Click, Ctrl+Shift+RtClick, Ctrl+Alt+Click, etc. with no luck.

Here is my system info:

  • Win7Ultimate SP1 64bit
  • PentiumD2.8
  • 4GB RAM
  • no pen or touch

Windows7Ultimate.x64.ExitExplorerMissing.png

Perhaps it's a SP1 "fix" or a problem with the 64bit version? Somehow it was turned off.

In addition, is there a command line method to "Exit Explorer" gracefully? (afaik taskkill is the same as killing the process in Task Manager, & is not graceful.)

Glorfindel
  • 4,089
  • 8
  • 24
  • 37
George 2.0 Hope
  • 544
  • 5
  • 12
  • 2
    If you're not looking for a programmatical solution, this isn't the right place to ask. Voting to move. – Matti Virkkunen Apr 28 '12 at 22:50
  • 2
    I've got Win7Ultimate, SP1, 64bit, and I have the "Exit Explorer" menu option, but only if I hold Ctrl+Shift when right-clicking. Both left and right versions of both Ctrl and Shift work, even in combination. What's your keyboard layout? – Ben Voigt Apr 28 '12 at 23:33
  • Why do you want to do this in the first place? – cutrightjm Apr 29 '12 at 01:15
  • And assuming you have some legit need to exit Explorer, what behavior will "exiting gracefully" achieve that is different from just killing the process? Generally the only reason to exit Explorer is that it has hung or done something bad, in which case you probably need to kill the process anyway. – stone Apr 29 '12 at 07:41
  • @MattiVirkkunen I thought the solution might involve writing a script, and or diagnosing the explorer.exe program. – George 2.0 Hope Apr 29 '12 at 13:34
  • @BenVoigt I checked the keyboard layout, pls see: [pic](http://i.stack.imgur.com/iA3F8.png) – George 2.0 Hope Apr 29 '12 at 13:39
  • 1
    @skypecakes In the event Explorer hasn't finished an operation, I would like to give it the chance to finish before I terminate it (for instance after installing a program.) – George 2.0 Hope Apr 29 '12 at 13:44
  • Related question: http://superuser.com/questions/335917/how-can-you-do-a-clean-shutdown-of-windows-explorer – and31415 Jan 25 '14 at 14:32

3 Answers3

1

To gracefully exit explorer in Windows 10 you right-click the task bar while holding down Ctrl+Shift. The context menu which then appears shows an "Exit Explorer" entry.

For Windows 7 it used be a right-click with Ctrl-Shift on the Shutdown button in the star menu. [Given here for reference since it is not mentioned in original question.]

Christian K.
  • 141
  • 5
1

Perhaps it's UAC issue. Are you sure your user has Admin rights?

Also, taskkill can be used to send a couple different signals to processes. I believe that using the default taskkill tells the process to clean up its space (as well as prompting for unsaved files if needed) and "gracefully" terminate. If that can't be done for some reason, then you taskkill /F to forcefully terminate the process.

Ariel
  • 874
  • 5
  • 7
  • Any chance you would have a small c# program snippet that could detect the "graceful" message from the OS? Then I could test taskkill on it. :-) – George 2.0 Hope Apr 29 '12 at 13:45
  • Open notepad, type a few letters into it, don't save the file. Click on Start, type `cmd` into the box and run cmd.exe. Run `taskkill /IM notepad.exe`. Notice that notepad prompts you to save the document. Now do the sames thing, but this time use `taskkill /F /IM notepad.exe`. No save prompt. – Ariel Apr 29 '12 at 17:08
  • Ariel: Thanks, awesome thought, I should have thought of that!... However, I still would like to know from a programmer's perspective what "Windows System Event" I would need to add to my programs so that the respond to a taskkill or Windows Shutdown. Thanks. – George 2.0 Hope Apr 30 '12 at 11:18
  • [Window.Closing](http://msdn.microsoft.com/en-us/library/system.windows.window.closing.aspx) if you are using .Net. – Ariel Apr 30 '12 at 11:25
  • Ariel: I'm marking your answer correct... though I do hope someone will eventually help me discover why I can't do it with a mouse... :-( Thanks for Window.Closing too, I'll have to research that. – George 2.0 Hope Apr 30 '12 at 18:50
  • No admin rights are required to close `explorer.exe`. While using `taskkill` without the `/f` parameter you're sending a close message to the target process, but it's up to program to handle it and eventually prompt the user to save changes etc. It won't work with `explorer.exe` though: all you get is the close session dialog. If you _do_ use the `/f` parameter then the process is terminated, but that's not graceful at all. – and31415 Jan 27 '14 at 18:07
0

Workaround

Use the keyboard way:

  1. Win+M
  2. Alt+F4
  3. Ctrl+Alt+Shift+Esc

References

and31415
  • 14,490
  • 3
  • 45
  • 62