Directory Type

The Directory Type of semantic type is one of the Key Format Types, which consists of a foreign key into the Directory table provided by the user.

The merge tool must substitute a valid Windows Installer Identifier for items of this type. Mergemod.dll does not enforce this restriction and it is up to the merge tool to ensure that the user provides a valid key into the Directory table.

A configurable item of the Directory type should only modify the destination directory of the installation and not modify the source image. A configurable item of this type should therefore only modify foreign keys to the Directory table and not modify the Directory table directly.

Because the Directory_ column of the Component table is non-nullable, null is an invalid value for a configurable item of this type even if the msmConfigItemNonNullable is not set in the Attributes column.

The Directory type may be used with two kinds of ContextData.

IsolationDirectory ContextData

A configurable merge module may use this type to enable the user to provide a destination directory for files in the module. The merge tool substitutes the directory's identifier into the templates in the Value column of the ModuleSubstitution table. To specify a configurable item of this type, module authors should enter the name of the directory into the Name column, enter "1" into the Format column, enter "Directory" into the Type column, and enter "IsolationDirectory" into the ContextData column of the ModuleConfiguration table.

ShortcutLocation ContextData

A configurable merge module may use this type to enable the user to provide a destination directory for shortcuts in the module. The merge tool substitutes the shortcut's identifier into the templates in the Value column of the ModuleSubstitution table. To specify a configurable item of this type, module authors should enter the name of the directory into the Name column, enter "1" into the Format column, enter "Directory" into the Type column, and enter "ShortcutLocation" into the ContextData column of the ModuleConfiguration table.