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

Installing a shortcut that opens a web page

In the previous recipes, we added a shortcut to our software on the Start menu. We can also add a shortcut to a web page—perhaps one where the user can find information about other related products. It's a great way to keep the resources front and center. In this recipe, we'll add a shortcut to the Start menu that opens the website, http://www.packtpub.com.

Getting ready

To prepare for this recipe, create a new setup project and name it WebPageShortcutInstaller.

How to do it...

Include an InternetShortcut element from UtilExtension to create a shortcut to a website, as shown in the following steps:

  1. Add UtilExtension to the project by right-clicking on the References node in Solution Explorer and navigating to Add Reference... | WixUtilExtension.dll | Add | OK.
  2. Add the util namespace to the Wix element:
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
    xmlns:util="http://schemas.microsoft.com/wix/UtilExtension&quot...