Optional run as administrator in button bar
Moderators: white, Hacker, petermad, Stefan2
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.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.
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:Boofo wrote:What parameters are you using? I just tried it alone. The help file is kind of sparse.
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
- Boofo
- Power Member
- Posts: 1431
- Joined: 2003-02-11, 00:29 UTC
- Location: Des Moines, IA (USA)
- Contact:
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.
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.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
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
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.
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
I suppose this should work under Vista too.
Sorry, maybe I hadn't understood it right, but if you ask the reason to launch text editor as admin, I'll answer:Boofo wrote:2MVV,
What kind of instance would you need to run a text editor in Admin mode? I'm curious now.
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).
- Boofo
- Power Member
- Posts: 1431
- Joined: 2003-02-11, 00:29 UTC
- Location: Des Moines, IA (USA)
- Contact:
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.
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.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
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.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.
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.
- Boofo
- Power Member
- Posts: 1431
- Joined: 2003-02-11, 00:29 UTC
- Location: Des Moines, IA (USA)
- Contact:
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?
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?
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
@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.
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.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.