Tuesday, May 22, 2012

Icon Not See (Or: Cache Me If You Can)

Background. The other day, my daughter complained to me that her computer screen did not look right. In particular, the icons to Microsoft Office products in her start menu all had the same colorless generic appearance instead of showing distinctly colorful icons for Excel, PowerPoint, Word, and associated Office tools.

Now, my daughter is the perfectionist in our family: she insists that everything be just so. My son and I don't put much stock in fancy appearances as long as the software functions properly, which it apparently did. Just out of curiosity, though, I scoped out my son's machine and confronted the very same problem: his machine also displayed the same drab default icons for all Office menu items. To find the same problem on two different computers was suddenly cause for concern.

At this point, many analysts would immediately advocate re-installing Office to set things right again. To me, however, that is an extreme measure to be used only as a last resort. Instead, I much prefer to find the proximate cause of a problem in the hope that any new-found knowledge will translate into a simpler, more direct solution. The following narrative describes what I found.

1. Insure Icon Files Are In Their Proper Place

Some shortcuts created by Microsoft Windows installer programs have the Target field and the Find Target and Change Icon buttons grayed out when viewing the shortcut's Properties in the Shortcut tab. These shortcuts seem to rely on Class entries in the Registry to locate the icon file and icon number within the icon file. If that icon file is deleted, moved, or that registry entry is changed the shortcut will display the standard broken icon with no easy way to figure out where the problem is or fix it.

For Microsoft Office products, you can use Regedit to search for the files "wordicon.exe," "xlicons.exe," "pptico.exe," "outicon.exe," "accicons.exe," "misc.exe," etc. The purpose is to find the path or folder where Office expects to find these files so that you in turn can insure they are where the registry says they should be.

Searching the registry should lead you to one of the following folders:

Office 2003:
C:\WINDOWS\Installer\{91E30409-6000-11D3-8CFE-0150048383C9}
Office 2007:
C:\Windows\Installer\{90120000-0030-0000-0000-0000000FF1CE}
Office 2010:
C:\Windows\Installer\{90140000-003D-0000-0000-0000000FF1CE}

The folder you want to examine is by default hidden and protected. To reveal the folder so that you can then inspect its contents, you must
  • Open Windows Explorer as administrator
  • Select the "Tools | Folder Options..." menu
  • Select the "View" tab
  • Uncheck the "Hide protected operating system files (Recommended)" option
  • Click the "OK" button to save your selection
Once you have done so, navigate to the folder resulting from your registry search. If the required folder does not exist, then go ahead and manually create it.

My Office 2010 folder included 12 files with extension .exe and one with extension .ico; based on the file names (e.g., accicons, pptico, wordicon, xlicons, etc.) it is clear that the .exe files are indeed icon libraries. [There was also one other misfit file named ShellUI.MST which I ignored with no apparent ill consequences.]

I copied all 13 icon files (that is, everything except ShellUI.MST) to my newly-created folder and returned to the Start menu. Imagine my delight when I saw that all Office menu items now displayed a colorful, meaningful icon without even having to restart the computer. I thought I had solved the problem.

Almost, but not quite. On each or my two children's computers, I have established four separate accounts: one admin account for me and three general accounts: one for my son, one for my daughter, and another one for myself. With four accounts on each of two machines, that totals eight different accounts. Seven of those eight could now successfully view the icons in all Microsoft Office start menu shortcuts.

As luck would have it, it was my fussbudget daughter's account on her own computer that was the one account that still did not display properly. A graphic illustration of Murphy's Law at work.

All was not lost, however: my daughter's account was not a total failure. All of the programs listed in the "Microsoft Office 2010 Tools" sub-menu now displayed meaningful icons, as did OneNote in the main parent menu. Alas: the Big Three of Excel, PowerPoint, and Word all still displayed the dull, drab default icon, not their colorful trademark icon.

I briefly contemplated adding the ShellUI.MST file to the folder C:\Windows\Installer\{90140000-003D-0000-0000-0000000FF1CE} because that file was present in that folder on my own laptop. However, if seven of eight accounts on my children's two computers managed to work perfectly without that file, then its absence was clearly not causing the problem.

2. Chase a Wild Goose

If I were not fortunate enough to have access [pun intended] to the collection of icon files, I would have been compelled to try another alternative that I had read about. I now decided to give that method a try in the hopes that it would fix my one remaining problematic account.

This next measure was intended to be a repair process for broken shortcuts:
  • Open the Microsoft Office Picture Manager (file name: OIS.exe) as administrator
  • Click on the "Help | Detect and Repair..." menus
  • Check the "Restore my shortcuts while repairing" option
  • Click the "Start" button to begin the supposed repair process
When I did this, I waited what seemed like an eternity only to encounter the following error message:
"The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance."
In an attempt to overcome this new hurdle, I opened the Services window [select "Start orb | Control Panel | System and Security | Administrative Tools" and then double-click on "Service"]. Somewhat surprisingly, I found that the "Windows Installer" service was already active. I clicked the "Restart" link just to refresh that service. Still no luck: when I ran the Microsoft Office Picture Manager repair process again, I ran into the same error message as before. To quote the immortal Charlie Brown, "Rats!"

Even though this last tactic failed for me, I offer it to you readers as an option to consider because there were folks posting to on-line forums who reported that the method had worked for them. The more arrows in our quiver the more likely we are to eventually hit our target. And if I had not been fortunate enough to have all of the necessary icon files from a readily available computer with a functioning version of Office, this approach would have taken on greater importance to me.

3. Delete the Offending File

As it was, I now had reached the end of my rope. I had only one more alternative left to try. I felt that any remaining problem had to be related directly to my daughter's local account because all other accounts were now working correctly while only hers failed. After a little more research on Google, I took the following steps:
  • Logged on to my own admin account
  • Opened Windows Explorer
  • Navigated to my daughter's "C:\Users\[daughter's-user-name]\AppData\Local" folder
  • Promptly deleted her "IconCache.db" file
I then logged back on to my daughter's account to see what, if any, effect all my gyrations had produced.

Eureka! In her start menu, links to all Office elements, including the three troublesome programs (Excel, PowerPoint, and Word) now displayed their distinctive icons. Windows had re-generated a new "IconCache.db" file in my daughter's account. All was finally well, at least for the time being. Case closed - hopefully!

4. Prevent a Recurrence (?)

I include that qualification "hopefully" only because I have read numerous reports where this same problem continues to crop up over and over again. To prevent a recurrence, I offer the following recommended solution:
  • Open the registry editor (regedit.exe) as administrator
  • Navigate to the following registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer
  • In the right-hand pane, create a new REG_SZ (string value) called "Max Cached Icons" (omit quotes but include the spaces)
  • Enter a value of 4096 or even 8192. These are values in megabytes (Mb) and should increase the size Windows allows for the icon file from the anemic default of only 500 Mb to whatever larger value you have entered.
I have been fortunate so far in that the problem has not reared its ugly head a second time—yet. While I therefore have not had occasion to personally verify these last few steps, I am fully prepared to give them a try if the need arises. I feel mildly optimistic that these steps should help because Microsoft's own web site http://support.microsoft.com/kb/2396571 prescribes them.

Postscript: Because only three shortcuts remained broken (Excel, PowerPoint, and Word), it would have been a simple enough matter to open Windows Explorer, copy each executable file (Excel.exe, PowerOnt.exe, and WinWord.exe), and paste them as shorcuts to my daughter's individual start menu (as opposed to the "all users" start menu).

However, that is not really solving the basic problem; it is merely sweeping it under the carpet and evading it altogether. What fun would that be???



Make no mistake: this is a cosmetic problem only. It does not seem to affect Office's ability to function properly. Even without the icons present, the software itself seems to work just fine. Both of my children use Office for school at some time or other during virtually every week, so far without incident. However, the missing icons were an irritant I can very well do without.

Allow me one final cautionary note: even though the issue involved is largely cosmetic, there were any number of postings on public forums to the effect that "it sound like your system is corrrupted and that you need to re-install Office or even Windows." Beware of alarmists who pose radical solutions to mundane problems. There almost always will be a solution whose complexity will be more proportional to the nature of the problem. No need to detonate a nuclear warhead just to kill a mosquito.

Having said that, I am still left with at least three nagging unanswered questions:

Lingering Mystery #1: What caused the icon file folder to disappear from my children's laptops while remaining intact on my own Windows 7 laptop? They all have the exact same operating system; were made by the same manufacturer, Toshiba (albeit a different model with a different processor); and more importantly, had the exact same version of Microsoft Office 2010 installed. Indeed, Office was installed on all three machines from the very same CD ROM disk because it was the student version with licenses that allow installation on up to three machines. It so happens that I installed Office first on my machine and then on the machines belonging to my son and daughter. Wild thought: could the footprint left for the second and third installations be not quite *exactly* the same as the installation on the first machine? Pure conjecture on my part, but nothing about Microsoft products would suprise me any more.

Whatever the case may be, you can bet that I have placed those icon files in a single archive (zip) file for storage in a safe place so that if that same folder ever disappears again, I am sure to have the necessary files readily available.

Lingering Mystery #2: Why did restoring the missing folder with icon archive files fix seven of eight account but only partially repair the eighth? Even within my daughter's computer, the shortcut links are posted to a folder path available to all users; why do three user accounts see the link properly while my daughter's account cannot properly view that same shared link? What caused her "IconCache.db" file to misbehave so badly?

Lingering Mystery #3: Why did the Microsoft Office Picture Manager repair process fail so miserably? I could not get that to work even after I repaired all of my daughter's icons.

There you have it: as is so often the case with Microsoft products, I began with one single problem, and even though I eventually resolved that issue, doing so spawned three more unanswered questions. About par for Microsoft's course.

No comments:

Post a Comment