Commit 21619964 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: szUserSid must be NULL if context is MSIINSTALLCONTEXT_MACHINE.

parent 14d439c8
......@@ -667,8 +667,8 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
return ERROR_FUNCTION_FAILED;
}
if (szUserSid)
FIXME("Unhandled UserSid %s\n",debugstr_w(szUserSid));
if (szUserSid && (dwContext & MSIINSTALLCONTEXT_MACHINE))
return ERROR_INVALID_PARAMETER;
rc = OpenSourceKey(szProduct, &sourcekey, MSICODE_PRODUCT, dwContext, FALSE);
if (rc != ERROR_SUCCESS)
......
......@@ -659,10 +659,7 @@ static void test_MsiSourceListAddSourceEx(void)
r = pMsiSourceListAddSourceExA(prodcode, usersid,
MSIINSTALLCONTEXT_MACHINE,
MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0);
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);
r = pMsiSourceListAddSourceExA(prodcode, NULL,
MSIINSTALLCONTEXT_MACHINE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment