From 6305ff73db48b24ce806ddc3f345bca987ea2933 Mon Sep 17 00:00:00 2001
From: Hermes Belusca-Maito <hermes.belusca-maito@reactos.org>
Date: Sun, 9 Oct 2016 19:09:09 +0200
Subject: setupapi/tests: Determine path to system32 directory at runtime.

---
 dlls/setupapi/tests/dialog.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/setupapi/tests/dialog.c b/dlls/setupapi/tests/dialog.c
index 973b1fc..8b47350 100644
--- a/dlls/setupapi/tests/dialog.c
+++ b/dlls/setupapi/tests/dialog.c
@@ -32,12 +32,14 @@
 
 static void test_SetupPromptForDiskA(void)
 {
-    char path[] = "C:\\windows\\system32";
     char file[] = "kernel32.dll";
+    char path[MAX_PATH];
     char buffer[MAX_PATH];
     UINT ret;
     DWORD length;
 
+    GetSystemDirectoryA(path, MAX_PATH);
+
     memset(buffer, 0, sizeof(buffer));
     ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, file, 0, IDF_CHECKFIRST, buffer, sizeof(buffer) - 1, &length);
     ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
@@ -66,14 +68,16 @@ static void test_SetupPromptForDiskA(void)
 
 static void test_SetupPromptForDiskW(void)
 {
-    WCHAR path[] = {'C',':','\\','w','i','n','d','o','w','s','\\','s','y','s','t','e','m','3','2','\0'};
     WCHAR file[] = {'k','e','r','n','e','l','3','2','.','d','l','l','\0'};
     WCHAR title[] = {'T','e','s','t','\0'};
     WCHAR disk[] = {'T','e','s','t','d','i','s','k','\0'};
+    WCHAR path[MAX_PATH];
     WCHAR buffer[MAX_PATH];
     UINT ret;
     DWORD length;
 
+    GetSystemDirectoryW(path, MAX_PATH);
+
     memset(buffer, 0, sizeof(buffer));
     ret = SetupPromptForDiskW(0, title, disk, path, file, 0, IDF_CHECKFIRST, buffer, MAX_PATH-1, &length);
     ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
-- 
2.9.0

