From ea7c86a715a25b779bd536976a1f0a78cf5b2962 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Mon, 19 Dec 2016 11:38:49 +0100 Subject: [PATCH] advpack/tests: Skip inf install tests if the user doesn't have admin rights. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/advpack/tests/advpack.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/advpack/tests/advpack.c b/dlls/advpack/tests/advpack.c index f7ac66b90d9..d5958769abf 100644 --- a/dlls/advpack/tests/advpack.c +++ b/dlls/advpack/tests/advpack.c @@ -337,7 +337,7 @@ static void translateinfstringex_test(void) } create_inf_file(); - + /* need to see if there are any flags */ /* try a NULL filename */ @@ -424,6 +424,12 @@ static void translateinfstringex_test(void) /* open the inf with the install section */ hr = pOpenINFEngine(inf_file, "section", 0, &hinf, NULL); + if (hr == E_FAIL) + { + skip("can't open engine with install section (needs admin rights)\n"); + DeleteFileA(inf_file); + return; + } ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); /* translate the string with the install section specified */