I tried that but with a NULL security descriptor. I suppose that's why I wasn't getting 19. I wouldn't use it, except inside @CONSOLEB. I found out (the hard way) that if TCC starts a program in the same console and that program switches to an alternative buffer and exits without switching back to its startup buffer, the parent TCC is in never_never_land. Try it ...It's the current console output handle. It comes from CreateFile( _TEXT("CONOUT$"), (GENERIC_READ | GENERIC_WRITE), (FILE_SHARE_READ | FILE_SHARE_WRITE), &sa, OPEN_EXISTING, 0, NULL );
And you should never try to access it directly.
start /b /w /k echo %%@consoleb