2010-01-12

Windows Explorer Overlay Icons

For many of us, Tortoise SVN has been the subversion client of choice for many years. It's use of icon overlays within Windows explorer will tell you exactly what status your file is in.

The list below was taken from http://tortoisesvn.net/node/138.



Another useful tool that I use is Dropbox. This background application syncs files between a group of computers. This is useful when you want to share files and don't want the hassle of a file share or intranet. Dropbox also makes use of overlay
icons so that you know when a file is synced or in the process of being synced.

Here's an example of the dropbox overlay icons:



The problem with overlay icons is that they are a very limited resource in Windows. You are only allowed 15 overlay handlers within Windows and at least four are generally reserved for the OS (Reference).

With DropBox and Tortoise installed on my Windows 7 64-bit machine, I had 15 overlay handlers within my registry. Here's a snapshot (Keep in mind that this may look a little different on your machine):

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers



Pay attention to the bottom four handlers:
TortoiseModified, TortoiseNormal, TortoiseReadOnly and TortoiseUnversioned. The first two handlers in this list are the most commonly used handlers within Tortoise. Since the indices of these items is > 10, they are not recognized by Windows explorer.

As far as I know, there is no way to fix this restriction within Windows explorer. Your only option is to prioritize your overlay handlers. To do this, you
can re-sort the overlay handlers within the registry by renaming the overlay entry to be prefixed with 'z_'. This will force those entries to the bottom of the list. Make sure to backup this node of your registry just in case.

I also went a step further and prefixed my Tortoise handlers with numbers to give Tortoise priority over any of the other handlers. (I think that Tortoise does this automatically on 32-bit systems). Here's a new snapshot of my registry:



Once you've organized your registry accordingly, you can save yourself a reboot by killing the explorer.exe process within Task Manager and then restarting explorer again from the Task Manager. Check your folder again, and your overlay icons should appear.

No comments: