Book Image

WiX Cookbook

By : Nicholas Matthew Ramirez
1 (1)
Book Image

WiX Cookbook

1 (1)
By: Nicholas Matthew Ramirez

Overview of this book

WiX is a dialect of XML used to make installers for Windows. Its declarative style avoids the complexity and limitations of procedural code, providing you with everything you need to package up an entire application into a single MSI file. This book gives you a good overview of WiX's capabilities to develop your own installer packages with functionalities beyond those available in Windows Installer. In the recipes of this book, you will see ways in which WiX can cut down on your installation time and help you streamline your deployment processes. You will see how to make customized installer UIs, write custom actions, create shortcuts, and also set your application as the default for a file type.
Table of Contents (15 chapters)
14
Index

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" 
          Name="My Company" />
      </Directory>
    </Directory>
  3. Include a text file...