Skip to content

InstallPathMap Class

Represents a mapping of install paths for all directories, components, or files in an installation database.

MethodDescription
Add(key, installPath)Sets an install path for a direcotry, component, or file key.
BuildComponentPathMap(db, directoryPathMap)Builds a mapping from Component keys to installation paths.
BuildDirectoryPathMap(db, useShortNames)Builds a mapping from Directory keys to installation paths.
BuildDirectoryPathMap(db, useShortNames, sourceRootDir, targetRootDir)Builds a mapping of Directory keys to directory paths, specifying root directories for the source and target paths.
BuildFilePathMap(db, componentPathMap, useShortNames)Builds a mapping from File keys to installation paths.
Clear()Removes all entries from the dictionary.
ContainsKey(key)Tests whether a direcotry, component, or file key exists in the map.
GetEnumerator()Gets an enumerator over all entries in the dictionary.
Remove(key)Removes an install path from the map.
PropertyDescription
CountGets the number of entries in the dictionary.
ItemGets or sets an install path for a direcotry, component, or file key.
KeysGets the collection of keys in the InstallPathMap. Depending on the type of InstallPathMap, they are all directory, component, or file key strings.
SourcePathsGets a mapping from keys to source paths.
TargetPathsGets a mapping from keys to target paths.
ValuesGets the collection of InstallPath values in the InstallPathMap.
WixToolset.Dtf.WindowsInstaller.Package.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

Sets an install path for a direcotry, component, or file key.

public void Add(
string key,
InstallPath installPath
)
ParameterTypeDescription
keystringDepending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table.
installPathInstallPathThe install path of the key item.

Changing an install path does not modify the Database used to generate this InstallPathMap.

BuildComponentPathMap(db, directoryPathMap) Method

Section titled “BuildComponentPathMap(db, directoryPathMap) Method”

Builds a mapping from Component keys to installation paths.

public static InstallPathMap BuildComponentPathMap(
WixToolset.Dtf.WindowsInstaller.Database db,
InstallPathMap directoryPathMap
)
ParameterTypeDescription
dbWixToolset.Dtf.WindowsInstaller.DatabaseInstallation database.
directoryPathMapInstallPathMapDirectory mapping returned by .

InstallPathMap An InstallPathMap with the described mapping.

BuildDirectoryPathMap(db, useShortNames) Method

Section titled “BuildDirectoryPathMap(db, useShortNames) Method”

Builds a mapping from Directory keys to installation paths.

public static InstallPathMap BuildDirectoryPathMap(
WixToolset.Dtf.WindowsInstaller.Database db,
bool useShortNames
)
ParameterTypeDescription
dbWixToolset.Dtf.WindowsInstaller.DatabaseInstallation database.
useShortNamesbooltrue to use short directory names; false to use long names

InstallPathMap An InstallPathMap with the described mapping.

BuildDirectoryPathMap(db, useShortNames, sourceRootDir, targetRootDir) Method

Section titled “BuildDirectoryPathMap(db, useShortNames, sourceRootDir, targetRootDir) Method”

Builds a mapping of Directory keys to directory paths, specifying root directories for the source and target paths.

public static InstallPathMap BuildDirectoryPathMap(
WixToolset.Dtf.WindowsInstaller.Database db,
bool useShortNames,
string sourceRootDir,
string targetRootDir
)
ParameterTypeDescription
dbWixToolset.Dtf.WindowsInstaller.DatabaseDatabase containing the Directory table.
useShortNamesbooltrue to use short directory names; false to use long names
sourceRootDirstringThe root directory path of all source paths, or null to leave them relative.
targetRootDirstringThe root directory path of all source paths, or null to leave them relative.

InstallPathMap An InstallPathMap with the described mapping.

BuildFilePathMap(db, componentPathMap, useShortNames) Method

Section titled “BuildFilePathMap(db, componentPathMap, useShortNames) Method”

Builds a mapping from File keys to installation paths.

public static InstallPathMap BuildFilePathMap(
WixToolset.Dtf.WindowsInstaller.Database db,
InstallPathMap componentPathMap,
bool useShortNames
)
ParameterTypeDescription
dbWixToolset.Dtf.WindowsInstaller.DatabaseInstallation database.
componentPathMapInstallPathMapComponent mapping returned by .
useShortNamesbooltrue to use short file names; false to use long names

InstallPathMap An InstallPathMap with the described mapping.

Removes all entries from the dictionary.

public void Clear()

Tests whether a direcotry, component, or file key exists in the map.

public bool ContainsKey(
string key
)
ParameterTypeDescription
keystringDepending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table.

bool true if the key is found; false otherwise

Gets an enumerator over all entries in the dictionary.

public IEnumerator<System.Collections.Generic.KeyValuePair`2<System.String,WixToolset.Dtf.WindowsInstaller.Package.InstallPath>> GetEnumerator()

IEnumerator<System.Collections.Generic.KeyValuePair2<System.String,WixToolset.Dtf.WindowsInstaller.Package.InstallPath>>` An enumerator for the dictionary.

Removes an install path from the map.

public bool Remove(
string key
)
ParameterTypeDescription
keystringDepending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table.

bool true if the item was removed, false if it did not exist

Changing an install path does not modify the Database used to generate this InstallPathMap.

Gets the number of entries in the dictionary.

public int Count { get; set; }

Gets or sets an install path for a direcotry, component, or file key.

public InstallPath Item[
string key
] { get; set; }
ParameterTypeDescription
keystringDepending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table.

Changing an install path does not modify the Database used to generate this InstallPathMap.

Gets the collection of keys in the InstallPathMap. Depending on the type of InstallPathMap, they are all directory, component, or file key strings.

public System.Collections.Generic.ICollection<System.String> Keys { get; set; }

Gets a mapping from keys to source paths.

public System.Collections.Generic.IDictionary<System.String,System.String> SourcePaths { get; set; }

Gets a mapping from keys to target paths.

public System.Collections.Generic.IDictionary<System.String,System.String> TargetPaths { get; set; }

Gets the collection of InstallPath values in the InstallPathMap.

public System.Collections.Generic.ICollection<WixToolset.Dtf.WindowsInstaller.Package.InstallPath> Values { get; set; }