mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 22:50:43 +00:00
msi: Look at the requested action when deleting services, not the action taken.
This commit is contained in:
parent
2d3676d912
commit
c13d84fffc
@ -5224,6 +5224,7 @@ static UINT ITERATE_DeleteService( MSIRECORD *rec, LPVOID param )
|
||||
{
|
||||
MSIPACKAGE *package = param;
|
||||
MSICOMPONENT *comp;
|
||||
LPCWSTR component;
|
||||
LPWSTR name = NULL;
|
||||
DWORD event;
|
||||
SC_HANDLE scm = NULL, service = NULL;
|
||||
@ -5232,10 +5233,19 @@ static UINT ITERATE_DeleteService( MSIRECORD *rec, LPVOID param )
|
||||
if (!(event & msidbServiceControlEventDelete))
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
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_ABSENT)
|
||||
{
|
||||
TRACE("Component not scheduled for removal: %s\n", debugstr_w(component));
|
||||
comp->Action = comp->Installed;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
comp->Action = INSTALLSTATE_ABSENT;
|
||||
|
||||
deformat_string( package, MSI_RecordGetString(rec, 2), &name );
|
||||
stop_service( name );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user