diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 6ff4c67e918..0011bc54e7f 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -5001,15 +5001,24 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) MSIPACKAGE *package = param; MSICOMPONENT *comp; SC_HANDLE scm = NULL, service = NULL; - LPCWSTR *vector = NULL; + LPCWSTR component, *vector = NULL; LPWSTR name, args; DWORD event, numargs; UINT r = ERROR_FUNCTION_FAILED; - comp = get_loaded_component(package, MSI_RecordGetString(rec, 6)); - if (!comp || comp->Action == INSTALLSTATE_UNKNOWN || comp->Action == INSTALLSTATE_ABSENT) + component = MSI_RecordGetString(rec, 6); + comp = get_loaded_component(package, component); + if (!comp) return ERROR_SUCCESS; + if (comp->ActionRequest != INSTALLSTATE_LOCAL) + { + TRACE("Component not scheduled for installation: %s\n", debugstr_w(component)); + comp->Action = comp->Installed; + return ERROR_SUCCESS; + } + comp->Action = INSTALLSTATE_LOCAL; + deformat_string(package, MSI_RecordGetString(rec, 2), &name); deformat_string(package, MSI_RecordGetString(rec, 4), &args); event = MSI_RecordGetInteger(rec, 3);