Hans Leidekker : msi: Look at the requested action when deleting services, not the action taken.
Alexandre Julliard
julliard at winehq.org
Tue Mar 2 10:32:35 CST 2010
Module: wine
Branch: master
Commit: c13d84fffcd2101ad1446f56b8cc53b82abbe5a1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c13d84fffcd2101ad1446f56b8cc53b82abbe5a1
Author: Hans Leidekker <hans at codeweavers.com>
Date: Tue Mar 2 14:56:51 2010 +0100
msi: Look at the requested action when deleting services, not the action taken.
---
dlls/msi/action.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index b99dce2..278d479 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -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,9 +5233,18 @@ 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 );
More information about the wine-cvs
mailing list