Can you add a cm command to restart TC?
Moderators: Hacker, petermad, Stefan2, white
Re: Can you add a cm command to restart TC?
2petermad
There is a big disadvantage in your solutions — the lack of waiting for the program to close, which as a result causes a number of conflicts for resident modules (Autorun + ShellExecute, TWinKey > Miscellaneous > Startup Sequence).
It is also important to consider the architecture of the system for compatibility.
There is another important point that I implemented in my other old code: returning to directories that were opened in partially blocked tabs. But these are the details that are important to me and some other users.
There is a big disadvantage in your solutions — the lack of waiting for the program to close, which as a result causes a number of conflicts for resident modules (Autorun + ShellExecute, TWinKey > Miscellaneous > Startup Sequence).
It is also important to consider the architecture of the system for compatibility.
There is another important point that I implemented in my other old code: returning to directories that were opened in partially blocked tabs. But these are the details that are important to me and some other users.
Overquoting is evil! 👎
Re: Can you add a cm command to restart TC?
I don't have any of those running, so I cannot test it. But you can put in a wait periond (cm_Wait 500) before cm_Exit maybe that can help? It will change the instance number of the running TC though.the lack of waiting for the program to close, which as a result causes a number of conflicts for resident modules (Autorun + ShellExecute, TWinKey > Miscellaneous > Startup Sequence).
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
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
Re: Can you add a cm command to restart TC?
Just take my word for it. I have devoted enough time to this in my time.
Under different conditions, a small delay is not suitable for a universal restart, therefore, in my code there is a waiting for the process to complete.petermad wrote: 2022-10-02, 14:17 UTCBut you can put in a wait periond (cm_Wait 500) before cm_Exit maybe that can help?
On the contrary, the instance number will correspond to the last one that was completed.
Overquoting is evil! 👎
Re: Can you add a cm command to restart TC?
Whats the reason for swapping the TC version instead of running both versions in parallel
if the x86 version is needed ?
if the x86 version is needed ?
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Can you add a cm command to restart TC?
2Horst.Epp
First of all, the reason is the lack of need to keep several subprocesses and avoid conflicts between them.
As a rule, the user does not need an instance with another of the architectures, if everything suits him. However, for experiments and problems related to memory, the presence of plugins or programs that do not support compatibility, we have to temporarily resort to a different architecture.
First of all, the reason is the lack of need to keep several subprocesses and avoid conflicts between them.
As a rule, the user does not need an instance with another of the architectures, if everything suits him. However, for experiments and problems related to memory, the presence of plugins or programs that do not support compatibility, we have to temporarily resort to a different architecture.
Overquoting is evil! 👎
Re: Can you add a cm command to restart TC?
2Fla$her
I meant with my solution and adding cm_Wait - not with your solutionOn the contrary, the instance number will correspond to the last one that was completed
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
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
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Can you add a cm command to restart TC?
2Fla$her
Thanks for the script AutoIT, but I have TCIMG (it's defacto Autoit too) already.
I have the autorun plugin with some settings but haven't noticed any problems (solution by petermad).
2petermad
Thanks, this is what I need. Works faster than TCIMG.
But I didn’t understand why the second instance of the program starts first, and then exits the first one? What's wrong with this code?:
This works, because the list of commands must be completed in full. For example delay:
- Works, but the cursor locations in the panels are reset. That is, it is better not to turn on the delay, without delay - ok.
2Horst.Epp
I have a system Win7x64 (at home) Win10x64 (at work), I use TCx32, because I have repeatedly noticed bugs that lead to the crash TCx64, while the TCx32 worked fine. In general, I think that TCx32 is more stable. Also in TCx32 there are old necessary plugins that are not on TCx64.
TCx64 has other benefits, such as showing thumbnails of documents for 64-bit applications.
Sometimes I have to switch, I set it up for myself like this:
Alt + Pause - Restart TC
Alt +Shift+Pause - TCx32 <-> TCx64
It's convenient and very fast for me.
Thanks for the script AutoIT, but I have TCIMG (it's defacto Autoit too) already.
I have the autorun plugin with some settings but haven't noticed any problems (solution by petermad).
2petermad
Thanks, this is what I need. Works faster than TCIMG.
But I didn’t understand why the second instance of the program starts first, and then exits the first one? What's wrong with this code?:
Code: Select all
cm_Exit, em_othercommander
Code: Select all
cm_exit, cm_wait 2000, em_othercommander
2Horst.Epp
I have a system Win7x64 (at home) Win10x64 (at work), I use TCx32, because I have repeatedly noticed bugs that lead to the crash TCx64, while the TCx32 worked fine. In general, I think that TCx32 is more stable. Also in TCx32 there are old necessary plugins that are not on TCx64.
TCx64 has other benefits, such as showing thumbnails of documents for 64-bit applications.
Sometimes I have to switch, I set it up for myself like this:
Alt + Pause - Restart TC
Alt +Shift+Pause - TCx32 <-> TCx64
It's convenient and very fast for me.
Re: Can you add a cm command to restart TC?
Oh, I see. You wrote "though". ОК.petermad wrote: 2022-10-02, 22:48 UTCI meant with my solution and adding cm_Wait - not with your solution
The algorithm itself is important, not the tool.
It's not any settings that are important, but specifically the launch and termination of programs (+ /T Or /TT), the execution of commands (including registry editing) after the AutorunFinalizeSection directive.monarch-lfv wrote: 2022-10-03, 05:08 UTCI have the autorun plugin with some settings but haven't noticed any problems (solution by petermad).
Overquoting is evil! 👎
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Can you add a cm command to restart TC?
2Fla$her
You're right, I don't have those options (+ /T Or /TT). But at the same time, I have several programs that start with the TC. But these programs are not closed when the total is exited (for what should the processor be loaded when the TC is restarted). Implemented like this:
That is, I give all the difficulties to scripts. There is also a separate script that kills all processes running from the %COMMANDER_PATH% directory (of course does not start with the Autorun).
You're right, I don't have those options (+ /T Or /TT). But at the same time, I have several programs that start with the TC. But these programs are not closed when the total is exited (for what should the processor be loaded when the TC is restarted). Implemented like this:
Code: Select all
ShellExec "%COMMANDER_PATH%\Plugins\wdx\Autorun\Autorun_program.vbs"
Re: Can you add a cm command to restart TC?
2monarch-lfv
I wrote about universality. I don't understand why run programs through a script that runs from autorun? Why is there an extra layer? And what kind of difficulties are you talking about?
A script that does something separate from the directive has nothing to do with the case.
I wrote about universality. I don't understand why run programs through a script that runs from autorun? Why is there an extra layer? And what kind of difficulties are you talking about?
A script that does something separate from the directive has nothing to do with the case.
Overquoting is evil! 👎
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Can you add a cm command to restart TC?
There are features of launching some programs. Basically, these are utilities placed in the tray. That is, if the program is already running (it is in the tray and in processes), then its subsequent launch opens the main settings window (for example, XMouseButtonControl). Other programs, when restarted, display a dialog box warning that the program is already running (for example, Greenshot). And this is what I need to avoid. Therefore, in the script I do process tracking, if the process exists, then the launch is not carried out.
At the first start of the Total, all the applications I need are launched and are constantly in the tray. They do not depend on Total restarts in any way.
- ghisler(Author)
- Site Admin
- Posts: 50430
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Can you add a cm command to restart TC?
The next Total Commander will support restart via command:
CM_EXIT 1
This will start TC with parameter /N after saving paths on exit (if this is enabled by the user). It will also pass parameters /i= and /f= for the ini files if they were passed to the running program. Anything else?
CM_EXIT 1
This will start TC with parameter /N after saving paths on exit (if this is enabled by the user). It will also pass parameters /i= and /f= for the ini files if they were passed to the running program. Anything else?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Can you add a cm command to restart TC?
2ghisler(Author)
Yes, if possible - restart with switch versions TCx32 <-> TCx64. Thank you!
Yes, if possible - restart with switch versions TCx32 <-> TCx64. Thank you!
Re: Can you add a cm command to restart TC?
That's what I'm writing about. What's the point of doing this in a script if you can do it without problems via autorun.cfg using ProcessExist?monarch-lfv wrote: 2022-10-03, 09:00 UTCTherefore, in the script I do process tracking, if the process exists, then the launch is not carried out.
This is just a special case.monarch-lfv wrote: 2022-10-03, 09:00 UTCAt the first start of the Total, all the applications I need are launched and are constantly in the tray. They do not depend on Total restarts in any way.
But when we use portable TC, then in the process of its completion (incl. before disconnecting the portable device) on other machines, it is required to close the running resident processes as well.
In addition, there are situations when the same resident script is tied to the handle of the process being completed for interaction only with it. Accordingly, there is no point in leaving it working. I have enough of them.
Or there are situations when one or another program is compared with the architecture of TC process, respectively, when restarting, replacement with the appropriate one is required.
Last edited by Fla$her on 2022-10-03, 10:32 UTC, edited 2 times in total.
Overquoting is evil! 👎
Re: Can you add a cm command to restart TC?
Yes:
If you do, it will be just wonderful!Fla$her wrote: 2022-10-02, 13:04 UTCreturning to directories that were opened in partially blocked tabs.

Overquoting is evil! 👎