Use a Batch File for Quickly Restarting explorer.exe

Posted on ខែ កក្កដា 23, 2008. Filed under: Command Line |

Explorer.exe is the user shell on your Windows system (taskbar, desktop, etc.) and periodically it requires a restart to resume proper functionality. Additionally, if you do a lot of tweaking to your system registry like I do, it’s much easier to restart explorer.exe to reload the registry instead of restarting the entire system. By creating a .bat file, you will have a quick 2 step solution that will restart explorer.exe and get you back to computing in just a few seconds.1. Open Notepad.

2. Copy and paste the following into the new document:

@echo off
taskkill /f /IM explorer.exe
explorer.exe

3. Save your document with a descriptive name such as restart_explorer.bat. Make sure to save the file with the .bat extension and not .txt.

The next time you need to restart explorer.exe, simply run the newly created .bat file and close the command window that appears.

Make a Comment

Make a Comment: ( 5 so far )

blockquote and a tags work here.

5 Responses to “Use a Batch File for Quickly Restarting explorer.exe”

RSS Feed for Windows Vista For Khmer… Comments RSS Feed

I find this useful when trying to remote onto a computer on which explorer.exe is playing up an therefore the remote connection won’t work. I go to \\computer_name –> Scheduled Tasks, setup a scheduled task to run a similar script to this one to restart explorer.exe and voila! Remote desktop connection working again.

ty was looking it up
btw you need taskkill.exe
you can get it here
http://home.wanadoo.nl/gigajosh/2005/05/taskkillexe.html
then copy it into C://windows/system32/

i can also improve on script

taskkill /f /IM explorer.exe
start explorer.exe
exit

what it does
“ taskkill /f /IM explorer.exe” ends the explorer.exe process
“ start” before explorer.exe stops the .bat wanting to wait for explorer.exe to finnish
and exit closes the command window

You can add an exit after explorer.exe to close the command window

it works without the “ @echo off” line


Where's The Comment Form?

Liked it here?
Why not try sites on the blogroll...