By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Problem with color in nested shells

Using color /f in tcstart.bat seems to cause a problem if you then nest shells. It appears to mess with the number of lines in the shell.

How to reproduce:
- Create a simple color.ini file (I've attached mine) where tcstart.bat can find it.
- Create a simple tcstart.bat with the following line: "color /f color.ini"
- Run the following: echo %_ROWS & "%COMSPEC" /c echo hello & echo %_ROWS

If you do the above from Take Command, you should see that the _ROWS value decreases. If you run it from TCC.exe, it actually shrinks the window size!!

Change the line in tcstart.bat to "if %_SHELL eq 0 color /r color.ini"

While the workaround works fine, this behavior seems really weird.


  • color.ini
    560 bytes · Views: 288
Confirmed - but it's a Windows API bug (SetConsoleScreenBufferInfoEx), not TCC. Windows is decreasing the window size by 1 when setting the palette (and ignoring the explicit window size requested).

I'll need to think of a workaround that won't break if Microsoft gets around to fixing it.

Similar threads