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


  1. Posts : 195
    Windows 7 Professional x64
       #1

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


    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 by Butters; 12 Mar 2014 at 15:36.
      My Computer


  2. Posts : 5,092
    Windows 7 32 bit
       #2

    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


  3. Posts : 195
    Windows 7 Professional x64
    Thread Starter
       #3

    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


  4. Posts : 5,092
    Windows 7 32 bit
       #4

    Butters said:
    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.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:27.
Find Us