Run as Administrator question

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Jun 28, 2008
41
0
#1
Couple of quick questions about running TCMD/TCC as administrator.

1. Is there a way to make it where the title bar or something is obviously different color or different text automatically on elevated sessions of TCC and/or TCMD?

2. If I have a TCMD session open, and I have single instance option of TCMD enabled and try to open an elevated TCMD session, does the existing TCMD session get elevated, or does the the request to elevate get ignored? Personally, I would think the single instance should be per user. If you run an elevated session of TCMD it wouldn't know or care a non-elevated session was running.
 
#2
Speedie6:
...
| 1. Is there a way to make it where the title bar or something is
| obviously different color or different text automatically on elevated
| sessions of TCC and/or TCMD?

You can use the TCC internal variable _ELEVATED in a batch file which changes the title of the TCMD or TCC window, but AFAIK nothing will do it automatically.

| 2. If I have a TCMD session open, and I have single instance option
| of TCMD enabled and try to open an elevated TCMD session, does the
| existing TCMD session get elevated, or does the the request to
| elevate get ignored? Personally, I would think the single instance
| should be per user. If you run an elevated session of TCMD it
| wouldn't know or care a non-elevated session was running.

AFAIK you must specify "elevated" when the process is created, hence if you use the single instance option of TCMD you cannot open another TCMD window, no elevated TCMD window can be created while a non-elevated window remains open.
--
Steve
 
Jun 28, 2008
41
0
#3
You can use the TCC internal variable _ELEVATED in a batch file which changes the title of the TCMD or TCC window, but AFAIK nothing will do it automatically.
Okay, I may play with that.

AFAIK you must specify "elevated" when the process is created, hence if you use the single instance option of TCMD you cannot open another TCMD window, no elevated TCMD window can be created while a non-elevated window remains open.
That's what I figured is likely. But, I still think that the single instance option should apply per user so that there could be an elevated and non elevated instance while single instance is selected.
 

rconn

Administrator
Staff member
May 14, 2008
10,097
85
#4
Couple of quick questions about running TCMD/TCC as administrator.

1. Is there a way to make it where the title bar or something is obviously different color or different text automatically on elevated sessions of TCC and/or TCMD?
Easily done in your TCSTART with the %_elevated variable.

2. If I have a TCMD session open, and I have single instance option of TCMD enabled and try to open an elevated TCMD session, does the existing TCMD session get elevated, or does the the request to elevate get ignored? Personally, I would think the single instance should be per user. If you run an elevated session of TCMD it wouldn't know or care a non-elevated session was running.
[/QUOTE]

It is impossible in Windows to elevate an existing process.

The single instance check is system wide, not per-user. The idea being that if you wanted single instance, you probably had a reason for it (like potential conflicts in your TCMD.INI, shared memory, TCSTART, etc.). Also, when you have options like "auto attach consoles" set, you're relying on random chance as to which TCMD session is going to grab them.