-
Book Overview & Buying
-
Table Of Contents
WiX 3.6: A Developer's Guide to Windows Installer XML
In the previous chapter, you saw that to define which directories to copy your files into, you use Directory
elements. These take an Id value and, if it's a new directory that you're creating, a Name attribute. You can use any of the built-in IDs to reference one of the common Windows directories. For example, suppose we wanted to add an XML configuration file for our software to the %PROGRAMDATA% folder. We'd add a reference to it using the built-in CommonAppDataFolder property as Directory Id:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="CommonAppDataFolder">
<Directory Id="MyCommonAppDataFolder"
Name="Awesome Software" />
</Directory>
</Directory>Here we are placing a new folder called Awesome Software inside the %PROGRAMDATA% folder. The new folder gets a Name attribute to label it. The Id attribute is up to us and uniquely identifies the directory in the MSI database. To add a file to...