Commit 2d3676d9 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

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

parent 87448dca
...@@ -5173,6 +5173,7 @@ static UINT ITERATE_StopService( MSIRECORD *rec, LPVOID param ) ...@@ -5173,6 +5173,7 @@ static UINT ITERATE_StopService( MSIRECORD *rec, LPVOID param )
{ {
MSIPACKAGE *package = param; MSIPACKAGE *package = param;
MSICOMPONENT *comp; MSICOMPONENT *comp;
LPCWSTR component;
LPWSTR name; LPWSTR name;
DWORD event; DWORD event;
...@@ -5180,9 +5181,18 @@ static UINT ITERATE_StopService( MSIRECORD *rec, LPVOID param ) ...@@ -5180,9 +5181,18 @@ static UINT ITERATE_StopService( MSIRECORD *rec, LPVOID param )
if (!(event & msidbServiceControlEventStop)) if (!(event & msidbServiceControlEventStop))
return ERROR_SUCCESS; return ERROR_SUCCESS;
comp = get_loaded_component( package, MSI_RecordGetString( rec, 6 ) ); component = MSI_RecordGetString( rec, 6 );
if (!comp || comp->Action == INSTALLSTATE_UNKNOWN || comp->Action == INSTALLSTATE_ABSENT) comp = get_loaded_component( package, component );
if (!comp)
return ERROR_SUCCESS;
if (comp->ActionRequest != INSTALLSTATE_ABSENT)
{
TRACE("Component not scheduled for removal: %s\n", debugstr_w(component));
comp->Action = comp->Installed;
return ERROR_SUCCESS; return ERROR_SUCCESS;
}
comp->Action = INSTALLSTATE_ABSENT;
deformat_string( package, MSI_RecordGetString( rec, 2 ), &name ); deformat_string( package, MSI_RecordGetString( rec, 2 ), &name );
stop_service( name ); stop_service( name );
......
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