[03/11] msi: Look at the requested action when installing services, not the action taken.

Hans Leidekker hans at codeweavers.com
Tue Mar 2 07:56:01 CST 2010


---
 dlls/msi/action.c |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 6ff4c67..0011bc5 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);
-- 
1.6.3.3





More information about the wine-patches mailing list