ExitExplorer and RestartExplorer – two tools to exit and restart the Explorer shell properly

My friends at MDL forums asked me to code two simple tools, one of them, to exit the Explorer shell in Windows 10 and the second one to restart the Explorer shell. Both tools are designed to be used in batch files and scripts, as requested. I would like to share them with you and explain why they are different from the usual ways people use to restart Explorer.

Exit Restart Explorer
These tools are compatible with any Windows version and edition with .NET Framework 4.5 installed, so they work natively in Windows 8 and above.

ExitExplorer

The first tool is ExitExplorer. It performs a graceful exit of the Explorer shell, so that settings such as your desktop icon layout, Quick Launch settings, UI preferences and all Explorer-related settings will be saved when you exit it. You can test the difference by yourself:

  1. Note your current Desktop layout, e.g. how your icons are arranged right now.
  2. Re-arrange them in any way you want.
  3. Traditionally, the taskkill command is used in batch files to "exit" the explorer shell, so open an elevated command prompt and run the following command:
    taskkill /IM explorer.exe /F

    The Explorer shell will be terminated.

  4. Now open the Task Manager and click File -> New Task menu item. Type explorer.exe in the Run box and press Enter.
    Explorer will start again, you will see your Desktop, however, your icon layout will not be preserved. Your previous customizations will be lost, because taskkill terminates the Explorer shell but not exit it properly.
  5. Now rearrange your desktop icons again and try to use ExitExplorer.exe instead of the taskkill command. Your icon layout will be preserved, as it uses the "official" way to exit the Explorer shell!

That is all that's required from this simple app.

Download ExitExplorer

RestartExplorer

While the ExitExplorer app closes the Explorer shell properly, it does not start Explorer again. It's not of much use for scenarios where you need to restart Explorer. This was the second request, so I quickly made the RestartExplorer app. It does the same exit Explorer action but starts a new instance of Explorer, so you don't need to use Task Manager to run it manually.

Besides using these tools in batch files, you can pin these apps to the Taskbar or to the Start menu and launch them when you need them.

Download RestartExplorer

Bonus Tip: Using the RestartExplorer app, you can start the Explorer shell as administrator. Here's how:

  1. Right click the RestartExplorer.exe file and choose Run as administrator from the context menu.
  2. Press Win + R shortcut keys together on the keyboard to open the Run dialog.
    The dialog will say that any tasks started will open elevated:

Use caution when running Explorer in the elevated mode constantly, it is a security hole. Use it only when you know what you are doing.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

One thought on “ExitExplorer and RestartExplorer – two tools to exit and restart the Explorer shell properly”

  1. Hi! Can u make a update to handle the windows 10 action center issue where if you can only restart explorer.exe from task manager’s Restart button if you want the action center and its notifications to be working or openable at all.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.