msi: Look at the requested action when installing services, not the action taken.

This commit is contained in:
Hans Leidekker 2010-03-02 14:56:01 +01:00 committed by Alexandre Julliard
parent c8308ef99d
commit 87448dcaeb
1 changed files with 12 additions and 3 deletions

View File

@ -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);