Showing posts with label shell. Show all posts
Showing posts with label shell. Show all posts

Friday, September 14, 2007

Explorer crash FIX - Explorer keeps crashing on open?

I've had this problem for a while now and as I searched the internet I realized there are very few descriptions of this and tutorials on how to fix it. So, what's the problem?

Problem Description:
A message box saying "Windows Explorer has encountered a problem and needs to close" keeps appearing when you start Windows and when start a new program. You are presented with two options: Debug and Close. When you hit "Close" it closes all your Explorer windows, and your task bar disappears leaving you with your other windows over your background. The desktop icons are all gone as well. After this happens, it might all come back automatically or it might not. Anyway a lot of your tray icons won't be there and neither will previous Explorer windows.
If they don't come back by themselves, one thing you can do is type Ctrl+Alt+Delete and summon the all mighty Task Manager. Then go to File -> New Task (Run) and type "Explorer". I'll explain this later.
Sometimes this may happen without any Message Box appearing. Everything just goes away. And you hear an Error beep in the background. Either way it can be VERY ANNOYING! When you open something new, Explorer crashes. It's unbearable.
"Hold on, Explorer isn't that thing with my files and folders on my right and my drives and folders on my left? How can that affect the things I open from the Start Menu or programs that auto-run?" Well, Explorer isn't just what you see when you double click the My Computer icon. Explorer is actually the whole Windows Shell. The shell is the user interface which bridges the gap between the operating system and the user. It's responsible for your desktop and all file-related handling. So if there's a problem with it, your life will become a nightmare. The process identifying the shell is explorer.exe (who would have guessed?). So because it's a process you can end it and start it back whenever you want. You can check in Task Manager under "Processes" that this particular one closes on every error of that sort.

Ok, this happens to me too, so how do I fix it ?

First lets analyze the root of the problem. Have you installed (and then maybe uninstalled) any anti-rootkit, anti-virus, anti-malware, anti-whatever program which used a kernel driver ? If you don't know we'll just go with Yes (we'll get to explaining what kernel drivers are another time). Then it's possible they set up a ShellExecute Hook in the Windows Shell.
The ShellExecute Hook is a way of placing a callback to the specific program setting the hook on every execute action the shell makes. What does this mean? A program might want to know every single time another program is run (in order to check it) so it places this "hook" in the shell and gets called. If something went wrong with the hooked program, or anywhere in between, the shell might crash before every execution.
What you need to do is deactivate the hook. There is a program called ShellExView ( http://www.nirsoft.net/ - has a lot of other useful little applications). You can run it and see all shell extensions including hooks. So you just scroll down to where it says "ShellExecute Hook" in type and disable the foreign entries (not belonging to Microsoft - you can just disable the one you think is faulty if you don't want to disable all - experiment a bit) and there you go ! Problem solved ! No more crashes.

Hope this was useful to a lot of (angry) users. If you have any questions don't hesitate to ask them in a comment to this post.