Book Image

WiX Cookbook

By : Nicholas Matthew Ramirez
1 (1)
Book Image

WiX Cookbook

1 (1)
By: Nicholas Matthew Ramirez

Overview of this book

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...