[2/2] setupapi/tests: Skip InstallHinfSection tests if the user doesn't have admin rights.
Hans Leidekker
hans at codeweavers.com
Tue Dec 20 05:08:35 CST 2016
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
dlls/setupapi/tests/install.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c
index 5015e31..558453c 100644
--- a/dlls/setupapi/tests/install.c
+++ b/dlls/setupapi/tests/install.c
@@ -455,6 +455,14 @@ static void test_profile_items(void)
goto cleanup;
}
+ snprintf(path, MAX_PATH, "%s\\TestDir", commonprogs);
+ if (!CreateDirectoryA(path, NULL) && GetLastError() == ERROR_ACCESS_DENIED)
+ {
+ skip("need admin rights\n");
+ return;
+ }
+ RemoveDirectoryA(path);
+
create_inf_file(inffile, inf);
sprintf(path, "%s\\%s", CURR_DIR, inffile);
run_cmdline("DefaultInstall", 128, path);
--
2.1.4
More information about the wine-patches
mailing list