Reader small image

You're reading from  WiX Cookbook

Product typeBook
Published inJan 2015
Reading LevelBeginner
Publisher
ISBN-139781784393212
Edition1st Edition
Languages
Right arrow
Author (1)
Nicholas Matthew Ramirez
Nicholas Matthew Ramirez
author image
Nicholas Matthew Ramirez

Nick Ramirez is a software developer living in Columbus, Ohio. As a believer that deployment shouldn't be terrifying, he has become a big fan of technologies such as WiX. His other related interests include build automation, software architecture, and playing Minecraft. Nick lives with his wife and two cats.
Read more about Nicholas Matthew Ramirez

Right arrow

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:

  1. Create a setup project and call it FileInstaller.

  2. 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 files we use will be from other projects or folders.

  3. Update the default directory structure to the following wherein a folder called My Software is added to the Program Files directory:

    <Fragment>
      <Directory Id="TARGETDIR" Name="SourceDir...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
WiX Cookbook
Published in: Jan 2015Publisher: ISBN-13: 9781784393212

Author (1)

author image
Nicholas Matthew Ramirez

Nick Ramirez is a software developer living in Columbus, Ohio. As a believer that deployment shouldn't be terrifying, he has become a big fan of technologies such as WiX. His other related interests include build automation, software architecture, and playing Minecraft. Nick lives with his wife and two cats.
Read more about Nicholas Matthew Ramirez