James Hawkins : msi: Squash the package code property.

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


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

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Mon Jun 23 23:00:21 2008 -0500

msi: Squash the package code property.

---

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

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index b85b6ce..751c8aa 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -3392,6 +3392,7 @@ static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey)
 {
     MSIHANDLE hdb, suminfo;
     WCHAR guids[MAX_PATH];
+    WCHAR packcode[SQUISH_GUID_SIZE];
     LPWSTR buffer;
     LPWSTR ptr;
     DWORD langid;
@@ -3452,7 +3453,8 @@ static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey)
 
     ptr = strchrW(guids, ';');
     if (ptr) *ptr = 0;
-    msi_reg_set_val_str(hkey, INSTALLPROPERTY_PACKAGECODEW, guids);
+    squash_guid(guids, packcode);
+    msi_reg_set_val_str(hkey, INSTALLPROPERTY_PACKAGECODEW, packcode);
 
 done:
     MsiCloseHandle(suminfo);
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index f1d493b..235a49a 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -2530,12 +2530,12 @@ static void test_publish_publishproduct(void)
     ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
 
     CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST");
+    CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052c94DA02821EECD05F2F");
     CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
     CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
     CHECK_DEL_REG_DWORD(hkey, "AuthorizedLUAApp", 0);
     todo_wine
     {
-        CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052c94DA02821EECD05F2F");
         CHECK_DEL_REG_DWORD(hkey, "Assignment", 0);
         CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184);
         CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0);




More information about the wine-cvs mailing list