msi: Check whether the component is enabled first.

This commit is contained in:
Mike McCormack 2006-11-10 15:38:51 +09:00 committed by Alexandre Julliard
parent ad80eceb5f
commit 87fa854dcf
1 changed files with 4 additions and 3 deletions

View File

@ -1800,6 +1800,9 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
{
component = cl->component;
if (!component->Enabled)
continue;
if (component->Attributes & msidbComponentAttributesOptional)
msi_component_set_state( component, INSTALLSTATE_DEFAULT );
else
@ -1813,9 +1816,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
if (component->ForceLocalState)
msi_component_set_state( component, INSTALLSTATE_LOCAL );
if (!component->Enabled)
msi_component_set_state( component, INSTALLSTATE_UNKNOWN );
else if (feature->Attributes == msidbFeatureAttributesFavorLocal)
if (feature->Attributes == msidbFeatureAttributesFavorLocal)
{
if (!(component->Attributes & msidbComponentAttributesSourceOnly))
msi_component_set_state( component, INSTALLSTATE_LOCAL );