[2/5] msi: Search all installation contexts in the FindRelatedProducts action.

Hans Leidekker hans at codeweavers.com
Tue May 17 04:09:14 CDT 2011


Fixes http://bugs.winehq.org/show_bug.cgi?id=20801
---
 dlls/msi/upgrade.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c
index 8a0c43a..cae5af6 100644
--- a/dlls/msi/upgrade.c
+++ b/dlls/msi/upgrade.c
@@ -134,9 +134,9 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
             TRACE("Looking at index %u product %s\n", index, debugstr_w(product));
 
             unsquash_guid(product, productid);
-            rc = MSIREG_OpenProductKey(productid, NULL, package->Context,
-                                       &hukey, FALSE);
-            if (rc != ERROR_SUCCESS)
+            if (MSIREG_OpenProductKey(productid, NULL, MSIINSTALLCONTEXT_USERMANAGED, &hukey, FALSE) &&
+                MSIREG_OpenProductKey(productid, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, &hukey, FALSE) &&
+                MSIREG_OpenProductKey(productid, NULL, MSIINSTALLCONTEXT_MACHINE, &hukey, FALSE))
             {
                 TRACE("product key not found\n");
                 rc = ERROR_SUCCESS;
-- 
1.7.4.1







More information about the wine-patches mailing list