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 (20 chapters)
WiX Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Placing a shortcut on the desktop


The Start menu is the best place to place application shortcuts because it keeps them organized and users only see them when they want to. The desktop comes in second though, displaying a user's favorite links front and center.

In this recipe, we'll place a shortcut to our Sample.txt file on the user's desktop. As we've discussed previously, who will see this shortcut depends on the value of the Package element's InstallScope attribute. When it's set to perMachine, all users will see the shortcut. When set to perUser, it will be installed only for the current user.

Getting ready

To prepare for this recipe, perform the following steps:

  1. Create a new setup project and name it DesktopShortcutInstaller.

  2. Include a text file named Sample.txt in the project and add a Component element to the Product.wxs file:

    <ComponentGroup Id="ProductComponents" 
                    Directory="INSTALLFOLDER">
      <Component Id="cmpSampleTXT" 
                 Guid="{EB57CD24-8DEE-41EC...