Run as administrator

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Run as administrator

Post by *MVV »

Hi to all again. Today I want to say about Vista's UAC. Normally, programs started with user rights, while it is enough. But sometimes we need to start a program with administrator rights. In Windows we can use right-click menu. But if we have a program on toolbar or in TC menu, we can't.

So I suggest to add an option "Run as administrator" or "Run elevated".

Also this option may be useful while packing/unpacking. For example, if I use Alt+F9 to unpacking a CAB archive within TC and target folder is write-protected for user profile, TC "unpacks" it but no files are placed into target folder. No rights-required dialog appear.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3864
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

So I suggest to add an option "Run as administrator"
Already suggested, see: Optional run as administrator in button bar
#5767 Personal license
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Eh, I miss it again... But it is an easy-to-make feature - just one call of ShellExecute[Ex] with "runas" verb. So, I think this feature will be useful.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

For the button bar, you can create a shortcut (lnk) with Ctrl+Shift+F5, and then use Alt+Enter to set Options like "Run as administrator". Then add this lnk file to the TC buttonbar.
Author of Total Commander
https://www.ghisler.com
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Run as administrator

Post by *HolgerK »

MVV wrote:... But sometimes we need to start a program with administrator rights. In Windows we can use right-click menu. But if we have a program on toolbar or in TC menu, we can't.

So I suggest to add an option "Run as administrator" or "Run elevated".
Download and install the Elevation PowerToys for Windows Vista.

After this, you can simply add "elevate" in front of the program or script you want to start with UAC "prompt for consent" dialog.
For example:

Code: Select all

elevate %COMMANDER_PATH%\TOTALCMD.EXE
HTH,
Holger
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

For now, if TC needs to perform an operation which requires admin rights, it asks user to perform operation as admin. Operating system asks elevate confirmation not every time but after some time elapsed.

But not all operations can be performed in TC user-mode. For example, launching editor to edit a file (or create a file on Shift+F4) in folder, which is read-only for user but fully accessible for admin.

I think it will be useful if user can elevate running TC not only for current operation, but on a few time (some minutes for example) for performing more operations which requre admin rights (editing documents in protected folders from users, launching archivers or other external programs) without elevation asks or restarting TC in admin mode which is unsafe.
urlwolf
Junior Member
Junior Member
Posts: 70
Joined: 2007-06-27, 23:03 UTC

Post by *urlwolf »

I think it will be useful if user can elevate running TC not only for current operation, but on a few time (some minutes for example) for performing more operations which requre admin rights (editing documents in protected folders from users, launching archivers or other external programs) without elevation asks or restarting TC in admin mode which is unsafe.
Agreed. Is this possible? I end up typing admin passwd dozens of times a day. On ubuntu, it's 2-3 times a day at most.

Would it be a horrible security breach to run TC as admin? (then all spawned processes would be admin).

The problem with this is that if you create new folders with TC they will be read-only for users (pain!).

Thanks
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

urlwolf wrote: Would it be a horrible security breach to run TC as admin? (then all spawned processes would be admin).

The problem with this is that if you create new folders with TC they will be read-only for users (pain!).
I don't wanna to run TC as admin, so I've created this topic. :)
I just wanna to have possibility to perform some actions in close time w/o elevation reminds and troubles with unpacking/moving/deleting files to/from write-protected folders.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2MVV
It would be nice to have elevation command with timer. DirectoryOpus has something like that:
http://www.pretentiousname.com/opus9/page4.html#vistaadminmode

Similar solution could be great. Maybe even more advanced "Run as" - not limited to admin only.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

TC has many actions that may require admin rights but for now TCMAdmin can't do all of this things. I think it would be great if we can choose elevated actions (for example, while in such elevated mode not to run sub-applications elevated).

It is more difficult to integrate new features than to plan it at the design time. It will be great if Christian paid attention to our topic's subject. :)
urlwolf
Junior Member
Junior Member
Posts: 70
Joined: 2007-06-27, 23:03 UTC

Post by *urlwolf »

another solution is to get a cmd prompt in current dir with admin rights. Not ideal, but if you are used to cmd, ... at least it doesn't ask you for a passwd every move you make.

Honestly, the way it works in ubuntu makes windows look like a real pain. More secure, but borderline stupid.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

urlwolf wrote:another solution is to get a cmd prompt in current dir with admin rights. Not ideal, but if you are used to cmd, ... at least it doesn't ask you for a passwd every move you make.

Honestly, the way it works in ubuntu makes windows look like a real pain. More secure, but borderline stupid.
It's not a solution because in cmd you can't list/unpack archives, can't select files and so on. It is just NOT a TC.
urlwolf
Junior Member
Junior Member
Posts: 70
Joined: 2007-06-27, 23:03 UTC

Post by *urlwolf »

anyway, I'd be happy to know if one can spawn a cmd with admin privs from TC.
I now do: alt + c, alt + d = run dos, but I'd like to get this dos as admin. Even better, call console instead of CMD.exe.
Post Reply