I don't really understand all these things: Windows Terminal, classic console, pseudoconsole. I spend 99.9% of my time using TCC in Take Command tabs. Every so often, I want to run a standalone TCC session as administrator, so I was trying to launch every kind of session: normal and elevated, ConPTY and classic console.
You gave me a command that would tell me if I was in a pseudoconsole (ConPTY), and I built a command to display the answer and set a variable _ConPTY. When I run just
start, I get TCC running in a window where that test returns "ConPTY = Yes" and _ConPTY=1. So my understanding was that TCC is running in a pseudoconsole. The window does have tabs.
When I run
start /elevated, TCC opens in a window that looks different (no tabs). The test returns "ConPTY = No" and _Conpty=0. However, the extended ANSI control sequences (e.g., for underlining) work, as when TCC is running in a ConPTY console in a TCMD tab.
If I run
start /pgm C:\Windows\System32\conhost.exe %tcmdpgmdir\tcc.exe,
I get a window that looks like the one I got with the elevated session. If I run
start /elevated /pgm C:\Windows\System32\conhost.exe %tcmdpgmdir\tcc.exe
I explicitly ran conhost.exe and get the same window as with the simple
start /elevated. Does the latter use conhost, while the non-elevated command uses the pseudoconsole (ConPTY)?