Specifying the Icon for a Shortcut

InstallShield 2019

Project • This information applies to the following project types:

Basic MSI
DIM
InstallScript
InstallScript MSI
InstallScript Object
Merge Module
MSI Database
MSM Database
Transform

InstallShield enables you to specify the icon that should be used for a shortcut that is created on the target system at run time.

To specify the icon for a shortcut:

1. In the View List under System Configuration, click Shortcuts.
2. In the Shortcuts explorer, click the shortcut whose icon you want to specify. The shortcut’s settings are displayed in the right pane.
3. In the Icon File setting, specify the file that contains the icon for the shortcut that you are creating. You must specify an .ico file or the executable file (.dll or .exe) that contains the icon resource.

For Basic MSI, InstallScript MSI, or Merge Module projects: You can either type the fully qualified path to the file that contains the icon, or click the ellipsis (...) button to browse to it.

For InstallScript projects: Type the fully qualified path to the file on the target system that contains the icon.

4. If the icon file that you specify contains more than one icon resource, enter the index in the Icon Index setting.

A nonnegative integer refers to the order of the icon resources in the executable file. For example, 0 refers to the first icon in the file, 1 refers to the second icon, and 2 refers to the third icon.

InstallShield changes the icon that is displayed for the shortcut in the Shortcuts explorer to the one that you specified, unless either of the following conditions is true:

The project type is InstallScript.
The shortcut is for a pre-existing file on the target system.

For both of the aforementioned conditions, the icon file is not known until run time. Therefore, InstallShield shows the following icon for each shortcut in the Shortcuts explorer, instead of displaying the icon that is used at run time on target systems.

InstallShield also uses this icon for a shortcut in the Shortcuts explorer if the file that is selected in the Icon File setting does not contain an icon.

Project • For Basic MSI, InstallScript MSI, and Merge Module projects: Since Windows Installer requires a separate icon when the component is advertised, InstallShield extracts the icon from any executable file that you specify.

Tip • For Basic MSI, InstallScript MSI, and merge module projects: You can also right-click the icon in the Shortcuts view and then click Change Shortcut icon to specify a different shortcut icon. InstallShield updates the value in the Icon settings with the values that you specify using this method.

See Also