Why am I seeing this title?

May 20, 2008
11,855
121
Syracuse, NY, USA
1636384102343.png


I gave the title "foobar" to the START command.

And why don't I see TCC's icon?
 
May 20, 2008
11,855
121
Syracuse, NY, USA
Start TCC (from TCC) with START "foobar" /PGM [path]\tcc.exe. Then, in the newly started TCC, perform either test above.

Can anyone confirm?
 
May 20, 2008
11,855
121
Syracuse, NY, USA
To be more explicit ... from TCC, start TCC with START "foo" /PGM <path>\tcc.exe /i (no inifile, no tcstart, no plugins).

In the newly started TCC

Code:
option //UpdateTitle=No
set TITLEPROMPT=MyTitle
alias pre_input echo pre_input in action

Before the alias command is issued:

1636822280519.png


After issuing the alias command:

1636822529851.png
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,585
97
Albuquerque, NM
prospero.unm.edu
Okay, I see what you're saying now. Using the PRE_INPUT alias reverts the console title to its original value. (PRE_EXEC and POST_EXEC do not.)

I don't need to start a new console, or change UpdateTitle. I see the same thing in a Take Command tab.

This doesn't appear to be new behavior. I can reproduce it in v27, v26, v25, and TCC/LE v14.
 
May 20, 2008
11,855
121
Syracuse, NY, USA
Okay, I see what you're saying now. Using the PRE_INPUT alias reverts the console title to its original value.
I don't think it's PRE_INPUT per se. I suspect the execution of PRE_INPUT is somehow triggering what happened my first observation, namely that the title reverts during the likes of ECHO FOO & DELAY 15.

Note that none of this (icon too) happens if the instance is started with start with the title being TCC.EXE's fully-qualified path (as in START "%@full[%COMSPEC]" /pgm %COMSPEC) which is seemingly Windows's default behavior.

I don't know why TCC is checking whether the original title is TCC's FQ path and behaving differently depending on the result. The behavior goes back to, at least, 4NT v8 (and I'd bet, to 4DOS).
 
May 20, 2008
11,855
121
Syracuse, NY, USA
Can you check the case of
Code:
START "" "%@FULL[%COMSPEC]"
please?
The results are in keeping with previous observations. During ECHO FOO & DELAY 15 and whenever PRE_INPUT is an alias, the title reverts to the start-up title ... an empty string ... and TCC's icon doesn't show.

1636832169097.png
 
Aug 23, 2010
678
9
Now I recall that Far Manager guys had to add some support code to consistently set console icon.
That's a "windows thing" it seems, as has been said already.
 
May 20, 2008
11,855
121
Syracuse, NY, USA
I agree, the icon business is a Windows thing. Whether the application-supplied icon is used seems to depend on the string in STARTUPINFO::lpTitle; you get the app-supplied icon if and only if that string is TCC.EXE's fully-qualified path. But it seems really odd that Windows would use the console's title to figure out what icon to use.
 
Aug 23, 2010
678
9
Does not look like it affects TCC-RT at all. What I tried is to supply random executable path to "title" of
Code:
START "…stuff…" "%[ComSpec]" /C PAUSE
 
May 20, 2008
11,855
121
Syracuse, NY, USA
This icon thing is really stupid behavior. If I do this in CMD

Code:
START "C:\WINDOWS\system32\notepad.EXE" %comspec%

I get a new instance of CMD with notepad's icon! It's similar starting TCC, and/or with TCC's START command.

Does anyone have any background on that behavior? I Googled a little and didn't find anything.
 

Similar threads

Replies
0
Views
580