Commit 87fa854d authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

msi: Check whether the component is enabled first.

parent ad80eceb
...@@ -1800,6 +1800,9 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) ...@@ -1800,6 +1800,9 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
{ {
component = cl->component; component = cl->component;
if (!component->Enabled)
continue;
if (component->Attributes & msidbComponentAttributesOptional) if (component->Attributes & msidbComponentAttributesOptional)
msi_component_set_state( component, INSTALLSTATE_DEFAULT ); msi_component_set_state( component, INSTALLSTATE_DEFAULT );
else else
...@@ -1813,9 +1816,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) ...@@ -1813,9 +1816,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
if (component->ForceLocalState) if (component->ForceLocalState)
msi_component_set_state( component, INSTALLSTATE_LOCAL ); msi_component_set_state( component, INSTALLSTATE_LOCAL );
if (!component->Enabled) if (feature->Attributes == msidbFeatureAttributesFavorLocal)
msi_component_set_state( component, INSTALLSTATE_UNKNOWN );
else if (feature->Attributes == msidbFeatureAttributesFavorLocal)
{ {
if (!(component->Attributes & msidbComponentAttributesSourceOnly)) if (!(component->Attributes & msidbComponentAttributesSourceOnly))
msi_component_set_state( component, INSTALLSTATE_LOCAL ); msi_component_set_state( component, INSTALLSTATE_LOCAL );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment