Connect with us

Windows

How To Add “Restart Explorer” Shortcut in Windows 7 Desktop Context Menu

Published

on

Sometimes Windows Explorer hangs and stops working properly. Restarting Explorer.exe is probably the simple solution for this. There are some methods that you can restart windows explorer, some users just restart the whole computer to get it fixed while the only thing that needs restarting is Explorer.exe.There are many methods I use to restart Explorer.exe, but the easiest one of them is just a 2 click method.

Guess how easy it’ll be to restart explorer.exe instead of restarting the whole computer with just a new entry to be added to the Desktop context menu.

Easy Way!

A tool called Right Click Restart Explorer with install/uninstall buttons to do it.

Detailed way (For advance users):

So, what do these above tools do? First of all. there are 2 commands that are executed to restart explorer.exe

taskkill /f /im explorer.exe

start explorer.exe

The first one is using taskkill to kill all instances of windows explorer. The second is to start explorer.exe again. These are saved in a batch(.bat) file or command line(.cmd) file. you can have some additions to it to make the command screen look cleaner so you can make it like that

Advertisement

echo off

cls

title Restarting Explorer.exe

echo Restarting Explorer.exe ………. please wait

taskkill /f /im explorer.exe

start explorer.exe

Advertisement

Echo off : to clear the directory from command screen so you won’t see something like c:\\users\\xxxx\\ in each line

Cls : Stands for Clear Screen. It clears the command line screen from everything in there

Title : Sets the title of the command line window to “Restarting Explorer.exe” or whatever you write after it in the line

Echo : writes what’s following in the line as text in the command line screen

Now you can copy and paste the above in notepad and save this as Restart_Explorer.bat in c:\\windows\\system32\\ directory. Make sure you save as all file types in notepad ( not as *.txt ).

Advertisement

Now you got your file ready. If you click on that Restart_explorer.bat, your windows explorer will be restarted. Now what’s left is to add that file to the desktop context menu. That will require using the registry editor. So head to start and write regedit and hit enter.

Navigate the Registry Editor to the key HKEY_CLASSES_ROOT\\DesktopBackground\\Shell\\

R-Click on Shell > New > Key . Give it a name Restart Explorer.

On the right side, Create 2 new String Values.

1 – Name : Icon – value Explorer.exe

2 – Name : Position – Value Top

Advertisement

So far. it should like this.

Now go back to the left side. R-Click on Restart Explorer > New > Key . Give it the name command.

On the right side again, Change the value of the (Default) to Restart_Explorer.bat. You’ll have to write the full path if Restart_explorer.bat wasn’t in c:\\windows\\system32\\ directory.

Now it should look like this.

You can now test your Context Menu Entry and restart explorer.exe 😀

If you don’t want to repeat these steps in each computer, you can export the registry key ( Restart Explorer ) to a .reg file whose contents should look like this

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\\DesktopBackground\\Shell\\Restart Explorer]
“Icon”=”explorer.exe”
“Position”=”top”

Advertisement

[HKEY_CLASSES_ROOT\\DesktopBackground\\Shell\\Restart Explorer\\Command]
@=”Restart_explorer.bat”

Also keep a copy of restart_explorer.bat with the registry file in a safe place. If you want to uninstall it from the context menu, you ca just delete the Restart Explorer key from the registry. Or you can do it using a registry file too.

Open notepad. paste the following inside it

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\\DesktopBackground\\Shell\\Restart Explorer]

The – before the key will delete it. Now save it as Uninstall.reg ( make sure it’s saved as All file types, not *.txt)

Advertisement

This was tested and working on Windows 7.

If you like this article, please share it with everybody else 😀