Page 2 of 5

Posted: 2009-08-21, 04:41 UTC
by Boofo
2MVV,

I couldn't get it to run in XP. TC wanted to close it for some reason. Not that I need it but I like to play. ;)

Posted: 2009-08-21, 05:49 UTC
by MVV
Boofo wrote:2MVV,

I couldn't get it to run in XP. TC wanted to close it for some reason. Not that I need it but I like to play. ;)
That's strange, on my work PC with XP SP2 it works fine, also it works for me in Vista/7 w/o any troubles. When I start it w/o params, nothing happens, when I pass command line, OS shows RunAs/Elevate dialog.

Posted: 2009-08-21, 05:54 UTC
by Boofo
What parameters are you using? I just tried it alone. The help file is kind of sparse. ;)

Posted: 2009-08-21, 06:26 UTC
by MVV
Boofo wrote:What parameters are you using? I just tried it alone. The help file is kind of sparse. ;)
Just pass a command line that you wanna to execute as admin:) hlp file may have greater size than tool=) i.e. I have some buttons for launching some apps elevated:

Code: Select all

button3=E:\TOTALCMD\TOTALCMD.exe
cmd3=E:\TOTALCMD\Sudo.exe
param3=""E:\TOTALCMD\TOTALCMD.exe" /N %X"%P" "%T""
menu3=Admin: Total Commander

cmd5=E:\TOTALCMD\Sudo.exe
param5=""E:\Program Files\Tools\Notepad\Notepad++.exe" %P%N"
menu5=Admin: Edit

Posted: 2009-08-21, 09:22 UTC
by Boofo
2MVV

I have TC set to only allow 1 copy at a time. How does it open a second copy of TC as Admin?

Posted: 2009-08-21, 12:53 UTC
by Sombra
How does it open a second copy of TC as Admin?
Hello boofo,
Parameter /N launch a new session of TC even if you have checked "allow only one copy"

Posted: 2009-08-21, 13:20 UTC
by Boofo
2Sombra,

N=New. Duh on me. Thanks for the explanation. ;)

I tried to figure out a way to close TC and then re-open it as Admin, but I couldn't get anything figured out. This will work, though.

Posted: 2009-08-21, 13:26 UTC
by Boofo
2MVV,

What kind of instance would you need to run a text editor in Admin mode? I'm curious now. ;)

Posted: 2009-08-21, 16:12 UTC
by j
Edit global settings like [face=courier]hosts[/face] would be a use case for an elevated editor.

Other than that, here is what I do:
I created a NTFS link [face=courier]TOTALCMD_ADMIN.EXE[/face] to [face=courier]TOTALCMD.EXE[/face] and set its properties to "Run this program as Administrator" - under Windows 7 this has the nice advantage that the "Admin TC" gets an extra slot in the taskbar and a little "shield" as overlay.

On top of that, in the wincmd.ini, I have

Code: Select all

[Colors]
RedirectSection=colors_%__COMPAT_LAYER%.ini
Thus getting [face=courier]colors_RunAsAdmin.ini[/face] and [face=courier]colors_ElevateCreateProcess.ini[/face] to get a extra color theme for the elevated instance (I changed the background color slightly).

I suppose this should work under Vista too.

Posted: 2009-08-21, 17:45 UTC
by Boofo
2j,

I use XP Pro SP3 so I don't think that would apply to me, unless you know how it would be done in XP.

Posted: 2009-08-22, 19:31 UTC
by MVV
Boofo wrote:2MVV,

What kind of instance would you need to run a text editor in Admin mode? I'm curious now. ;)
Sorry, maybe I hadn't understood it right, but if you ask the reason to launch text editor as admin, I'll answer:

Sometimes when I edit user-write-protected file (in Vista/7 this is normal for program files dir etc.) and press Save, editor says that save failed (even notepad.exe)...
So, I need to edit file in elevated editor (I just trying to use elevated TC only when it really needed, i.e. for sync user-write-protected folders).

Posted: 2009-08-23, 01:29 UTC
by Boofo
2MVV,

Ahh, OK, that makes a little more sense to me now. So, how do you know that you are in the program as Admin? In TC that shows up in the top line, but in EditPlus, I didn't see any confirmation on it anywhere.

And thank you for explaining that, sir. ;)

Posted: 2009-08-23, 16:20 UTC
by MVV
Boofo wrote:2MVV,

Ahh, OK, that makes a little more sense to me now. So, how do you know that you are in the program as Admin? In TC that shows up in the top line, but in EditPlus, I didn't see any confirmation on it anywhere.

And thank you for explaining that, sir. ;)
I can't understand which text editor has admin rights:) just need to remember. BTW, sometimes it is very funny to start editor elevated when it looks for another instance (non-elevated usually) and passes filename to it, so my elevated launch has no effect. :lol:

BTW, in Process Explorer I can determine this fact - easiest way is to look Sudo.exe as parent:) but also elevated process has longer privileges list.

Of course, if it is necessary to determine, a good way is to have two configurations which differ in colors or something else.

Posted: 2009-08-23, 19:51 UTC
by Boofo
2MVV,

The different colors configuration is a good idea. ;)

Is there any way to have Sudo.exe automatically pick the admin login (like runas does), maybe with a parameter?

Posted: 2009-08-27, 05:15 UTC
by Balderstrom
@MVV Interesting TINY program. Appears to work under Win2K. I'll have to login under a user w/o Admin rights to check for sure.

Which makes that 1.8MB "explorer shim" program noted on page 1 seem all the more ludicrous. Before it was only 200 times bigger than "runas.exe", but now it's 900 times bigger than MVV's sudo hehehe.