msi: Return the results from OpenSourceKey.

This commit is contained in:
James Hawkins 2008-02-19 02:09:33 -06:00 committed by Alexandre Julliard
parent d37ac289db
commit fe987103fb
2 changed files with 8 additions and 18 deletions

View File

@ -81,7 +81,7 @@ static UINT OpenSourceKey(LPCWSTR szProduct, HKEY* key, DWORD dwOptions,
rc = MSIREG_OpenLocalClassesProductKey(szProduct, &rootkey, create);
}
if (rc)
if (rc != ERROR_SUCCESS)
{
if (dwOptions == MSICODE_PATCH)
return ERROR_UNKNOWN_PATCH;
@ -424,8 +424,7 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
rc = OpenSourceKey(szProduct, &sourcekey, MSICODE_PRODUCT, dwContext, FALSE);
if (rc != ERROR_SUCCESS)
return ERROR_UNKNOWN_PRODUCT;
return rc;
if (strcmpW(szProperty, INSTALLPROPERTY_MEDIAPACKAGEPATHW) == 0)
{

View File

@ -1499,11 +1499,8 @@ static void test_MsiSourceListSetInfo(void)
r = MsiSourceListSetInfoA(prodcode, NULL,
MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT,
INSTALLPROPERTY_MEDIAPACKAGEPATH, "path");
todo_wine
{
ok(r == ERROR_BAD_CONFIGURATION,
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
}
ok(r == ERROR_BAD_CONFIGURATION,
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyA(userkey, "SourceList", &source);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -1743,11 +1740,8 @@ static void test_MsiSourceListSetInfo(void)
r = MsiSourceListSetInfoA(prodcode, NULL,
MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT,
INSTALLPROPERTY_MEDIAPACKAGEPATH, "path");
todo_wine
{
ok(r == ERROR_BAD_CONFIGURATION,
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
}
ok(r == ERROR_BAD_CONFIGURATION,
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyA(userkey, "SourceList", &source);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -1789,11 +1783,8 @@ static void test_MsiSourceListSetInfo(void)
r = MsiSourceListSetInfoA(prodcode, NULL,
MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT,
INSTALLPROPERTY_MEDIAPACKAGEPATH, "path");
todo_wine
{
ok(r == ERROR_BAD_CONFIGURATION,
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
}
ok(r == ERROR_BAD_CONFIGURATION,
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyA(prodkey, "SourceList", &source);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);