From aeacf320c45d301bfbd0e8aa2e191fdd7088560a Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 6 Nov 2011 12:17:42 +0000 Subject: [PATCH] [SYSSETUP] - Do not rely on setupapi's FileExists function, which shouldn't even be exported svn path=/trunk/; revision=54311 --- reactos/dll/win32/syssetup/wizard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/syssetup/wizard.c b/reactos/dll/win32/syssetup/wizard.c index bfb7af0f6bb..1b73b8235a2 100644 --- a/reactos/dll/win32/syssetup/wizard.c +++ b/reactos/dll/win32/syssetup/wizard.c @@ -2263,8 +2263,9 @@ GetRosInstallCD(WCHAR * szPath, DWORD dwPathLength) wcscpy(szBuffer, szDrive); wcscat(szBuffer, L"reactos\\system32\\ntoskrnl.exe"); LogItem(SYSSETUP_SEVERITY_INFORMATION, szBuffer); - if (FileExists(szBuffer, NULL)) + if (GetFileAttributesW(szBuffer) != INVALID_FILE_ATTRIBUTES) { + /* the file exists, so this is the right drive */ wcsncpy(szPath, szDrive, dwPathLength); return TRUE; }