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

Opening an installed HTML file after a successful installation

Suppose we include a file called Changelog.html in our installer that outlines the recent changes to our software. We can then display this file as soon as the installation has finished, giving the user a quick guide as to what's new. The UtilExtension namespace contains a custom action called WixShellExec that can open an HTML file in the user's default browser.

Conveniently, each of the UI wizards that ship with the WiX toolset ends with a dialog that can optionally display a checkbox with a customizable label. We can control what happens when the user clicks the checkbox. In this recipe, we'll add the Show Changelog label and launch our HTML file when the user checks the box.

Getting ready

To prepare for this recipe, perform the following steps:

  1. Create a new setup project and call it OpenHtmlDocumentInstaller.
  2. Add UIExtension to the project by right-clicking on the References node in Solution Explorer and navigating...