From 4c6b675198ed43a7660c81486033c19804f8bce4 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Wed, 2 Dec 2020 06:54:40 +0100 Subject: [PATCH] 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 Signed-off-by: Esme Povirk Signed-off-by: Alexandre Julliard --- dlls/mscoree/tests/comtest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/mscoree/tests/comtest.c b/dlls/mscoree/tests/comtest.c index b62d527bb95..4b2183bac3a 100644 --- a/dlls/mscoree/tests/comtest.c +++ b/dlls/mscoree/tests/comtest.c @@ -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);