Adding an icon to a shortcut

Adding your own branded icons to your shortcuts will make them stand out. We can even have different icons for different purposes, such as one to denote the help documentation and another for a shortcut to the application itself. In this recipe, we'll see how to include an icon in our installer and have it displayed on a shortcut.

Getting ready

To prepare for this recipe, perform the following steps:

  1. Create a new setup project and call it IconShortcutInstaller.
  2. Set up your directory structure to include a folder in the Start menu:
    <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLFOLDER" Name="My Company" /> </Directory> <Directory Id="ProgramMenuFolder"> <Directory Id="MyCompanyStartMenuFolder" ...

Get WiX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.