TC9.20B4: More than 1 TC can be launched when restricted
Moderators: white, Hacker, petermad, Stefan2
TC9.20B4: More than 1 TC can be launched when restricted
TC9.20B4: "Allow only 1 copy of Total Commander at a time" doesn't work.
License #299429
There is no knowledge that is not power
There is no knowledge that is not power
UPDATE
Here's the case when it doesn't work:
1) Start TC as administrator
2) Start TC as usual user
In all other combinations (user-admin, admin-admin, user-user) second copy is not launched.
TC x64
Here's the case when it doesn't work:
1) Start TC as administrator
2) Start TC as usual user
In all other combinations (user-admin, admin-admin, user-user) second copy is not launched.
TC x64
Last edited by Sektor on 2018-05-27, 13:55 UTC, edited 1 time in total.
License #299429
There is no knowledge that is not power
There is no knowledge that is not power
I can confirm that the admin-user combination is possible.
But also as admin-admin if the first TC is 32bit and the second is 64bit and vice-versa.
But also as admin-admin if the first TC is 32bit and the second is 64bit and vice-versa.
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
- ghisler(Author)
- Site Admin
- Posts: 48125
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
NOT confirmed. The only combination which works for me when "Allow only 1 copy of Total Commander at a time" is set is the following:
Running TC 32-bit from TC 64-bit.
I agree that this should be prevented. But I cannot confirm any other combinations where I can launch a second copy of TC.
Running TC 32-bit from TC 64-bit.
I agree that this should be prevented. But I cannot confirm any other combinations where I can launch a second copy of TC.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 48125
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I managed to fix the launch of TC 32-bit while TC 64-bit was already open.
However, I cannot prevent the launch of TC with normal user rights when TC with admin rights is already running, because apparently TC with normal rights cannot 'see' TC with admin rights, so it couldn't send the path to it. Therefore you will have to live with it, sorry.
However, I cannot prevent the launch of TC with normal user rights when TC with admin rights is already running, because apparently TC with normal rights cannot 'see' TC with admin rights, so it couldn't send the path to it. Therefore you will have to live with it, sorry.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2ghisler(Author)
You have to start the second instance from a link, NOT from TC, then you will get both Admin and non-admin TC running
Here you can see TC64 as admin, TC64 non-admin and TC32 as admin running at the same time: http://madsenworld.dk/tcmd/multi_tc.png
Started in that order and via .lnk file on desktop or taskbar. Both 64bit and 32bit TC has "Allow only 1 copy of Total Commander at a time" set.
You have to start the second instance from a link, NOT from TC, then you will get both Admin and non-admin TC running
Here you can see TC64 as admin, TC64 non-admin and TC32 as admin running at the same time: http://madsenworld.dk/tcmd/multi_tc.png
Started in that order and via .lnk file on desktop or taskbar. Both 64bit and 32bit TC has "Allow only 1 copy of Total Commander at a time" set.
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
If I make four desktop links as follows:
A TC 32bit
B TC 64 bit
C TC 32bit run as admin
D TC 64bit run as admin
Here is where more than one instance is still possible:
B+A
B+C
C+A
C+B
D+A
D+B
D+C
Tested under Window 7 with TC 9.20b4. TC 32bit and TC 64 bit are installed in separate directories, and uses separate wincmd.ini files both with settings:
UseIniInProgramDir=7
onlyonce=1
A TC 32bit
B TC 64 bit
C TC 32bit run as admin
D TC 64bit run as admin
Here is where more than one instance is still possible:
B+A
B+C
C+A
C+B
D+A
D+B
D+C
Tested under Window 7 with TC 9.20b4. TC 32bit and TC 64 bit are installed in separate directories, and uses separate wincmd.ini files both with settings:
UseIniInProgramDir=7
onlyonce=1
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
- ghisler(Author)
- Site Admin
- Posts: 48125
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
2petermad
As I wrote above, I can handle the cases B+A and B+C. However, I cannot fix all the others, because the TC running with normal rights cannot communicate with the TC running with Admin rights.
As I wrote above, I can handle the cases B+A and B+C. However, I cannot fix all the others, because the TC running with normal rights cannot communicate with the TC running with Admin rights.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 48125
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The following should be fixed in Beta 5:
No launch of TC 32-bit while TC 64-bit was already open (both run as normal user).
No launch of TC 32-bit while TC 64-bit was already open (both run as normal user).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
@ghisler(Author): Normal TC can't find windows of the elevated TC due to User Interface Privilege Isolation (windows are user objects).
But what do you think about using some kernel object, like a named event? TC could call CreateEvent and check if GetLastError = ERROR_ALREADY_EXISTS to see if there is already some existing TC instance.
Important 1: event is automatically closed on process termination (and destroyed when an internal reference counter is 0), so there is no risk that killing first TC instance will block next TC instances.
Important 2: every logged-in user has his own namespace, so events of one logged-in user (on a server Windows machine) will not block other logged-in users.
This tiny test program seems to work with all elevated/non-elevated combinations:
Regards
But what do you think about using some kernel object, like a named event? TC could call CreateEvent and check if GetLastError = ERROR_ALREADY_EXISTS to see if there is already some existing TC instance.
Important 1: event is automatically closed on process termination (and destroyed when an internal reference counter is 0), so there is no risk that killing first TC instance will block next TC instances.
Important 2: every logged-in user has his own namespace, so events of one logged-in user (on a server Windows machine) will not block other logged-in users.
This tiny test program seems to work with all elevated/non-elevated combinations:
Code: Select all
program Test;
uses
Windows;
begin
if CreateEvent(nil,False,False,'SomeEventName') = 0 then
MessageBox(0,'some serious failure','',0)
else
if GetLastError = ERROR_ALREADY_EXISTS then
MessageBox(0,'next instance','',0)
else
MessageBox(0,'first instance','',0);
end.
Well D+C also seem to be fixed in TC 9.20b5I can handle the cases B+A and B+C
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
- ghisler(Author)
- Site Admin
- Posts: 48125
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, D+C can see each other.
I don't currently plan to use any other means of detection. Why? Even when normal TC could see admin TC, it wouldn't be allowed to send new directories to it. I could allow receiving of WM_COPYDATA, but it would be a huge security risk.
I don't currently plan to use any other means of detection. Why? Even when normal TC could see admin TC, it wouldn't be allowed to send new directories to it. I could allow receiving of WM_COPYDATA, but it would be a huge security risk.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com