From 06181ec433f23ffd03107b4234b857ce5f91a01a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Fri, 19 Jan 2024 21:50:22 +0800 Subject: [PATCH] Terminal (Windows): default `default terminal` to conhost --- src/detection/terminalshell/terminalshell_windows.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/detection/terminalshell/terminalshell_windows.c b/src/detection/terminalshell/terminalshell_windows.c index 67b91a677..b16e3d945 100644 --- a/src/detection/terminalshell/terminalshell_windows.c +++ b/src/detection/terminalshell/terminalshell_windows.c @@ -245,12 +245,8 @@ static bool detectDefaultTerminal(FFTerminalResult* result) DWORD bufSize = 80; if (RegGetValueW(HKEY_CURRENT_USER, L"Console\\%%Startup", L"DelegationTerminal", RRF_RT_REG_SZ, NULL, uuid, &bufSize) == ERROR_SUCCESS) { - if(wcscmp(uuid, L"{00000000-0000-0000-0000-000000000000}") == 0) - { - // Let Windows decide - return false; - } - if(wcscmp(uuid, L"{B23D10C0-E52E-411E-9D5B-C09FDF709C7D}") == 0) + if(wcscmp(uuid, L"{00000000-0000-0000-0000-000000000000}") == 0 || // Let Windows decide + wcscmp(uuid, L"{B23D10C0-E52E-411E-9D5B-C09FDF709C7D}") == 0) // Conhost { goto conhost; }