Installing directories onto the target computer
Before we can install any files to the end user's system, we have to specify the directories where they'll go. These could be directories that already exist or new ones that we'll be creating. Either way, we'll be using the Directory
elements to form our folder structure. Our Directory
elements can be nested directly within our Product
element or separated into a Fragment
. The Fragment
approach has the advantage of being more modular, or in other words, keeps the concerns of making a directory structure separate from other chores such as installing files into those directories.
In this recipe, we will install some directories into the Program Files
folder. To keep things simple, we won't install any files yet. Since Windows Installer won't install empty directories, we'll have to put some kind of placeholder in for now. We can use the CreateFolder
element for this. Its job is simply to ensure the directory...