Skip to main content

ComponentInstallation Class

Represents an instance of a registered component.

Methods

MethodDescription
Components()Gets the set of installed components for products in the indicated context.

Properties

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

Components() Method

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

Declaration

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

Remarks

Win32 MSI API: MsiEnumComponentsEx

Exceptions

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

AllComponents Property

Gets the set of installed components for all products.

Declaration

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

Remarks

Win32 MSI API: MsiEnumComponents

Exceptions

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

ClientProducts Property

Gets all client products of a specified component.

Declaration

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

Remarks

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

Exceptions

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

ComponentCode Property

Gets the component code (GUID) of the component.

Declaration

public string ComponentCode { get; set; } 

Path Property

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.

Declaration

public string Path { get; set; } 

Remarks

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

Exceptions

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

Qualifiers Property

Gets the set of registered qualifiers for the component.

Declaration

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

Remarks

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

Exceptions

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

State Property

Gets the installed state of a component.

Declaration

public InstallState State { get; set; } 

Remarks

Win32 MSI API: MsiGetComponentPath , MsiGetComponentPathEx