Repair incorrect icon associations

Have you ever had a problem with incorrect icons in OS X—instead of seeing the proper “zipper” icon for zip files, for example, you see a FireWire drive icon or a disk image icon. When I’ve been asked about this in the past, I never had an answer for how to fix it beyond “reboot and hope it goes away?” Either that advice worked, or those to whom I provided it realized I knew nothing on the subject and didn’t bother to write back.

Now, however, I know the real cause of the problem, and an effective solution. The icon problem is caused by corruption in the Launch Services database. Launch Services, as described by Apple, is “…an API that enables a running application to open other applications or their document files or URLs (uniform resource locators) in a way similar to the Finder or the Dock.”

The solution to the incorrect icon problem is to rebuild the Launch Services database, which is the same solution to another problem—double entries in the Open With menu, as described in our Leopard Power Tips article.

There are many ways to rebuild the Launch Services database. The easiest is to use a third-party utility such as Cocktail or TinkerTool. If you’d rather not use a third-party app, you can do it yourself in Terminal (in Applications -> Utilities). If you’re running Mac OS X 10.5, execute this command:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

If you’re running 10.4, the path to the lsregister program differs; use this command instead:

/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

You don’t need to logout or restart for this fix to work; you should see that the incorrect icon associations have been fixed as soon as the command completes.

Shop Tech Products at Amazon