Skip to content

ComponentInstallation Class

Represents an instance of a registered component.

MethodDescription
Components()Gets the set of installed components for products in the indicated context.
PropertyDescription
AllComponentsGets the set of installed components for all products.
ClientProductsGets all client products of a specified component.
ComponentCodeGets the component code (GUID) of the component.
PathGets the full path to an installed component. If the key path for the component is a registry key then the registry key is returned.
QualifiersGets the set of registered qualifiers for the component.
StateGets the installed state of a component.
WixToolset.Dtf.WindowsInstaller.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

Gets the set of installed components for products in the indicated context.

public static IEnumerable<WixToolset.Dtf.WindowsInstaller.ComponentInstallation> Components()

Win32 MSI API: MsiEnumComponentsEx

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InstallerExceptionThe installer configuration data is corrupt

Gets the set of installed components for all products.

public static IEnumerable<WixToolset.Dtf.WindowsInstaller.ComponentInstallation> AllComponents { get; set; }

Win32 MSI API: MsiEnumComponents

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InstallerExceptionThe installer configuration data is corrupt

Gets all client products of a specified component.

public IEnumerable<WixToolset.Dtf.WindowsInstaller.ProductInstallation> ClientProducts { get; set; }

Because clients are not ordered, any new component has an arbitrary index. This means that the property may return clients in any order. Win32 MSI API: MsiEnumClients , MsiEnumClientsEx

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InstallerExceptionThe installer configuration data is corrupt

Gets the component code (GUID) of the component.

public string ComponentCode { get; set; }

Gets the full path to an installed component. If the key path for the component is a registry key then the registry key is returned.

public string Path { get; set; }

If the component is a registry key, the registry roots are represented numerically. For example, a registry path of “HKEY_CURRENT_USER\SOFTWARE\Microsoft” would be returned as “01:\SOFTWARE\Microsoft”. The registry roots returned are defined as follows: HKEY_CLASSES_ROOT=00, HKEY_CURRENT_USER=01, HKEY_LOCAL_MACHINE=02, HKEY_USERS=03, HKEY_PERFORMANCE_DATA=04 Win32 MSI APIs: MsiGetComponentPath , MsiGetComponentPathEx , MsiLocateComponent

ExceptionDescription
T:System.ArgumentExceptionAn unknown product or component was specified
T:WixToolset.Dtf.WindowsInstaller.InstallerExceptionThe installer configuration data is corrupt

Gets the set of registered qualifiers for the component.

public IEnumerable<WixToolset.Dtf.WindowsInstaller.ComponentInstallation+Qualifier> Qualifiers { get; set; }

Because qualifiers are not ordered, any new qualifier has an arbitrary index, meaning the function can return qualifiers in any order. Win32 MSI API: MsiEnumComponentQualifiers

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InstallerExceptionThe installer configuration data is corrupt

Gets the installed state of a component.

public InstallState State { get; set; }

Win32 MSI API: MsiGetComponentPath , MsiGetComponentPathEx