Windows provides several secret ways to exit the Explorer shell. They can be useful when you make Registry changes that affect Explorer or for shell developers when testing shell extensions. To save your time, you can add a special "Restart Explorer" command to the Desktop context menu. This will allow you to restart the Explorer shell with one click.
Advertisеment
Note: The method described in this article works in previous Windows versions too.
Before proceeding, I recommend you to read the following articles:
- How to properly restart the Explorer shell in Windows
- ExitExplorer and RestartExplorer – two tools to exit and restart the Explorer shell properly
Add Restart Explorer Context Menu in Windows 10
Open Notepad and copy-paste the following text into a new document.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\DesktopBackground\Shell\RestartExplorer] "Icon"="explorer.exe" "Position"="Bottom" "SubCommands"="" "MUIVerb"="Restart Explorer" [HKEY_CLASSES_ROOT\DesktopBackground\Shell\RestartExplorer\shell] [HKEY_CLASSES_ROOT\DesktopBackground\Shell\RestartExplorer\shell\01Restart] "MUIVerb"="Restart Explorer" "Icon"="explorer.exe" [HKEY_CLASSES_ROOT\DesktopBackground\Shell\RestartExplorer\shell\01Restart\command] @=hex(2):63,00,6d,00,64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,63,00,20,00,74,\ 00,61,00,73,00,6b,00,6b,00,69,00,6c,00,6c,00,20,00,2f,00,66,00,20,00,2f,00,\ 69,00,6d,00,20,00,65,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,\ 00,78,00,65,00,20,00,20,00,26,00,20,00,73,00,74,00,61,00,72,00,74,00,20,00,\ 65,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,65,00,00,\ 00 [HKEY_CLASSES_ROOT\DesktopBackground\Shell\RestartExplorer\shell\02RestartWithPause] "MUIVerb"="Restart Explorer with pause" "Icon"="explorer.exe" [HKEY_CLASSES_ROOT\DesktopBackground\Shell\RestartExplorer\shell\02RestartWithPause\command] @=hex(2):63,00,6d,00,64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,63,00,20,00,40,\ 00,65,00,63,00,68,00,6f,00,20,00,6f,00,66,00,66,00,20,00,26,00,20,00,65,00,\ 63,00,68,00,6f,00,20,00,54,00,68,00,65,00,20,00,65,00,78,00,70,00,6c,00,6f,\ 00,72,00,65,00,72,00,2e,00,65,00,78,00,65,00,20,00,70,00,72,00,6f,00,63,00,\ 65,00,73,00,73,00,20,00,77,00,69,00,6c,00,6c,00,20,00,62,00,65,00,20,00,74,\ 00,65,00,72,00,6d,00,69,00,6e,00,61,00,74,00,65,00,64,00,20,00,26,00,20,00,\ 65,00,63,00,68,00,6f,00,2e,00,20,00,26,00,20,00,74,00,61,00,73,00,6b,00,6b,\ 00,69,00,6c,00,6c,00,20,00,2f,00,66,00,20,00,2f,00,69,00,6d,00,20,00,65,00,\ 78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,65,00,20,00,26,\ 00,20,00,65,00,63,00,68,00,6f,00,2e,00,20,00,26,00,20,00,65,00,63,00,68,00,\ 6f,00,20,00,44,00,6f,00,6e,00,65,00,20,00,26,00,20,00,65,00,63,00,68,00,6f,\ 00,2e,00,20,00,26,00,20,00,65,00,63,00,68,00,6f,00,20,00,50,00,72,00,65,00,\ 73,00,73,00,20,00,61,00,6e,00,79,00,20,00,6b,00,65,00,79,00,20,00,74,00,6f,\ 00,20,00,73,00,74,00,61,00,72,00,74,00,20,00,65,00,78,00,70,00,6c,00,6f,00,\ 72,00,65,00,72,00,2e,00,65,00,78,00,65,00,20,00,70,00,72,00,6f,00,63,00,65,\ 00,73,00,73,00,20,00,26,00,20,00,70,00,61,00,75,00,73,00,65,00,3e,00,4e,00,\ 55,00,4c,00,20,00,26,00,20,00,73,00,74,00,61,00,72,00,74,00,20,00,65,00,78,\ 00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,65,00,20,00,26,00,\ 20,00,65,00,78,00,69,00,74,00,00,00
In Notepad, press Ctrl + S or execute the File - Save item in the menu. This will open the Save dialog.
There, type or copy-paste the following name "add restart explorer.reg" including quotes. Double quotes are important to ensure that the file will get the "*.reg" extension and not *.reg.txt. You can save the file to any desired location, for example, you can put it in your Desktop folder. See the screenshot above.
Now, double-click the file "add restart explorer.reg" that you created. Confirm the UAC prompt and click Yes to merge it into the Registry.
A new submenu will appear in the Desktop context menu instantly. See the following screenshots:
The first command will terminate all "explorer.exe" processes and start a new one instantly.
The second context menu entry will prompt you to press any key to start explorer.exe.
To save your time, I made ready-to-use Registry files. You can download them here:
The undo file is included, so you can avoid manual Registry editing completely.
That's it.
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!
Advertisеment
The download link is missing.
These command lines simply put Restart Explorer in the right-click menu without the submenus.
Reg.exe add “HKLM\TK_HKLM_SOFTWARE\Classes\DesktopBackground\Shell\Restart Explorer” /v “icon” /t REG_SZ /d “explorer.exe” /f >nul
Reg.exe add “HKLM\TK_HKLM_SOFTWARE\Classes\DesktopBackground\Shell\Restart Explorer” /v “Position” /t REG_SZ /d “Middle” /f >nul
Reg.exe add “HKLM\TK_HKLM_SOFTWARE\Classes\DesktopBackground\Shell\Restart Explorer\command” /ve /t REG_EXPAND_SZ /d “cmd.exe /c taskkill /f >nul /im explorer.exe & start explorer.exe” /f >nul
Thanks.
I copied this from my mounted install.wim file. Please replace TK_HKLM_SOFTWARE with SOFTWARE. Sorry.
no download link
Thanks, fixed.
thank you
Lately I’m often forced to restart Explorer via Task Manager at boot because it’s in “not responding” status during system startup. Can’t figure out why and I wouldn’t exclude one of the anti-W10 privacy settings as the cause.
An Explorer restart fixes it but if Explorer is not responding, then the context menu solution here will probably not work either… I think. Thanks for the tip, anyway.
Any way to make use of this trick on taskbar’s context menu?
The taskbar context menu is not customizable. But you can shift+right-click to see the hidden “exit explorer” item.