msi: Return ERROR_INVALID_PARAMETER if the context is machine and szUserSid is non-NULL.

This commit is contained in:
James Hawkins 2008-02-19 02:12:30 -06:00 committed by Alexandre Julliard
parent 4ee1745e81
commit 7cf6be8aeb
2 changed files with 5 additions and 5 deletions

View File

@ -415,6 +415,9 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
if (!szValue)
return ERROR_UNKNOWN_PROPERTY;
if (dwContext == MSIINSTALLCONTEXT_MACHINE && szUserSid)
return ERROR_INVALID_PARAMETER;
if (dwOptions & MSICODE_PATCH)
{
FIXME("Unhandled options MSICODE_PATCH\n");

View File

@ -1764,11 +1764,8 @@ static void test_MsiSourceListSetInfo(void)
r = MsiSourceListSetInfoA(prodcode, usersid,
MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT,
INSTALLPROPERTY_MEDIAPACKAGEPATH, "path");
todo_wine
{
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
}
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
RegDeleteValueA(media, "MediaPackage");
RegDeleteKeyA(media, "");