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

SignUp Now!

ASCII color escape sequences not recognized upon take command start

The ASCII escape sequences for colorizing the prompt are not recognized immediately upon starting of take command (tcmd.exe). The prompt command is set in tcstart.bat:

prompt $e[30;1m$u@%computername%$e[0m:$e[33;1m$p$g$e[0m

When tcmd.exe starts it shows:


no colors - just the ascii codes. Then I hit enter once and it shows the prompt in the correct colors.


This does not happen when I start tcc.exe

This happens both in 31 and 32.

I have tried moving the prompt command to the beginning and end of tcstart.btm as well as only having the prompt command in the file but it has no effect. It's a mild annoyance but would be nice if it could be fixed.
Are there any pipes or other calls to external apps in TCStart? A third-party app might be messing with the (hidden) console's mode.

In my case (with v31.x) there was nothing like that. Just an enable (via View) explorer window ... and voila, TCMD has often troubles (but not every time). If I had disabled the explorer window, I had NEVER that problem.

Till NOW, it's ok in v32.x ...
I traced this to some interaction with trying to open multiple tabs on start up within the tcmd.ini. The best that I can do to get a minimal reproduction is this.

1. I try to open three tabs (local machine, ssh to windows machine, ssh to linux machine). The ssh is the built in one from windows and it uses key pairs so no password is needed. If I remove tab3 then it does not happen. It always seems to happen when I include the ssh to any linux box. the ssh sessions open fine. Also unusual is that about 1 time out of 10 starts the prompt gets colored correctly.

Title=--> this <--
Command="C:\Program Files\JPSoft\TCMD32\TCC.EXE" /Q
Command=ssh user@winremote
Command=ssh user@linuxserver
Whether a console recognizes ANSI sequences is determined by a flag in the Windows SetConsoleMode API call. TCC sets that flag (unless you've disabled ANSI in TCMD.INI).

You apparently have a timing issue with one of your apps turning off the flag; the reason it turns back on when you press enter in a TCC window is because TCC checks for the flag after executing each line and if it's missing, turns it back on again.

You might be able to kludge around this problem by moving SSH to the first tab, or by inserting a short delay in TCSTART. Or even having KEYSTACK in your TCSTART insert a CR.
Try running TCC in Windows Terminal.

You get all the good ansi like user-defineable character (i made pentagram emojis!), double-height text, italics, blink, custom rgb etc.

I have some interesting ansi attachments i've made, check them out?


  • set-colors.bat
    30.5 KB · Views: 1

Similar threads