Is there a command to shut down explorer.exe cleanly?

Butters

Member
Member
VIP
Local time
3:28 AM
Messages
195
Hi everybody. I'm looking for a way to properly shut down explorer.exe using a command. What do I mean by this? Well, explorer keeps a lot of its preferences you have changed in its memory. When explorer.exe is closed properly (e.g. when you log off) it will write these changes to the registry. However, by using more traditional methods (e.g. taskkill /f /im explorer.exe or just killing the explorer.exe process using Task Manager), it is quit instantly and forcefully, not getting the chance to write the data in its memory to the registry.
Now I know about the wonderful trick of bringing up the shutdown dialog box and holding down CTRL+ALT+Shift and clicking cancel (or doing the same thing on the start menu shutdown button), but I want to know if there is some command I can use (preferably a command that can be used in a .bat file) to cleanly and properly close explorer.exe. Any help would be great.
 
Last edited:

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Inspiron 15 7000 Series
OS
Windows 7 Professional x64
CPU
Intel Core i7-4510U CPU
Memory
8 GB RAM
Graphics Card(s)
Intel(R) HD Graphics (I so wish I could upgrade this)
Screen Resolution
1920x1080
Keyboard
Laptop keyboard
Mouse
Microsoft Mouse
Internet Speed
Nothing to write home about
Antivirus
Malwarebytes Anti Malware
Browser
Pale Moon (Firefox fork)
Other Info
My primary laptop has Windows 10 on it, and my shared desktop (which is actually a laptop being used as a desktop) has Windows 7 Professional on it. I still use both, but I would say I use my laptop a bit more now.
I don't know about cleanly closing Explorer. But I have a small utility called Update Environment that is meant to flush changes to disk similar to logging off. It simply calls the EnvUpdate() function provided by AutoIt scripting language. It's one of those things were it may work or not depending on the nature of what was modified. For example Registry changes. They seem to "stick" without me having to log off, then back in. :)

In any case I've never seen it do any harm. You may download from this page:
Miles Ahead Software

As noted on the page, all the software is free for you to use at your own risk.
 

My Computer My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Thanks, Miles. That actually seems to work pretty well. I'll probably use that in the future.

By the way, that's a cool website. I might just take a look at some other software you have on there.
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Inspiron 15 7000 Series
OS
Windows 7 Professional x64
CPU
Intel Core i7-4510U CPU
Memory
8 GB RAM
Graphics Card(s)
Intel(R) HD Graphics (I so wish I could upgrade this)
Screen Resolution
1920x1080
Keyboard
Laptop keyboard
Mouse
Microsoft Mouse
Internet Speed
Nothing to write home about
Antivirus
Malwarebytes Anti Malware
Browser
Pale Moon (Firefox fork)
Other Info
My primary laptop has Windows 10 on it, and my shared desktop (which is actually a laptop being used as a desktop) has Windows 7 Professional on it. I still use both, but I would say I use my laptop a bit more now.
Thanks, Miles. That actually seems to work pretty well. I'll probably use that in the future.

By the way, that's a cool website. I might just take a look at some other software you have on there.

Thanks for the kind words.
b0228.gif
 

My Computer My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Back
Top