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; }