Elevate current TC process as administrator explicitly

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
atbest
Junior Member
Junior Member
Posts: 11
Joined: 2019-07-23, 12:54 UTC

Elevate current TC process as administrator explicitly

Post by *atbest »

TC can request administrator privilege and elevate current process as administrator when necessary, and then return to normal privilege after a while. However, this only works for certain predefined tasks, but could not be used for certain fs plugins that require administrator privilege to work properly, eg. ext4plugin, Registry (for editing), Task Manager (to kill some processes), etc.

I tried to run TCMADM64.EXE within TC, but it says that it is internal to TC and cannot be called directly. So I have to start another TC process with administrator privilege to complete the work inconveniently. It would be great if we can trigger the prompt explicitly with a shortcut, a button, or an internal cm_* command ideally.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Elevate current TC process as administrator explicitly

Post by *Horst.Epp »

Create a button like this

Code: Select all

TOTALCMD#BAR#DATA
*%COMMANDER_EXE%
%Z/N %X"%P" "%T"
%COMMANDER_PATH%\TCMADM64.EXE
TC x64 as Admin

0
-1
It starts an enhanced instance of the current TC in the same pathes.
With this you can then run any plugin or other tools with enhanced rights.
Exit this TC when you are finished.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
atbest
Junior Member
Junior Member
Posts: 11
Joined: 2019-07-23, 12:54 UTC

Re: Elevate current TC process as administrator explicitly

Post by *atbest »

How to create such a button?
Will this revoke the admin privilege automatically after a while as defined in AdminTimeout?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Elevate current TC process as administrator explicitly

Post by *Horst.Epp »

atbest wrote: 2021-08-15, 13:34 UTC Will this revoke the admin privilege automatically after a while as defined in AdminTimeout? If not, it is dangerous and I will not use this method.
Its your decision.
Personaly I always know what mode I'm running and its shown in the title bar.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
atbest
Junior Member
Junior Member
Posts: 11
Joined: 2019-07-23, 12:54 UTC

Re: Elevate current TC process as administrator explicitly

Post by *atbest »

I understand your code now. It is actually the same with what I said "I have to start another TC process with administrator privilege to complete the work" in my initial post -just use a different icon.
Post Reply