I am trying to run an elevated console (cmd or tcc) in a tab, either by attach'ing or by "run /elevated /tab".
Is it possible, if so how ?
I'm not sure if this solution will help you, but I have a batch file (in my case, elevate.cmd) that launches an elevated version of the current console. It won't stay tabbed within TakeCommand
, but it does launch quickly and easily from the command prompt. User Account Control still needs to be accepted, but this is a quick [ALT]-[TAB] and [ALT]-[Y].
The command in my elevate.cmd is:
start /elevated "%_cmdspec"
My tcstart.cmd also contains some quick code to change the prompt if the console is elevated. This is a useful reminder of elevation and runs whether the console is started from the command prompt or through a right-click, Run as administrator.
The relevant line from tcstart.cmd is:
IF "%_ELEVATED" == "1" PROMPT $e[1;37;5;41m$e[K## ELEVATED as %_WINUSER ##$_$e[1;32m[$P]
You'll needs ANSI Colors enabled in your TCC settings for this command to work.
Hopefully this goes someway to help achieve what you're looking for.