cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mike2003
Level 3

Windows cannot find icon path on Win 2003 64bit

I have just starting testing my install on Windows Server 2003 64bit and have found a problem with the icon path of the shortcuts I am creating - everything works fine on 32bit.

The problem is that when I go into the properties of the shortcut and click Change Icon, a messagebox pops up saying 'Windows cannot find the file %ProgramFiles%\MyFolder\MyIcon.ico'. If I change the path to be %ProgramFiles(x86)%\MyFolder\MyIcon.ico then it works.

The problem is that when the shortcut is created, either Windows or Installshield is substituting the path to the icon incorrectly by using the 64bit Program Files path instead of the 32bit path.

I am using the AddFolderIcon function from InstallScript to create the icons and even if I hard code the path to use for the icon the substitution still takes place.

Is this a bug in InstallShield 2010 SP1?

Does anyone know a way around this?

Thanks.
Labels (1)
0 Kudos
(1) Reply
Copernicus
Level 3

Same issue on x64 editions of Vista and Windows 7 (and I guess on all x64 OS). For InstallScript installations the solutions is to add the following code before the call to the AddFolderIcon function.

if (SYSINFO.bIsWow64) then
StrReplace ( szIconPath, PROGRAMFILES, "%ProgramFiles(x86)%\\", 0 );
endif;

This is only valid for installing 32bit applications in the "Program Files (x86)" folder.
0 Kudos