1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Elevated tab

Discussion in 'Support' started by yakir, Dec 27, 2010.

  1. yakir

    Joined:
    May 29, 2008
    Messages:
    61
    Likes Received:
    0
    I am trying to run an elevated console (cmd or tcc) in a tab, either by attach'ing or by "run /elevated /tab".
    Neither work.
    Is it possible, if so how ?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,863
    Likes Received:
    83
    It is not possible (Windows does not allow it).
     
  3. yakir

    Joined:
    May 29, 2008
    Messages:
    61
    Likes Received:
    0
    Is there way to run a tab or start UNelevated.
    I could then run TCMD as Administrator, run normal tabs unelevated and when needed run an elevated tab.
    Would this work?
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,863
    Likes Received:
    83
    If Take Command is started unelevated, it is impossible (Windows restriction) for it to see or attach elevated tabs.

    If Take Command is started elevated, it can attach unelevated console windows, but there's no way it can create its own unelevated tabs.
     
  5. andrewmill

    Joined:
    Mar 14, 2011
    Messages:
    1
    Likes Received:
    0
    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:
    Code:
    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:
    Code:
    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.

    Cheers, Andrew
     

Share This Page