Adding a file to a directory
Markup to copy files to the end user's computer is probably going to make up the bulk of your installer. That's because for each file you want to install, which may number in the hundreds, there will be a corresponding XML element in your .wxs
file to represent it. In this recipe, we'll cover the basics—installing a single text file to a directory that we'll create under Program Files
. All file-types, whether plain text or binary, will follow this same pattern.
Getting ready
To prepare for this recipe, perform the following steps:
- Create a setup project and call it
FileInstaller
. - Add a text file to the project and name it
Sample.txt
. Although we're adding the file directly to the setup project, in most cases the source ...
Get WiX Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.