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.
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.