mscoree/tests: The comtest registry tests may require elevated privileges.

On Windows Vista and 7 run_registry_test() requires having elevated
privileges.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Francois Gouget 2020-12-02 06:54:40 +01:00 committed by Alexandre Julliard
parent ab234b5446
commit 4c6b675198
1 changed files with 6 additions and 0 deletions

View File

@ -168,6 +168,12 @@ static void run_registry_test(run_type run)
sprintf(buffer, "CLSID\\%s", wine_dbgstr_guid(&CLSID_Test), "");
ret = RegCreateKeyA( HKEY_CLASSES_ROOT, buffer, &hkey );
if (ret == ERROR_ACCESS_DENIED && !IsUserAnAdmin())
{
win_skip("cannot run the registry tests due to user not being admin\n");
RegCloseKey(hkey);
return;
}
ok(ret == ERROR_SUCCESS, "RegCreateKeyA returned %x\n", ret);
ret = RegSetKeyValueA(hkey, "InprocServer32", NULL, REG_SZ, "mscoree.dll", 11);