WiX Cookbook

Over 60 hands-on recipes packed with tips and tricks to boost your Windows installations
Preview in Mapt

WiX Cookbook

Nick Ramirez

3 customer reviews
Over 60 hands-on recipes packed with tips and tricks to boost your Windows installations

Quick links: > What will you learn?> Table of content> Product reviews

Mapt Subscription
FREE
$29.99/m after trial
eBook
$18.90
RRP $26.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$18.90
$44.99
$29.99 p/m after trial
RRP $26.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


WiX Cookbook Book Cover
WiX Cookbook
$ 26.99
$ 18.90
WiX: A Developer's Guide to Windows Installer XML Book Cover
WiX: A Developer's Guide to Windows Installer XML
$ 29.99
$ 21.00
Buy 2 for $35.00
Save $21.98
Add to Cart

Book Details

ISBN 139781784393212
Paperback260 pages

Book Description

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

Chapter 1: Organizing and Building WiX Projects
Introduction
Installing WiX and creating a new project in Visual Studio 2013
Referencing the output of a .NET console application in a WiX project by using a preprocessor variable
Separating a portion of WIX markup into its own library
Compiling a WiX installer on a build machine using MSBuild
Building a WiX installer from the command line
Chapter 2: Installing Files and Directories
Introduction
Installing directories onto the target computer
Adding a file to a directory
Installing a 64-bit executable file to Program Files
Including one component or another depending on the condition
Using the heat.exe tool to generate components
Chapter 3: File and Folder Permissions
Introduction
Changing the permissions on a folder for a user
Changing the permissions on a file for a user
Marking a file as read only
Creating a file share
Setting the default program for a file type
Chapter 4: Shortcuts
Introduction
Adding an application shortcut to the Start menu
Adding an icon to a shortcut
Placing a shortcut on the desktop
Creating a shortcut to a folder
Creating an advertised shortcut that installs a feature on demand
Chapter 5: Editing XML Files during Installation
Introduction
Adding a new element to an XML file during installation
Setting the value of an attribute on an XML element
Inserting inner text into an XML element
Adding an XML element only if it does not already exist
Removing an XML element
Chapter 6: Custom Actions
Introduction
Creating a C# custom action and referencing it in your project
Passing information entered by a user to a deferred custom action
Preventing custom action data from being displayed in the install log
Running an executable as a custom action without showing a console window by using CAQuietExec
Testing rollback custom actions with WixFailWhenDeferred
Chapter 7: Installing Wizards
Introduction
Adding a wizard to guide users through the installation
Changing the logo images and default license agreement text of the wizard
Customizing the wizard by adding a new dialog window to it
Deciding which dialog to show next depending on the user's choices
Setting a property based on user input
Chapter 8: Users and Groups
Introduction
Creating a local user
Adding a new user to a new group
Adding a new user to an existing group
Adding an existing user to a new group
Adding a new user with the log on as a service security setting
Chapter 9: Handling Prerequisites
Introduction
Stopping the installation with a launch condition
Installing only to supported versions of Windows
Redistributing the .NET Framework with a bootstrapper
Executing either a 64-bit or 32-bit MSI depending on the user's operating system
Downloading resources from the Web with a web installer
Chapter 10: Installing Websites
Introduction
Spinning up a new application pool in IIS
Adding a website to IIS that runs under your app pool
Creating a virtual directory
Adding a web application to IIS
Setting up a website to use SSL
Chapter 11: Linking to the Web
Introduction
Adding a hyperlink control to a wizard dialog
Opening an installed HTML file after a successful installation
Launching a web page when a user uninstalls our software
Installing a shortcut that opens a web page
Updating programs and features to show a link to our company's website
Chapter 12: Installing SQL Server Databases
Introduction
Installing a SQL Server instance with a bootstrapper
Adding a database to a SQL Server instance
Creating a table within a SQL Server database
Inserting data into a database table
Creating an ODBC data source for a SQL Server instance
Chapter 13: Admin Tasks
Introduction
Setting an environment variable
Creating a scheduled task
Defining a new event source for the Windows event viewer
Registering a performance counter
Adding an exception to Windows Firewall

What You Will Learn

  • Install websites, application pools, and virtual directories in IIS
  • Add a wizard to your installer and customize it with your own dialogs
  • Set up new user accounts, add security groups, and secure files and folders on installation
  • Prevent deployment to unsupported systems by using launch conditions
  • Update XML files during installation
  • Configure shortcuts to your application
  • Include prerequisites with a bootstrapper
  • Create custom actions using C#
  • Add environment variables to the system

Authors

Table of Contents

Chapter 1: Organizing and Building WiX Projects
Introduction
Installing WiX and creating a new project in Visual Studio 2013
Referencing the output of a .NET console application in a WiX project by using a preprocessor variable
Separating a portion of WIX markup into its own library
Compiling a WiX installer on a build machine using MSBuild
Building a WiX installer from the command line
Chapter 2: Installing Files and Directories
Introduction
Installing directories onto the target computer
Adding a file to a directory
Installing a 64-bit executable file to Program Files
Including one component or another depending on the condition
Using the heat.exe tool to generate components
Chapter 3: File and Folder Permissions
Introduction
Changing the permissions on a folder for a user
Changing the permissions on a file for a user
Marking a file as read only
Creating a file share
Setting the default program for a file type
Chapter 4: Shortcuts
Introduction
Adding an application shortcut to the Start menu
Adding an icon to a shortcut
Placing a shortcut on the desktop
Creating a shortcut to a folder
Creating an advertised shortcut that installs a feature on demand
Chapter 5: Editing XML Files during Installation
Introduction
Adding a new element to an XML file during installation
Setting the value of an attribute on an XML element
Inserting inner text into an XML element
Adding an XML element only if it does not already exist
Removing an XML element
Chapter 6: Custom Actions
Introduction
Creating a C# custom action and referencing it in your project
Passing information entered by a user to a deferred custom action
Preventing custom action data from being displayed in the install log
Running an executable as a custom action without showing a console window by using CAQuietExec
Testing rollback custom actions with WixFailWhenDeferred
Chapter 7: Installing Wizards
Introduction
Adding a wizard to guide users through the installation
Changing the logo images and default license agreement text of the wizard
Customizing the wizard by adding a new dialog window to it
Deciding which dialog to show next depending on the user's choices
Setting a property based on user input
Chapter 8: Users and Groups
Introduction
Creating a local user
Adding a new user to a new group
Adding a new user to an existing group
Adding an existing user to a new group
Adding a new user with the log on as a service security setting
Chapter 9: Handling Prerequisites
Introduction
Stopping the installation with a launch condition
Installing only to supported versions of Windows
Redistributing the .NET Framework with a bootstrapper
Executing either a 64-bit or 32-bit MSI depending on the user's operating system
Downloading resources from the Web with a web installer
Chapter 10: Installing Websites
Introduction
Spinning up a new application pool in IIS
Adding a website to IIS that runs under your app pool
Creating a virtual directory
Adding a web application to IIS
Setting up a website to use SSL
Chapter 11: Linking to the Web
Introduction
Adding a hyperlink control to a wizard dialog
Opening an installed HTML file after a successful installation
Launching a web page when a user uninstalls our software
Installing a shortcut that opens a web page
Updating programs and features to show a link to our company's website
Chapter 12: Installing SQL Server Databases
Introduction
Installing a SQL Server instance with a bootstrapper
Adding a database to a SQL Server instance
Creating a table within a SQL Server database
Inserting data into a database table
Creating an ODBC data source for a SQL Server instance
Chapter 13: Admin Tasks
Introduction
Setting an environment variable
Creating a scheduled task
Defining a new event source for the Windows event viewer
Registering a performance counter
Adding an exception to Windows Firewall

Book Details

ISBN 139781784393212
Paperback260 pages
Read More
From 3 reviews

Read More Reviews

Recommended for You

WiX: A Developer's Guide to Windows Installer XML Book Cover
WiX: A Developer's Guide to Windows Installer XML
$ 29.99
$ 21.00
Web Development with Bootstrap 4 and Angular 2 - Second Edition Book Cover
Web Development with Bootstrap 4 and Angular 2 - Second Edition
$ 39.99
$ 28.00
ASP.NET Core and Angular 2 Book Cover
ASP.NET Core and Angular 2
$ 35.99
$ 25.20
Mastering C# and .NET Framework Book Cover
Mastering C# and .NET Framework
$ 35.99
$ 25.20
ASP.NET Web API Security Essentials Book Cover
ASP.NET Web API Security Essentials
$ 27.99
$ 19.60
Understanding TCP/IP Book Cover
Understanding TCP/IP
$ 22.99
$ 16.10