Welcome!

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

SignUp Now!

Caption when running elevated?

May
12,846
164
I have the same setup on two machines:
System TITLEPROMPT variable
UpdateTitle=No
Scheduled task: "TccAdmin" [path]\tcc.exe /q
Identical TCSTART.BTMs

I start TCC elevated with "SCHTASKS /run /tn TccAdmin.

On one machine, the console caption is my TITLEPROMPT except during execution of a GLOBAL command, when the caption changes to "Administrator: taskeng.exe" (but not during, say, "DIR/s c:\").

On the other machine, the caption starts as, and stays, "Administrator: taskeng.exe".

I have no idea why the machines would behave differently or why, on the first machine, the caption changes during a GLOBAL command but now during other commands.

IIRC, in some previous version, the caption was "Administrator: " followed by my TITLEPROMPT.
Any ideas? Here are a couple pics. FWIW, the first computer mentioned is the local machine, the second is being accessed via RemoteDesktop.

admin1.png

admin2.png
 
I also see a difference between the two machines without the scheduled task business. Starting TCC elevated in the more normal way, via "Run as administrator" on its context menu ...

On the first machine mentioned in my previous post, its caption is simply <titleprompt> and that changes to "Administrator: <titleprompt>" during a GLOBAL command, but not during "DIR /S c:\".

On the other machine, it stays constant at "Administrator: <titleprompt>"
 
Adding .BTM to PATHEXT got my work computer to execute TCSTART.BTM. Now the behavior of the console of an elevated TCC is the same on both machines. The caption when sitting at a prompt is whatever my TITLEPROMPT specifies (only); the caption changes during a GLOBAL command and does not change during a "DIR/S c:\" command? That's odd. What determines if it changes?

What the caption changes to during a GLOBAL command depends on how TCC was started (elevated). If it was started by the normal context menu method, the caption during GLOBAL is "Administrator: <titleprompt>". If it was started via "SCHTASKS /RUN", the caption during GLOBAL is "Administrator: taskeng.exe". That's odd too. Why is the change different in these two cases?

In any case, when elevated, my TCSTART.BTM does

1. clicks the left mouse button once in the console (to guarantee focus)
2. if %_PPID is that of TASKENG.EXE, kills it
 
Is this caption coming from TCC? By this time I've killed TASKENG.EXE.
admin3.png
 
You can see this phenomenon without any elevated stuff.

Start CMD.EXE. At a CMD prompt, issue [path]\tcc. TCC starts. During "GLOBAL ..." the caption changes to "[path]\tcc" (I suppose that caption was put there by CMD). The caption doesn't change during "DIR /S c:\"
 

Similar threads

Back
Top