DirectoryRef element
In the previous chapter, you saw that to define which directories to copy your files into, you use Directory
elements. These take an Id
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 a file to the C:\Windows\system32
folder. We'd add a reference to it using the built-in SystemFolder
property for its Id
:
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="SystemFolder" /> </Directory>
If, on the other hand, it's a directory that you're creating, you can set the Id
to anything you like. The Name
attribute will set the name of the new folder. After you've defined the directories that you want to use (or create) with Directory
elements, you'll use DirectoryRef
elements to add components to them.
<DirectoryRef Id="SystemFolder"> <Component Id="CMP_AnotherFileDLL" Guid...