Msi directory

From wikinotes

Documentation

official docs https://docs.microsoft.com/en-us/windows/win32/msi/directory-table
example https://docs.microsoft.com/en-us/windows/win32/msi/specifying-directory-structure

Overview

Table Columns
Directory data Unique-identifier for this directory entry.
Directory_Parent TARGETDIR Directory(column-id) of parent directory. Null means this current row represents the root TARGETDIR of the installation.
DefaultDir data
target:source
.source:.target
The name of the directory. (by default both src/dest).
Periods indicate directory references the parentdir directly, rather than a subdirectory within it.
source appears to refer to the MSI installer itself.

Directory table entries represent a mapping of every individual directory that will be created in your installation.

  • Only one directory is allowed without a Directory_Parent - this indicates the top-level target install directory
  • Every non-null Directory_Parent references another entry's Directory id.
# TODO: understand what boilerplate dirs really mean
entry(Directory='TARGETDIR',           Directory_Parent='',                    DefaultDir='SourceDir')   # ?
entry(Directory='ProgramFilesFolder',  Directory_Parent='TARGETDIR',           DefaultDir='.')           # ?
entry(Directory='data',                Directory_Parent='ProgramFilesFolder',  DefaultDir='data')        # ?/data