From 7ab226a1304fb5abd2871e2f90841811aa413982 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 25 Apr 2026 17:12:08 +0300 Subject: [PATCH] [ROSAUTOTEST] Fix ReactOS detection bootcdregtest installs ReactOS into "c:\Windows", therefore the old detection method of checking the "Windows" directory no longer works. A previous change tried to fix this by adding "|| IsReactOS()", but that resolves to CConfiguration::IsReactOS(), which simply returns m_IsReactOS. Use ::IsReactOS() instead to get our versionhelper function. --- modules/rostests/rosautotest/CConfiguration.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/rostests/rosautotest/CConfiguration.cpp b/modules/rostests/rosautotest/CConfiguration.cpp index 445fe5dd6cf..779f85e1e1b 100644 --- a/modules/rostests/rosautotest/CConfiguration.cpp +++ b/modules/rostests/rosautotest/CConfiguration.cpp @@ -26,15 +26,12 @@ CConfiguration::CConfiguration() m_Submit(false), m_ListModules(false) { - WCHAR WindowsDirectory[MAX_PATH]; WCHAR Interactive[32]; - /* Check if we are running under ReactOS from the SystemRoot directory */ - if(!GetWindowsDirectoryW(WindowsDirectory, MAX_PATH)) - FATAL("GetWindowsDirectoryW failed\n"); - - m_IsReactOS = !_wcsnicmp(&WindowsDirectory[3], L"reactos", 7); - m_IsReactOS = m_IsReactOS || IsReactOS(); + /* Check if we are running under ReactOS by calling our versionhelper function. + We cannot use the name of the SystemRoot folder, because bootcdregtest is using "c:\Windows". + Note: "IsReactOS()" without "::" would resolve to CConfiguration::IsReactOS(). */ + m_IsReactOS = ::IsReactOS(); if(GetEnvironmentVariableW(L"WINETEST_INTERACTIVE", Interactive, _countof(Interactive))) m_IsInteractive = _wtoi(Interactive);