Is there a way to toggle the "OnlyOnce=#" command by shortcut, while running?
I want to have only one window 'openable' by default, but also toggle the option for extra instance(s) without restarting.
Thanks.
Toggling "Onlyonce" (TC instance) by shortcut
Moderators: white, Hacker, petermad, Stefan2
Re: Toggling "Onlyonce" (TC instance) by shortcut
There is no internal command, so its not directly possible.
But whats the problem to allow more than one instance ?
Its useful to allow more than one instance to start a 2nd TC with enhanced rights in the current tree for example.
You also have the option to use the /o command line switch for all your ways to start TC.
So you never get more than one instance if you don't want it.
But whats the problem to allow more than one instance ?
Its useful to allow more than one instance to start a 2nd TC with enhanced rights in the current tree for example.
You also have the option to use the /o command line switch for all your ways to start TC.
So you never get more than one instance if you don't want it.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
- ghisler(Author)
- Site Admin
- Posts: 48077
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Toggling "Onlyonce" (TC instance) by shortcut
You also have the /N parameter to open a new Total Commander even if OnlyOnce=1 is set.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Toggling "Onlyonce" (TC instance) by shortcut
Solved by mr Ghistler's one-line reply Exactly what I wanted.
(which right now only restores an existing window)
Thank you.
I need a separate caller for an extra instance, which doesn't interfere with the original oneby @Horst.Epp:
But whats the problem to allow more than one instance ?
(which right now only restores an existing window)
Thank you.
Re: Toggling "Onlyonce" (TC instance) by shortcut
It sounds more like you need to run a second instance of TC that uses its own ini-file.which doesn't interfere with the original one
You could make a copy of your wincmd.ini file and call it for example wincmd2.ini. Then you can start a new instance of totalcommander with the /i parameter parameter like: path_to_tc\totalcmd64.exe /n /i=path_to_inifile\wincmd2.ini - then the second instance will use wincmd2.ini and all changes made in the second instance will not be recognized by the first instance - but of course you have to synchronize the two ini-files manually, when you make changes you want to apply to both instances like installing new plugins.
Another way is to disable "Options" -> "Operation" -> "Save on exit" -> "Directories" AND "Panels (brief/full, etc.)". Then your TC will always start in the same state with the same directories in the panels and tabs. If you want to change the start-up state, then make the changes and use "Cofiguration" -> "Save Settings" If you use this approach you can just start TC with the /n parameter - and the new instance will start in the previously saved state. I recommend this approach - that's what I use myself.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Toggling "Onlyonce" (TC instance) by shortcut
Hello wiperr
You CAN toggle settings in TC's wincmd.ini file, that works without restarting TC.
Example:
I use 'Nircmd' by Nir Sofer to automatically change my wincmd.ini to make a .zip or .rar file file unpacked with or without the packed directory structure:
This works right away!
- You can make two strings, that deals with your request:
This is easily implemented as two 'em_[something]' commands in your 'Wcmd_eng.ini' file - or you can place them in two .bat (.cmd) files.
All can be excuted from within TC.
If it works like the ExtractPathInZIP command, the changes will take place immediately!
PS: A more skilled .cmd file creator could make a single 'toggle' file - using 'IF' to measure the state of 'onlyonce', and then change it to the other.
You CAN toggle settings in TC's wincmd.ini file, that works without restarting TC.
Example:
I use 'Nircmd' by Nir Sofer to automatically change my wincmd.ini to make a .zip or .rar file file unpacked with or without the packed directory structure:
Code: Select all
nircmd.exe inisetval "%COMMANDER_PATH%\wincmd.ini" "Packer" "ExtractPathInZIP" "0" (..or "1")
- You can make two strings, that deals with your request:
Code: Select all
nircmd.exe inisetval "%COMMANDER_PATH%\wincmd.ini" "Configuration" "onlyonce" "0"
nircmd.exe inisetval "%COMMANDER_PATH%\wincmd.ini" "Configuration" "onlyonce" "1"
All can be excuted from within TC.
If it works like the ExtractPathInZIP command, the changes will take place immediately!
PS: A more skilled .cmd file creator could make a single 'toggle' file - using 'IF' to measure the state of 'onlyonce', and then change it to the other.
HerbieH*
-Keep on makin' music!
-Keep on makin' music!