The "DirectoryTree" Command |
This command takes a directory specification in a fairly user friendly format and defines and possibly creates this directory entry in the MSI "Directory" table.
Directories created by this command are created via the MakeMsi "Directory" command.
The macro takes these parameters:
This is required to create an empty folder that may/will contain no files (maybe a "log" directory).
You do not need to create folders which contain files as folders are automatically created when files are installed.
You will generally use this parameter to remove "ICE64" validation errors which indicate that the folder may not be removed on uninstall (the folder will not be removed if files exist). on If you used the "MAKE" parameter it will use the same component otherwise it works the same as the "MAKE" parameter except that a component will never be created for you.
If not supplied then the "current" component information (see "Component" command) is used. If required (no current component), a component will be created.
Note that the directory key must be specified in the "CreateFolder" table table otherwise you should get validation errors and it won't work. You can use the "MAKE" parameter to add the info to the table.
If you find that varying one directory effects another's location then you should read the "Altering one Directory also effects Others" section.
EXAMPLES - Create Empty Folder |
Note that in the following example an empty folder is not removed on uninstallation, use the "REMOVE" parameter if this is required:
<$Component "CreateEmptyFolder" Create="Y" Directory_="EMPTYDIR"> <$DirectoryTree Key="EMPTYDIR" Dir="c:\EmptyDirectory" MAKE="Y"> <$/Component>
EXAMPLES - Other |
<$DirectoryTree Key="INSTALLDIR1" DIR="C:\A\B\C\D\E\F\G\InstallationDirectory"> ;;C: forced! (BY DEFAULT) - can be overriden from install command line though... <$DirectoryTree Key="INSTALLDIR2" DIR="[ProgramFilesFolder]\x\y\z\InstDir2"> ;;Tree starts at "ProgramFilesFolder" <$DirectoryTree Key="INSTALLDIR3" DIR="C:\Program Files\InstDir3"> ;;Because of preconfigured mapping will convert to use "ProgramFilesFolder"! <$DirectoryTree Key="INSTALLDIR4" DIR="C:\Program Files\AN83NAME.1|ALongDirectoryNameForWhichIHaveSuppliedASpecific_8.3_Name"> ;;Specify a specific 8.3 name