diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index 2302ee46e86..1ccb4b08a64 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -1668,6 +1668,8 @@ static void get_initial_console( RTL_USER_PROCESS_PARAMETERS *params ) params->hStdOutput = (HANDLE)((UINT_PTR)params->hStdOutput | 1); output_fd = 1; } + if (!params->ConsoleHandle && main_image_info.SubSystemType == IMAGE_SUBSYSTEM_WINDOWS_CUI) + params->ConsoleHandle = CONSOLE_HANDLE_ALLOC_NO_WINDOW; if (output_fd != -1) {