Forum posts for explorer.exe

Gently Terminate Explorer.exe

I have done a lot of searching but I have not been able to discover a straightforward way to gently terminate the explorer shell in an XP batch file.

Why would I want to, you ask (since almost every time someone asks this someone else wants to know why)? The answer is simply this: I run a batch job at the end of the day which saves my toolbar configuration. When the explorer shell terminates normally, it writes the toolbar configuration to a registry key, which can then be exported and restored after I run CCleaner at the beginning of the week. If explorer is terminated with, for example, taskkill, it usually fails to write the registry key and the resulting export file does not always accurately reflect the current configuration of the toolbars.

I have tried using CMDOW 'program manager' /cls but this just brings up the 'Shut Down Windows' dialog - sometimes it makes the computer shut down even if you hit the 'Cancel' button. Since bringing up the 'Shut Down Windows' dialog and hitting 'Cancel' while holding down 'Ctrl, Alt, Shift' will cause explorer to gently die, I have looked at a vbs script using sendkeys but sending '%{F4}' assumes that the desktop is the foremost window. I thought I might try coding some HotKeyP macros - it has the capability of raising the 'Shut Down Windows' dialog - but once the 'Shut Down Windows' dialog is raised, HotKeyP can't seem to access it.

What message is Explorer receiving so that it knows to terminate gently as opposed to shut the whole computer down - that's what I want to know.

View complete forum thread with replies

Other posts related to explorer.exe

See Related Forum Messages: Follow the Links Below to View Complete Thread

Can't run explorer.exe properly [closed]
How to profile Windows explorer.exe
Gently Terminate Explorer.exe
Is there a way to control explorer.exe?
mouse_event block on explorer.exe
find explorer.exe hwnd
C# - hook explorer.exe
Kill explorer.exe with windows title
Render file in explorer.exe Windows
details list like in explorer.exe
Windows 7 Explorer.exe
Explorer.exe doesn't start?
Running explorer.exe using Runtime.exec()
Start exe as child of explorer.exe
Is there a “Legal” API to exit explorer.exe?
Initialize Desktop (explorer.exe)?
Restart explorer.exe and restore windows

What is the carbon footprint of your coffee?

Is it low? Is it high? Can this things really kill the planet Earth? Maybe the answer will surprise you. Maybe not.