Friday, December 23, 2011

What do I do when Windows Explorer crashes?


Windows Explorer keeps crashing on me. Sometimes, all that I need to do is open a folder in it, and *poof* - it's toast. Why? And what do I do?
And to be clear, I'm talking about Windows Explorer - not Internet Explorer.
Windows Explorer is a very special program. In many ways, it "is Windows", in that it's actually the program that's responsible for displaying the task bar, the Start menu, the task-switcher, and a fair amount more.
Oh, and it's also the program that you can use to browse around your hard disk to look at files and folders.
It's definitely completely unrelated to Internet Explorer, but there is one characteristic that they share that can cause the kinds of problems you're seeing.
They can both be extended.

When Windows Explorer dies

You may have noticed that when Windows Explorer dies, in some cases it takes the Windows taskbar and Start menu with it. As I mentioned, that's because those are actually displayed by Windows Explorer.
Normally, when that happens and the base instance of Windows Explorer dies, other components of Windows are supposed to notice and start it up automatically again. That's why you might see the taskbar disappear and then reappear after a few seconds.
Sometimes, that doesn't happen. In that case, you can typically type CTRL+ALT+DEL and start the Windows Task manager, and then click the File menu followed by Run, or click the New Task... button:
Using Windows Task Manager to create a new instance of explorer
The new task to create is called simply "explorer" and running it should get you your taskbar and Start menu back.
If, instead, running "explorer" starts a new Windows Explorer window in which you can view files and folder, then the base instance of Explorer is already or still running.

Explorer add-ons

Very much like Internet Explorer, Windows Explorer's functionality can be extended by installing add-ons (more correctly referred to as "shell extensions" because Windows Explorer is often referred to as "the shell", or primary user interface to the operating system). The add-ons for Windows Explorer are unrelated to the add-ons for Internet Explorer, but the concept is very similar.
Unfortunately, Windows doesn't include an interface for viewing or managing these add-ons, so we need to grab a third-party tool.
ShellExView from NirSoft is a free utility for doing just that.
ShellExView on my machine
The first thing to note when running ShellExView is the sheer number of shell extensions: 237 on my machine alone.
This is normal, as Windows is itself actually responsible for the majority - part of modularizing the functionality that Windows provides.

Identifying problematic shell extensions

Unfortunately, there's no hard-and-fast rule to quickly point at a shell extension and say, "This is the one that's causing all of the problems." Instead, we need to look at what's loaded and make a few semi-educated guesses. Then just try disabling extensions that we determine might be related to the problem.
Before you begin, I strongly suggest you take a full backup of your system. Disabling shell extensions is generally safe, but this is a very complex system that we're working with here and there are no guarantees. A full backup is your safety net in case something goes horribly wrong.
You may need to widen the default ShellExView window to expose the "Product Name" column, and then widen that column to make it more readable by double-clicking its right divider in the column header. (There are actually many columns of information, and I encourage you to at least have a look at the rest while you're at it to see what kind of information is available.)
Click the "Product Name" column header to sort the extension list by product name.
ShellExView sorted by Product Name
As you can see in this list, I have shell extensions from several third-party applications, including 7-Zip, Dropbox, LastPass and more.
An initial assumption that we'll make is that the problem is likely not due to one of Microsoft's own shell extensions. That cuts down the number of things that we need to consider - in my case, only 16 shell extensions are not listed with a Microsoft product name.
  • First, consider what software you may have installed on your machine recently. Particularly if the problem that you're diagnosing "just started happening," it's not uncommon for that to be the result of a new installation of something. Look for that product name and if you see any shell extensions associated with that product, right-click the item in the list and select Disable Selected Items.
  • Second, if the problem that you experience happens only when opening a folder containing a particular file type, look for the program that handles that file type. For example, in my case, if Windows Explorer crashed every time I opened a folder containing a ".7z" file (that's a file handle by 7-Zip) and I would then disable the shell extensions associated with 7-Zip.
  • Third, if the problem happens when you open a file of a particular type - make sure that it's Windows Explorer that's crashing and not the application handling that file. For example, if I experience a crash when opening a ".7z" file, it's important to look at the error messages that result to determine if indeed it's explorer.exe, or perhaps 7z.exe that's actually crashing. If it really is explorer.exe crashing, then look for shell extensions relating to that program and disable them. However, if it's the program that handles that file extension crashing - say 7z.exe in my example - then this article doesn't apply and you need to diagnose the issue with that application. (Typically, the first step is to reinstall it.)
  • Finally, often things aren't that clear. The crash may appear to happen randomly or under a different set of circumstances than I've listed here. Look for patterns. The patterns that you'd look for would somehow relate the problem back to one of the shell extensions listed, at which point, you'd try disabling those shell extensions to see if the problem resolves itself.
Disabling shell extensions is relatively safe, particularly for non-Microsoft Windows extensions. (You may need to reboot for the disabling to take effect.) Typically, all that happens is that you lose some functionality - often functionality that you never knew existed or never used.
If disabling the shell extension causes the problem to go away, you can proceed either of two ways:
  • Diagnose, repair, or otherwise "fix" the program to whom that shell extension belongs. Typically, the first step is a reinstall, but things can also be more involved. At a minimum, you now have a direction to head and presumably could contact that software manufacturer's support for more specific assistance.
  • Leave the shell extension disabled. As long as you don't miss whatever functionality that shell extension provided, this is a valid approach, with one drawback: If that product updates at some point, the update or reinstall process may re-enable the shell extension. If it works, fantastic. If not, you may find yourself needing to go in and disable it again.
If disabling the shell extension does not resolve the issue that you're dealing with, then I recommend re-enabling it.
If disabling the shell extension causes more trouble or removes a feature that you care about, then you're faced with diagnosing or repairing the application associated with it.

No comments:

Post a Comment