Hey PascalDragon,
This is not quite correct. Windows evolved from DOS where the only possibility were console applications.
I was being a bit over-simplistic in my, wrongly, generalization of the issue.
I'm that old that I should not fall into these traps of doing so much generalization, but hey, here you go, me messing it up again
The header of PE/COFF files contains a field that decides the subsystem of the executable (in this case GUI vs. CUI, there are also other values that are not important for this). Applications that have the subsystem type CUI require a terminal, but not a console window, cause it's perfectly fine to execute console applications in e.g. a SSH session (when you connect to a Windows using SSH) or e.g. on the Windows IoT core variant of devices where you have either WinRT style apps or console applications. (Also when starting a process it can be requested to hide that window upon start)
TL;DR: If you start a CUI application from a process that does not have a terminal associated then Windows will automatically spawn a console window, but if a terminal is associated it will continue to use that.
I was not aware of that, at all.
As per usual, many thanks PascalDragon for the trove on invaluable info!!!
On a side note, where do Windows Services fall in all this, cuz they're the only ones, well that I know of, that don't need a Window associated with, right?
Cheers,
Gus