James Hawkins : msi: Don't publish the upgrade key to an invalid location.
Alexandre Julliard
julliard at winehq.org
Thu Jun 19 06:41:42 CDT 2008
Module: wine
Branch: master
Commit: b635e3170ff6b1609cceafa35f18a82d74eafdb2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b635e3170ff6b1609cceafa35f18a82d74eafdb2
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Thu Jun 19 00:34:52 2008 -0500
msi: Don't publish the upgrade key to an invalid location.
---
dlls/msi/action.c | 5 -----
dlls/msi/tests/automation.c | 5 ++++-
dlls/msi/tests/install.c | 5 +++++
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index c42c4f9..abc1c35 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -4125,11 +4125,6 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
squash_guid(package->ProductCode,squashed);
msi_reg_set_val_str( hkey2, squashed, NULL );
RegCloseKey(hkey2);
- MSIREG_OpenUserUpgradeCodesKey(upgrade_code, &hkey2, TRUE);
- squash_guid(package->ProductCode,squashed);
- msi_reg_set_val_str( hkey2, squashed, NULL );
- RegCloseKey(hkey2);
-
msi_free(upgrade_code);
}
diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index 3a35d4a..2b0ada1 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -2298,7 +2298,10 @@ static void test_Installer_InstallProduct(void)
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
res = RegDeleteKeyA(hkey, "UpgradeCodes\\D8E760ECA1E276347B43E42BDBDA5656");
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ todo_wine
+ {
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ }
RegCloseKey(hkey);
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index a751d0b..f035650 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -2235,6 +2235,8 @@ static void test_publish_registerproduct(void)
"\\UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const CHAR ugkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"
"\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
+ static const CHAR userugkey[] = "Software\\Microsoft\\Installer\\UpgradeCodes"
+ "\\51AAE0C44620A5E4788506E91F249BD2";
get_user_sid(&usersid);
get_date_str(date);
@@ -2253,6 +2255,9 @@ static void test_publish_registerproduct(void)
ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
ok(delete_pf("msitest", FALSE), "File not installed\n");
+ res = RegOpenKeyA(HKEY_CURRENT_USER, userugkey, &hkey);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, uninstall, &hkey);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
More information about the wine-cvs
mailing list