How to reopen TC instance as admin ?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

How to reopen TC instance as admin ?

Post by *wanderer »

It would be great if there was a way to reopen a TC instance as Admin (with all the tabs and their settings retained).





Subject adjusted and thread moved from Suggestions- to English- forum by moderator.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: Reopen TC instance as admin

Post by *JOUBE »

cm_exit 29
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: Reopen TC instance as admin

Post by *wanderer »

Ah! Pretty fast and almost what i wanted... :)

Thanks for the tip but it has a major issue. It saves everything in wincmd.ini, so every new TC instance i open after that, reopens all tabs again.

I have disabled such features so that TC always opens with 1 tab per panel, in default folders ( C:\ ), so this is a major issue for me. Any ideas on how to overcome this?
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6497
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Reopen TC instance as admin

Post by *Horst.Epp »

I use a button which adds an Admin instance with all tabs and the cursor position preserved.

Code: Select all

TOTALCMD#BAR#DATA
*%COMMANDER_EXE%  /N /P /A  /i="%COMMANDER_INI%"
%Z%X %P%N* %T%M*
%COMMANDER_PATH%\TCMADM64.EXE
Open New TC as Admin

0
-1
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: Reopen TC instance as admin

Post by *wanderer »

Horst.Epp wrote: 2024-03-28, 13:38 UTC I use a button which adds an Admin instance with all tabs and the cursor position preserved.
OK, you lost me. :) I don't understand the format. Could you split them to "title", "command" and "parameters" in order to be added as a button to the toolbar?

Thanks.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
Stefan2
Power Member
Power Member
Posts: 4159
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Reopen TC instance as admin

Post by *Stefan2 »

wanderer wrote: 2024-03-28, 13:59 UTC I don't understand the format. Could you split them to "title", "command" and "parameters"


Button-code: How-to Copy Share Paste a button ('TOTALCMD#BAR#DATA')
https://ghisler.ch/board/viewtopic.php?p=335879#p335879

Code Explanation:
Line 1: let TC recognize his own button code
Line 2: the Command
Line 3: the Parameters (a leading '?' will display the command before actual executing) , (*)
Line 4: the path to the Icon file (try 'WCMICONS.DLL' for TCs Icons)
Line 5: the Tool tip
Line 6: the Start path (can (should!) mostly just left empty)
Line 7: start parameter for the command as minimized / maximized (in 'usercmd.ini' this is the 'iconic' option)
Line 8: the number of the internal TC command, if any in line 2, else a '-1' is shown
Horst.Epp wrote: 2024-03-28, 13:38 UTC I use a button which adds an Admin instance with all tabs and the cursor position preserved.

Code: Select all

Line 1: TOTALCMD#BAR#DATA
Line 2: *%COMMANDER_EXE%  /N /P /A  /i="%COMMANDER_INI%"
Line 3: %Z%X %P%N* %T%M*
Line 4: %COMMANDER_PATH%\TCMADM64.EXE
Line 5: Open New TC as Admin
Line 6: 
Line 7: 0
Line 8: -1



(*) for TC parameters read the TC-Help:

Click [Help]-Button or press F1-key or open the TOTALCMD.CHM from TC folder (or subfolder "e").
In CHM go > Operation > User interface > click the "(Button bar)"
> click "Dialog box to change" > read down at "Parameters:" %P %N %X %Y %L %F...
(also read the History.txt and search the forum for the single parameter to learn more about)


 
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: How to reopen TC instance as admin ?

Post by *wanderer »

2 Stefan2

Wow!!! I've missed that. Pretty nice. Thanks for the explanation.

2 Horst.Epp

Thanks again for it. I tried it and it works fine, except that if there are more than one tabs open in a panel, it only passes the active tab to the new instance.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Reopen TC instance as admin

Post by *tuska »

Horst.Epp wrote: 2024-03-28, 13:38 UTC I use a button which adds an Admin instance with all tabs and the cursor position preserved.
...
With this variant, however, the focus ALWAYS changes from the right window to the left window.
With cm_Exit 29, the focus is retained.

---
One point that I have noticed, but which I will not investigate further, is the following:
If you are in a "subbar" in the button bar, the main button bar is called up after cm_Exit 29.
Post Reply