force run without elevation

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Hurdet
Power Member
Power Member
Posts: 716
Joined: 2003-05-10, 18:02 UTC

force run without elevation

Post by *Hurdet »

Do it have a switch to launch TC without elevation also from a shell elevated?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6973
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: force run without elevation

Post by *Horst.Epp »

What's the reason to have this ?
Normally, TC should not run with elevated rights and only temporarily enhanced for certain operations.
So there is no need to let it run with lower privs.
Only fools run a file manager with enhanced rights all the time.

Moderator message from: white » 2023-06-29, 19:50 UTC

Mind your language. Insults are not allowed on this board.
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
User avatar
Dalai
Power Member
Power Member
Posts: 9963
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: force run without elevation

Post by *Dalai »

Even if you want to implement a feature like this, it's not so simple. Elevating rights is easy, lowering them not so much. Installers that want to be able to launch the installed program after installation also have their difficulties implementing something that works reliably.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
HerbieH
Member
Member
Posts: 154
Joined: 2003-02-11, 10:04 UTC

Re: force run without elevation

Post by *HerbieH »

I am one of those 'foo** (fighters)' that often run 'Total Commander' elevated.

Here is my way (out of many ways) to run a non-elevated command prompt from an elevated Total Commander:

Code: Select all

C:\Nirsoft\nircmd.exe runas myusername mypassword cmd
Clarifications:
'myusername mypassword' is your windows login username and password
(You have to have set both of them to make it work, preferrably without spaces and only using letters and numbers)

'Nirsoft' is a folder, where I store utilities from this site:
https://www.nirsoft.net/

'nircmd.exe' is a Nirsoft utility that 'do some useful tasks without displaying any user interface'
https://www.nirsoft.net/utils/nircmd.html

'cmd' is a standard Windows command that opens a command window.

Works for me in Windows 7, 8.1 and 10 all 64bit.

OBS: 'runas' is also a standard Windows command, but the 'nircmd.exe' version is much simpler to use.
I consider 'https://www.nirsoft.net/' a safe site. If somebody disagree, feel free say so.
HerbieH*
-Keep on makin' music!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6973
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: force run without elevation

Post by *Horst.Epp »

Here such a function without the need to provide userid and password
from user NotNull in the Everything forum.
https://www.voidtools.com/forum/viewtopic.php?p=29260#p29260
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
User avatar
petermad
Power Member
Power Member
Posts: 16031
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: force run without elevation

Post by *petermad »

Here is a solution without any 3rd party programs:

Put this in your usercmd.ini file (located in the same place as your wincmd.ini file):

Code: Select all

[em_CommanderNonElevated]
cmd=%COMSPEC% /C
param=%Z%X RUNAS /user:"%%USERNAME%%" "\"%%COMMANDER_EXE%%\" /N /P /i=\"%%COMMANDER_INI%%\" %Q\"%P%N*\" \"%T%M*\""
menu=Open non elevated copy of Total Commander
button=%COMMANDER_EXE%
iconic=0
Make this buton:

Code: Select all

TOTALCMD#BAR#DATA
em_CommanderNonElevated,cm_Exit

%COMMANDER_EXE%
Restart Total Commander in non elevated mode
To make the button:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".
You will be prompted for your password when using the button.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply