Override only one instance if started from another user
Moderators: white, Hacker, petermad, Stefan2
Override only one instance if started from another user
Suggestion is simple: if 'only one instance' is used, when new TC instance is started and finds existing instance, if existing instance started by another user (or with different eleavtion level), new instance started anyway.
This may be used e.g. to start elevated TC by TC link if non-elevated already started, or to start new TC instance from admin account (currently if I use runas and start TC with admin rights, it finds started TC with user rights, activates it and closes).
Of course, feature may be optional, but I think it will be useful in most of cases.
This may be used e.g. to start elevated TC by TC link if non-elevated already started, or to start new TC instance from admin account (currently if I use runas and start TC with admin rights, it finds started TC with user rights, activates it and closes).
Of course, feature may be optional, but I think it will be useful in most of cases.
- ghisler(Author)
- Site Admin
- Posts: 48203
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Interesting idea, what do other users think about it?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I always thought 'only one instance' was 'per user'! I'm surprised it isn't. I believe MVVs suggestion is nice. If someone doesn't like the idea, perhaps there could be another INI setting, named 'only one instance per user' to do the job.ghisler(Author) wrote:Interesting idea, what do other users think about it?
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
As far as I can tell from multi-user systems, the option 'Allow only 1 copy of Total Commander at a time' actually means one Total Commander instance per Windows session.wanderer wrote:I always thought 'only one instance' was 'per user'!
You can determine the session ID with the help of Windows Task Manager or with the help of Sysinternals Process Explorer e.g.
I am curious to learn whether implementing MVV's suggestion will have any negative impact on multi-user environments where several users can be running their Total Commander instances at the same time, although the option 'Allow only 1 copy of Total Commander at a time' is active, because each of the users has got his/her own Windows session.
Karl
- ghisler(Author)
- Site Admin
- Posts: 48203
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Well, TC just enumerates the top level windows and looks for the class name "TTOTAL_CMD". If it's found, it will be activated, otherwise the new copy will continue to load. TC could count the windows instead of just looking for the first. When using separate sessions, the windows from other sessions will not be visible.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Nice, TC 7.55b1 opens another instance under another user even if 'only one instance' is used.
And, in Windows 7 non-elevated TC starts even if elevated one is already running.
But in Windows 7 elevated TC doesn't start if non-elevated one already running - but it would be great to have such feature.
And, in Windows 7 non-elevated TC starts even if elevated one is already running.
But in Windows 7 elevated TC doesn't start if non-elevated one already running - but it would be great to have such feature.
- ghisler(Author)
- Site Admin
- Posts: 48203
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Have a look at this (help about wincmd.ini):
Onlyonce=0
1: Start only one instance of Total Commander per user (e.g. started via RunAs)
-1: Start only one instance of Total Commander on this computer (for all users)
x>0: Same as 1, but multiple allowed per user
x<0: Same as -1, but multiple allowed on that computer (all users together)
Onlyonce=0
1: Start only one instance of Total Commander per user (e.g. started via RunAs)
-1: Start only one instance of Total Commander on this computer (for all users)
x>0: Same as 1, but multiple allowed per user
x<0: Same as -1, but multiple allowed on that computer (all users together)
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Just a question
There is no cm_ command for Onlyonce? As in, to toggle it via hothey?
I've noticed it works when you manually edit the Settings file while TC is running, so I guess it's 'toggleable'...
I mean, if you want to open two TC instances and keep it limited at that.
Or I'm missing the cm_ somewhere?
I've noticed it works when you manually edit the Settings file while TC is running, so I guess it's 'toggleable'...
I mean, if you want to open two TC instances and keep it limited at that.
Or I'm missing the cm_ somewhere?