Commit d95e3eb4 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: PublishComponents must look at the requested install state of the feature, not the component.

parent 4e1c8767
...@@ -4490,33 +4490,34 @@ static UINT ACTION_ExecuteAction(MSIPACKAGE *package) ...@@ -4490,33 +4490,34 @@ static UINT ACTION_ExecuteAction(MSIPACKAGE *package)
static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param) static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param)
{ {
MSIPACKAGE *package = param; MSIPACKAGE *package = param;
LPCWSTR compgroupid=NULL; LPCWSTR compgroupid, component, feature, qualifier, text;
LPCWSTR feature=NULL; LPWSTR advertise = NULL, output = NULL;
LPCWSTR text = NULL;
LPCWSTR qualifier = NULL;
LPCWSTR component = NULL;
LPWSTR advertise = NULL;
LPWSTR output = NULL;
HKEY hkey; HKEY hkey;
UINT rc = ERROR_SUCCESS; UINT rc;
MSICOMPONENT *comp; MSICOMPONENT *comp;
DWORD sz = 0; MSIFEATURE *feat;
DWORD sz;
MSIRECORD *uirow; MSIRECORD *uirow;
component = MSI_RecordGetString(rec,3); feature = MSI_RecordGetString(rec, 5);
comp = get_loaded_component(package,component); feat = get_loaded_feature(package, feature);
if (!comp) if (!feat)
return ERROR_SUCCESS; return ERROR_SUCCESS;
if (comp->ActionRequest != INSTALLSTATE_LOCAL && if (feat->ActionRequest != INSTALLSTATE_LOCAL &&
comp->ActionRequest != INSTALLSTATE_SOURCE && feat->ActionRequest != INSTALLSTATE_SOURCE &&
comp->ActionRequest != INSTALLSTATE_ADVERTISED) feat->ActionRequest != INSTALLSTATE_ADVERTISED)
{ {
TRACE("Component not scheduled for installation %s\n", debugstr_w(component)); TRACE("Feature %s not scheduled for installation\n", debugstr_w(feature));
comp->Action = comp->Installed; feat->Action = feat->Installed;
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
component = MSI_RecordGetString(rec, 3);
comp = get_loaded_component(package, component);
if (!comp)
return ERROR_SUCCESS;
compgroupid = MSI_RecordGetString(rec,1); compgroupid = MSI_RecordGetString(rec,1);
qualifier = MSI_RecordGetString(rec,2); qualifier = MSI_RecordGetString(rec,2);
...@@ -4525,8 +4526,6 @@ static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param) ...@@ -4525,8 +4526,6 @@ static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param)
goto end; goto end;
text = MSI_RecordGetString(rec,4); text = MSI_RecordGetString(rec,4);
feature = MSI_RecordGetString(rec,5);
advertise = create_component_advertise_string(package, comp, feature); advertise = create_component_advertise_string(package, comp, feature);
sz = strlenW(advertise); sz = strlenW(advertise);
......
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