[1/6] msi: Return INSTALLSTATE_UNKNOWN from MsiGetComponentState if the component is disabled.

Hans Leidekker hans at codeweavers.com
Thu Dec 23 10:07:13 CST 2010


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

diff --git a/dlls/msi/install.c b/dlls/msi/install.c
index e2fe863..d34de8c 100644
--- a/dlls/msi/install.c
+++ b/dlls/msi/install.c
@@ -1181,13 +1181,22 @@ UINT MSI_GetComponentStateW(MSIPACKAGE *package, LPCWSTR szComponent,
         return ERROR_UNKNOWN_COMPONENT;
 
     if (piInstalled)
-        *piInstalled = comp->Installed;
+    {
+        if (comp->Enabled)
+            *piInstalled = comp->Installed;
+        else
+            *piInstalled = INSTALLSTATE_UNKNOWN;
+    }
 
     if (piAction)
-        *piAction = comp->Action;
+    {
+        if (comp->Enabled)
+            *piAction = comp->Action;
+        else
+            *piAction = INSTALLSTATE_UNKNOWN;
+    }
 
     TRACE("states (%i, %i)\n", comp->Installed, comp->Action );
-
     return ERROR_SUCCESS;
 }
 
-- 
1.7.1







More information about the wine-patches mailing list