James Hawkins : msi: Don' t set an invalid install property in PublishProduct.

Alexandre Julliard julliard at winehq.org
Tue Jun 24 06:45:40 CDT 2008


Module: wine
Branch: master
Commit: ee8b4a0132329c73b866a88741a7c0572cb48b3d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ee8b4a0132329c73b866a88741a7c0572cb48b3d

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Mon Jun 23 22:58:24 2008 -0500

msi: Don't set an invalid install property in PublishProduct.

---

 dlls/msi/action.c        |   12 +-----------
 dlls/msi/tests/install.c |    5 ++++-
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 8e30102..fb8cfed 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -3413,7 +3413,7 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
     LPWSTR packname;
     HKEY hkey=0;
     HKEY hukey=0;
-    HKEY hudkey=0, props=0;
+    HKEY hudkey=0;
     HKEY source;
     static const WCHAR szProductLanguage[] =
         {'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
@@ -3439,10 +3439,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
         rc = MSIREG_OpenLocalClassesProductKey(package->ProductCode, &hukey, TRUE);
         if (rc != ERROR_SUCCESS)
             goto end;
-
-        rc = MSIREG_OpenLocalSystemInstallProps(package->ProductCode, &props, TRUE);
-        if (rc != ERROR_SUCCESS)
-            goto end;
     }
     else
     {
@@ -3453,10 +3449,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
         rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE);
         if (rc != ERROR_SUCCESS)
             goto end;
-
-        rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE);
-        if (rc != ERROR_SUCCESS)
-            goto end;
     }
 
     rc = RegCreateKeyW(hukey, szSourceList, &source);
@@ -3481,7 +3473,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
 
     /* FIXME */
     msi_reg_set_val_dword( hukey, INSTALLPROPERTY_AUTHORIZED_LUA_APPW, 0 );
-    msi_reg_set_val_dword( props, INSTALLPROPERTY_INSTANCETYPEW, 0 );
 
     buffer = msi_dup_property( package, szARPProductIcon );
     if (buffer)
@@ -3545,7 +3536,6 @@ end:
     RegCloseKey(hkey);
     RegCloseKey(hukey);
     RegCloseKey(hudkey);
-    RegCloseKey(props);
 
     return rc;
 }
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 93445c9..d5ebda2 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -2464,7 +2464,7 @@ static void test_publish_publishproduct(void)
     UINT r;
     LONG res;
     LPSTR usersid;
-    HKEY sourcelist, net;
+    HKEY sourcelist, net, props;
     HKEY hkey, patches, media;
     CHAR keypath[MAX_PATH];
     CHAR temp[MAX_PATH];
@@ -2504,6 +2504,9 @@ static void test_publish_publishproduct(void)
     res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey);
     ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
 
+    res = RegOpenKeyA(hkey, "InstallProperties", &props);
+    ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+
     res = RegOpenKeyA(hkey, "Patches", &patches);
     todo_wine
     {




More information about the wine-cvs mailing list