Misha Koshelev : msi: Make MsiEnumProducts enumerate products,
not features .
Alexandre Julliard
julliard at wine.codeweavers.com
Mon May 21 09:40:19 CDT 2007
Module: wine
Branch: master
Commit: 74de3e17540587f98f7ce5bd813ea4969d95f604
URL: http://source.winehq.org/git/wine.git/?a=commit;h=74de3e17540587f98f7ce5bd813ea4969d95f604
Author: Misha Koshelev <mk144210 at bcm.edu>
Date: Sun May 20 14:31:54 2007 -0500
msi: Make MsiEnumProducts enumerate products, not features.
---
dlls/msi/registry.c | 21 +++++++++++++++++----
dlls/msi/tests/automation.c | 7 +++----
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index 3781088..14a4754 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -107,6 +107,14 @@ static const WCHAR szUserProduct_fmt[] = {
'P','r','o','d','u','c','t','s','\\',
'%','s',0};
+static const WCHAR szInstaller_Products[] = {
+'S','o','f','t','w','a','r','e','\\',
+'M','i','c','r','o','s','o','f','t','\\',
+'W','i','n','d','o','w','s','\\',
+'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
+'I','n','s','t','a','l','l','e','r','\\',
+'P','r','o','d','u','c','t','s',0};
+
static const WCHAR szInstaller_Products_fmt[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
@@ -493,6 +501,11 @@ UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create)
return rc;
}
+UINT MSIREG_OpenProducts(HKEY* key)
+{
+ return RegCreateKeyW(HKEY_LOCAL_MACHINE,szInstaller_Products,key);
+}
+
UINT MSIREG_OpenProductsKey(LPCWSTR szProduct, HKEY* key, BOOL create)
{
UINT rc;
@@ -680,7 +693,7 @@ UINT WINAPI MsiEnumProductsA(DWORD index, LPSTR lpguid)
UINT WINAPI MsiEnumProductsW(DWORD index, LPWSTR lpguid)
{
- HKEY hkeyFeatures = 0;
+ HKEY hkeyProducts = 0;
DWORD r;
WCHAR szKeyName[SQUISH_GUID_SIZE];
@@ -689,14 +702,14 @@ UINT WINAPI MsiEnumProductsW(DWORD index, LPWSTR lpguid)
if (NULL == lpguid)
return ERROR_INVALID_PARAMETER;
- r = MSIREG_OpenFeatures(&hkeyFeatures);
+ r = MSIREG_OpenProducts(&hkeyProducts);
if( r != ERROR_SUCCESS )
return ERROR_NO_MORE_ITEMS;
- r = RegEnumKeyW(hkeyFeatures, index, szKeyName, SQUISH_GUID_SIZE);
+ r = RegEnumKeyW(hkeyProducts, index, szKeyName, SQUISH_GUID_SIZE);
if( r == ERROR_SUCCESS )
unsquash_guid(szKeyName, lpguid);
- RegCloseKey(hkeyFeatures);
+ RegCloseKey(hkeyProducts);
return r;
}
diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index 73145e1..8bf2913 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -1679,10 +1679,9 @@ static void test_Installer_Products(BOOL bProductInstalled)
}
}
- if (bProductInstalled)
- todo_wine ok(bProductFound, "Product expected to be installed but product code was not found\n");
- else
- ok(!bProductFound, "Product not expected to be installed but product code was found\n");
+ ok(bProductInstalled == bProductFound, "Product expected to %s installed but product code was %s\n",
+ bProductInstalled ? "be" : "not be",
+ bProductFound ? "found" : "not found");
if (pEnum)
{
More information about the wine-cvs
mailing list