Skip to content

ComponentInfo Class

Provides access to information about a component within the context of an installation session.

MethodDescription
GetCost(installState)Gets disk space per drive required to install a component.
PropertyDescription
CurrentStateGets the current install state of the designated Component.
NameGets the name of the component (primary key in the Component table).
RequestStateGets or sets the action state of the designated Component.
WixToolset.Dtf.WindowsInstaller.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

Gets disk space per drive required to install a component.

public IList<WixToolset.Dtf.WindowsInstaller.InstallCost> GetCost(
InstallState installState
)
ParameterTypeDescription
installStateInstallStateRequested component state

IList<WixToolset.Dtf.WindowsInstaller.InstallCost> A list of InstallCost structures, specifying the cost for each drive for the component

Win32 MSI API: MsiEnumComponentCosts

Gets the current install state of the designated Component.

public InstallState CurrentState { get; set; }

Win32 MSI API: MsiGetComponentState

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown Component was requested

Gets the name of the component (primary key in the Component table).

public string Name { get; set; }

Gets or sets the action state of the designated Component.

public InstallState RequestState { get; set; }

Win32 MSI APIs: MsiGetComponentState , MsiSetComponentState

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown Component was requested
T:WixToolset.Dtf.WindowsInstaller.InstallCanceledExceptionthe user exited the installation