WiX: A Developer's Guide to Windows Installer XML

Nick Ramirez

500 Internal Server Error

500 Internal Server Error


nginx
Free Shipping! UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
The Author
Reviews
Downloads
  • Package your software into a single-file, double-click MSI for easy installation
  • Read and write to the Windows Registry and create, start, and stop Windows Services during installation
  • Write .NET code that performs specific tasks during installation via custom actions
  • Learn how the WiX command-line tools work to build and link your project
  • Become proficient with to-the-point examples and real-world advice

Book Details

Language : English
Paperback : 348 pages [ 235mm x 191mm ]
Release Date : October 2010
ISBN : 1849513724
ISBN 13 : 978-1-84951-372-2
Author(s) : Nick Ramirez
Topics and Technologies : All Books, Open Source


Table of Contents

Preface
Chapter 1: Getting Started
Chapter 2: Creating Files and Directories
Chapter 3: Putting Properties and AppSearch to Work
Chapter 4: Improving Control with Launch Conditions and Installed States
Chapter 5: Understanding the Installation Sequence
Chapter 6: Adding a User Interface
Chapter 7: Using UI Controls
Chapter 8: Tapping into Control Events
Chapter 9: Working from the Command Line
Chapter 10: Accessing the Windows Registry
Chapter 11: Controlling Windows Services
Chapter 12: Localizing Your Installer
Chapter 13: Upgrading and Patching
Index
  • Chapter 1: Getting Started
    • Introducing Windows Installer XML
      • What is WiX?
      • Is WiX for you?
      • Where can I get it?
      • Votive
      • A word about GUIDs
    • Your first WiX project
      • XML declaration and Wix element
      • Product element
      • Package element
      • Media element
      • Directories
      • Components
      • Files
      • Features
      • Start Menu shortcuts
      • Putting it all together
    • Adding a User Interface
    • Viewing the MSI database
      • Orca.exe
    • Turning logging on during installation
    • Other resources
    • Summary
  • Chapter 2: Creating Files and Directories
    • File element
    • DirectoryRef element
    • ComponentGroup element
    • Fragment element
    • Harvesting files with heat.exe
    • Copying and moving files
      • Copying files you install
      • Copying existing files
      • Moving existing files
    • Installing special-case files
      • Adding assembly files to the GAC
      • Installing a TrueType font
    • Creating an empty folder
    • Setting file permissions
    • Speeding up file installations
    • Summary
  • Chapter 3: Putting Properties and AppSearch to Work
    • Custom properties
      • Declaring and setting properties
      • Referencing properties
      • Property visibility and scope
      • Secure properties
      • Property datatypes
    • Predefined Windows Installer properties
      • Implied properties
      • Cited properties
    • AppSearch
      • DirectorySearch
      • FileSearch
      • ComponentSearch
      • RegistrySearch
      • IniFileSearch
    • Summary
  • Chapter 5: Understanding the Installation Sequence
    • InstallUISequence
      • UI standard actions
        • AppSearch
        • LaunchConditions
        • ValidateProductID
        • CostInitialize
        • FileCost
        • CostFinalize
        • ExecuteAction
    • InstallExecuteSequence
      • Execute standard actions
        • InstallValidate
        • InstallInitialize
        • ProcessComponents
        • UnpublishFeatures
        • RemoveRegistryValues
        • RemoveShortcuts
        • RemoveFiles
        • InstallFiles
        • CreateShortcuts
        • WriteRegistryValues
        • RegisterUser
        • RegisterProduct
        • PublishFeatures
        • PublishProduct
        • InstallFinalize
      • Immediate vs. deferred
    • Custom actions
      • Set a Windows Installer Property
      • Set the location of an Installed Directory
      • Run embedded VBScript or JScript
      • Call an external VBScript or JScript file
      • Call a function from a dynamic-link library
      • Trigger an executable
      • Send an error that stops the installation
    • Rollback custom actions
    • Accessing properties in a deferred action
    • Adding conditions to custom actions
    • Deployment Tools Foundation
      • Session object
      • Getting and setting properties
      • Logging
      • Showing a MessageBox
      • Accessing feature and component states
      • Querying the MSI database
      • Inserting rows into the MSI database
    • Summary
  • Chapter 6: Adding a User Interface
    • WiX standard dialog sets
      • WixUI_Advanced
      • WixUI_FeatureTree
      • WixUI_InstallDir
      • WixUI_Mondo
      • Customizing a standard dialog set
    • Creating your own dialogs
      • ICE20 errors
      • Adding dialog files
      • Scheduling dialogs
      • Dialog element
      • Adding TextStyle elements
      • Adding a tabbable control
      • Adding a progress dialog
    • Modal windows
    • ICE20 revisited
      • FilesInUse
      • Error
      • FatalError
      • UserExit
      • Exit
    • Summary
  • Chapter 7: Using UI Controls
    • Controls
      • PushButton
      • Text
      • ScrollableText
      • Line
      • GroupBox
      • Bitmap
      • Icon
      • Edit
      • MaskedEdit
      • PathEdit
      • CheckBox
      • RadioButtonGroup
      • ComboBox
      • ListBox
      • ListView
      • DirectoryList
      • DirectoryCombo
      • SelectionTree
      • VolumeCostList
      • VolumeSelectCombo
      • Billboard
      • ProgressBar
    • Summary
  • Chapter 8: Tapping into Control Events
    • Publish element
    • Subscribe element
    • Publish events
      • AddLocal
      • DoAction
      • EndDialog
      • NewDialog
      • Publishing a property
    • Subscribe events
      • ScriptInProgress
      • SelectionAction
      • TimeRemaining
    • Summary
  • Chapter 9: Working from the Command Line
    • Candle.exe
      • Command-line arguments (compiling)
        • -arch
        • -d
        • -ext
        • -fips
        • -I
        • -nologo
        • -o
        • -p
        • -pedantic
        • -sfdvital
        • -ss
        • -sw
        • -trace
        • -v
        • -wx
      • Response files
      • .wixobj files
    • Compile-time variables
      • Environment variables
      • System variables
      • Custom variables
      • Preprocessor extensions
    • Conditional statements and iterations
      • if...elseif...else
      • ifdef
      • ifndef
      • Iterations
      • Errors and warnings
    • Light.exe
      • Command-line arguments (linking)
        • -ai
        • -b
        • -bf
        • -binder
        • -cultures
        • -d
        • -dut
        • -ext
        • -loc
        • -nologo
        • -notidy
        • -o[ut]
        • -pedantic
        • -sadmin
        • -sadv
        • -sloc
        • -sma
        • -ss
        • -sts
        • -sui
        • -sv
        • -sw[N]
        • -usf <output.xml>
        • -v
        • -wx[N]
        • -xo
      • Command-line arguments (binding)
        • -bcgg
        • -cc <path>
        • -ct <N>
        • -cub <file.cub>
        • -dcl:level
        • -eav
        • -fv
        • -ice<ICE>
        • -pdbout <output.wixpdb>
        • -reusecab
        • -sa
        • -sacl
        • -sf
        • -sh
        • -sice:<ICE>
        • -sl
        • -spdb
        • -sval
    • Link-time variables
      • Localization variables
      • Binder variables
      • Custom variables
    • Building an installer without Visual Studio
    • Summary
  • Chapter 10: Accessing the Windows Registry
    • Reading from the Registry
    • Writing to the Registry
      • RegistryValue
      • RegistryKey
      • Setting NeverOverwrite
    • Removing Registry values
      • RemoveRegistryKey
      • RemoveRegistryValue
    • Copying Registry values
    • Registry permissions
    • Summary
  • Chapter 11: Controlling Windows Services
    • Creating a simple Windows service
    • Using sc.exe
    • Using WiX to install a service
    • Starting, stopping, and uninstalling a service
    • Setting the service's user account
    • Adding service dependencies
    • Service recovery with Util:ServiceConfig
    • Summary
  • Chapter 12: Localizing Your Installer
    • Setting language and code page attributes
      • Package element
      • Product element
    • WiX localization files
    • The role of Light.exe
    • Localizing error messages
    • Localizing the EULA
    • Creating a multi-language MSI
    • Summary
  • Chapter 13: Upgrading and Patching
    • Planning for updates
      • Choosing an update type
      • Per-user or per-machine
    • Major upgrade
    • Minor upgrade
      • Authoring a patch file
      • Building the patch on the command line
    • Small update
    • Summary

Nick Ramirez

Nick Ramirez is a software engineer at Sophos in Columbus, Ohio where he works installing code for the company's enterprise products. As a member of the engineering team, he also spends time coding C#, WPF, and other Windows technologies. He is an active contributor to the WiX discussion forum.
Nick lives in Columbus with his soon-to-be wife, Heidi.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Find your book in our support section to find errata and to download code samples.

What you will learn from this book

  • Install, start, stop, and uninstall Windows Services at the time of setup
  • Make your project more modular with Fragments, ComponentRefs, and ComponentGroups
  • Learn tips for installing special types of files such as font files and how to optimize copying speed
  • Prevent users from installing your software on unsupported operating systems and introduce other pre-requisite checks
  • Gain an understanding of the order in which events happen during an install and how to add your own actions to this sequence
  • Build a customized user interface that meets the unique requirements of your project
  • Understand how WiX builds and links your files into the final MSI package and how to control this process
  • Read and write to the Windows Registry with XML
  • Build various language-specific installers without duplicating large amounts of code
  • Create rules for checking for and removing older versions of your software or to patch existing files

Special Offers

PacktLib gives you access to this and 600+ other titles with an annual or monthly subscription.
500 Internal Server Error

500 Internal Server Error


nginx
Buy 2 eBooks and Get 50% Off +
Buy WiX: A Developer's Guide to Windows Installer XML with Software Testing using Visual Studio 2010 and get 50% off both the eBooks.
 
Just add both the eBooks to your shopping cart and enter stwidg in the 'Enter Promotion Code' field. Click 'Add Promotion Code' and the discount will be applied.
View Best Selling eBook offers

In Detail

WiX is an open source project and a toolset that builds Windows installation packages from XML source code. WiX, which is used internally by Microsoft and by many companies around the World, simplifies many of the installation tasks that used to be shrouded in mystery. The tool set provides a command-line environment that you can integrate into your old-style build processes or you can use the newer technology from inside integrated development environments to build your setup packages. You'll find that you understand your installer better, can create it in less time, and save money in the process. No one really wants to devote a lifetime to understanding how to create a hassle-free installer for any software.

This hands-on guide takes the mystery out of Windows Installer by showing how simple XML elements can be leveraged to create a sophisticated install package. By relying on Microsoft standards, you'll be able to use features like Property elements to customize your application's entry in Add/Remove Programs, the Shortcut element to create Start menu shortcuts, and other specialized elements for building upgrade and patch support and more.

This book will show you the fundamental ingredients needed to build a professional-grade installer using Windows Installer XML. The initial chapters will introduce you to the set of required elements necessary to build a simple installer. We'll then explore those basic elements in more detail and see how best to use them in the real world.In the ensuing chapters, you'll move on to learn about adding conditions that alter what the user can install, then how to add actions to the install sequence and how to author a user interface. We'll move on to advanced topics such as editing data in the Windows Registry, installing a Windows service, and building your project from the command line. Finally, you'll learn to localize your package for different languages and detect older versions during upgrades. Each chapter uses to-the-point examples to illustrate the best way to use the language.

Create a hassle-free installer for your Windows software using WiX

Approach

A practical guide, this book provides step-by-step instructions for building your installer, showcasing real-world examples throughout. Its purpose is to get the professional developer building installers in no time without getting bogged down in theory. Numerous references to additional resources are provided so that curious readers can supplement the knowledge they gain here with additional details.

Who this book is for

If you are a developer and want to create installers for software targeting the Windows platform, then this book is for you. You'll be using a lot of XML so that you get accustomed to the basics of writing well-formed documents, using XML namespaces and the dos and don'ts of structuring elements and attributes. You should know your way around Visual Studio, at least enough to compile projects, add project references, and tweak project properties. No prior knowledge of Windows Installer or WiX is assumed.

Are there no books available that are right for you at the moment? How about signing up to our newsletter to keep up to date?
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Sort A-Z