PDA

View Full Version : Incorrect shortcut icons being installed



Bob Murphy
01-07-2003, 12:56 PM
I am having a problem with the wrong shortcut icons being shown on the desktop and in the start menu after installation. This problem has just come up recently and I have spent a great deal of time looking into it without any good solution.

My environment is Windows 2000 Pro using Admin Studio 3.5 Std. with both value packs installed.

I have had the .NET framework installed for quite awhile.

The executables have been created with VB6 or VC++ 7 (.NET 2002 un-managed code).

The icons in the executables are all from Visual Studio .NET, no custom icons are being used.

I have several small MSI Basic install packages each of which installs one or two of the VB or VC++ programs. The programs are never advertised and shortcuts are placed on the desktop and in a folder under Start->Programs.

I have re-created ShellIconCache and run Repair Icons in the latest TweakUI several times. I have also set the Max Cached Icons registry key to 4096 which is it's maximum value. None of these have helped.

The NewShortcut.exe's and ARPPRODUCTICON.exe in the WINNT\Installer\{identifier} folder always show the correct icon when in Explorer.

The Add/Remove Programs icon is always correct but the desktop and menu icons are hit or miss. Sometimes one or both will be correct sometimes neither. The icons that are shown are always from other packages that I have recently created.

Manually changing the shortcut to use the programs icon works fine.

Hope this helps figure out this problem.

Thanks,
Bob Murphy

timelox
01-10-2003, 03:10 AM
I also have this problem with my InstallScript MSI projects. This is a strange problem though because it only happens on some machines.

My problem is that some of the icons for the shortcuts I install in the start menu will switch places with each other. On my test machine everything works as expected but on a few of my customers machines the icons are wrong.

To me this seems like an internal problem within either the installshield engine or the msi engine there is not much I can do from my end. The tables points to the correct icons (and are correctly installed on my test machine).

Bob Murphy
01-21-2003, 08:54 AM
I've found a way to fix this problem and learned a lot more about shortcuts and icons than I really wanted to know.

The most important thing is to give the icons a unique key in the Icon table. By default you get icon keys named NewShortcut1.exe, NewShortcut2.exe, etc. Apparently when you create multiple packages with the same named icons the system gets confused (that's a technical term there) and starts switching icons. Use the Direct Editor or Orca to give them better keys such as MailService.exe, FaxService.exe. Remember to change the Icon value in the Shortcut table to match your new icon keys. Giving the shortcuts unique names in the IDE does not help. I have tried this with a new test project and even when I give the shortcuts names like MailService, I still get the NewShortcut1 names for the icons. I do suggest changing the default shortcut names so that they will match the icon names that you are going to use.

Some other observations:

By default icons are extracted from the .exe file and are about 40k in size even if the embedded icon is only 2k. I now specify the .ico file in the IDE if it is available.

You can reuse the same icon if you have one on the desktop and one in the start menu. By default you get 2 icons but you can drop one from the Icon table and change the corresponding row in the Shortcut table to point to the remaining icon.

0tproy0
01-23-2003, 12:28 PM
Is anyone aware if they are even officially recognizing this problem?


Thanks for the research and sharing Bob. Seems to me the reason for using ISdev in the first place is to avoid having to do the table editing.......

Its driving me nuts since every time I build an install for my apps I have to explain to the marketing folks why their icons aren't right. You can imagine how much fun that is.

I have had LIMITED success with just changing the shortcut names in the IDE.

krisbg
10-01-2003, 05:39 AM
I have the same problems with IS8 and did what Bob Murphy suggests - it worked... But I make a uninstall shortcut from the script with CreateFolderIcon() and there is no icon key to set. So what to do in this case?

krisbg
10-01-2003, 06:03 AM
You must change the icon file name for shortcuts that are installed from the script with CreateFolderIcon

krisbg
10-02-2003, 04:23 AM
The desktop icon, the programs menu icons and the script-installed icons are ok, but still the icon of my application process on the task bar is the old one... Any suggestion?