setupapi/tests: Skip devinst tests if the user doesn't have admin rights.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2016-12-19 11:38:52 +01:00 committed by Alexandre Julliard
parent 0922deda93
commit 162a40e145
1 changed files with 9 additions and 0 deletions

View File

@ -1349,8 +1349,17 @@ static void testSetupDiGetINFClassA(void)
START_TEST(devinst)
{
HKEY hkey;
init_function_pointers();
if ((hkey = SetupDiOpenClassRegKey(NULL, KEY_ALL_ACCESS)) == INVALID_HANDLE_VALUE)
{
skip("needs admin rights\n");
return;
}
RegCloseKey(hkey);
if (pIsWow64Process)
pIsWow64Process(GetCurrentProcess(), &is_wow64);