I'm puzzled: it's strange that delaying stuff will let STARTUP_INFO.lpTitle change.
Looking a bit into it: it seems we don't get the expected values for lpTitle.
Are you testing on Wine with wineconsole or do you use other ways? If by wineconsole, maybe the patch below could help.
If not, then there are likely other places to be fixed. Extending the tests for CreateProcess regarding lpTitle could be starting point.
``` diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index 1924bf791e6..c029693bfcb 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -42,22 +42,10 @@ int WINAPI wWinMain( HINSTANCE inst, HINSTANCE prev, WCHAR *cmdline, INT show ) static WCHAR default_cmd[] = L"cmd";
FreeConsole(); /* make sure we're not connected to inherited console */ - if (!AllocConsole()) - { - ERR( "failed to allocate console: %lu\n", GetLastError() ); - return 1; - }
if (!*cmd) cmd = default_cmd;
- startup.dwFlags = STARTF_USESTDHANDLES; - startup.hStdInput = CreateFileW( L"CONIN$", GENERIC_READ | GENERIC_WRITE, 0, NULL, - OPEN_EXISTING, 0, 0 ); - startup.hStdOutput = CreateFileW( L"CONOUT$", GENERIC_READ | GENERIC_WRITE, 0, NULL, - OPEN_EXISTING, 0, 0 ); - startup.hStdError = startup.hStdOutput; - - if (!CreateProcessW( NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info )) + if (!CreateProcessW( NULL, cmd, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &startup, &info )) { WCHAR format[256], *buf; INPUT_RECORD ir;
```