Page 1 of 7

Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-12, 20:56 UTC
by Fla$her
Win 7x64, TC10.51RC1 x32.

Code: Select all

[Configuration]
...
Onlyonce=-1
TC is running with elevated permissions. Zentimo xStorage Manager — without.
In the settings of the second one on the Behavior page, ◉ An alternative file manager is selected.
In the field below it's set: "C:\Portable\Total Commander\TOTALCMD.EXE " /O /S/L=%DriveLetter%
After calling Browse Drive from the menu of the selected drive, a new instance of TC with the specified parameters is opened.

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-13, 10:32 UTC
by vdijken
What is the problem? You don't mention any anomalous behaviour.

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-13, 12:32 UTC
by Fla$her
2vdijken
From help: wrote:Onlyonce=0 -1: Start only one instance of Total Commander on this computer (for all users)

/O If Total Commander is already running, activate it and pass the path(s) in the command line to that instance (overrides the settings in the configuration dialog to have multiple windows)
Under these conditions, the drive must be opened in a running program.

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-13, 13:47 UTC
by Horst.Epp
Fla$her wrote: 2022-08-13, 12:32 UTC 2vdijken
From help: wrote:Onlyonce=0 -1: Start only one instance of Total Commander on this computer (for all users)

/O If Total Commander is already running, activate it and pass the path(s) in the command line to that instance (overrides the settings in the configuration dialog to have multiple windows)
Under these conditions, the drive must be opened in a running program.
No, that woukl mean a low privileged program conrols an higher privileged tool.
TC will alway be started in a new instance with normal privs.

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-13, 14:12 UTC
by Fla$her
Horst.Epp wrote: 2022-08-13, 13:47 UTCTC will alway be started in a new instance with normal privs.
I believe that in the case of a banal opening of the folder, this should not be a pattern.

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-13, 14:16 UTC
by Horst.Epp
Fla$her wrote: 2022-08-13, 14:12 UTC
Horst.Epp wrote: 2022-08-13, 13:47 UTCTC will alway be started in a new instance with normal privs.
I believe that in the case of a banal opening of the folder, this should not be a pattern.
Windows security doesn't know anything about the functions of the running tools.

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-13, 14:27 UTC
by Fla$her
TC could detect the presence of other instances when it is started with a given key.

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-13, 15:20 UTC
by Horst.Epp
Fla$her wrote: 2022-08-13, 14:27 UTC TC could detect the presence of other instances when it is started with a given key.
No, TC doesn't get any information in this case and it would be an violation of the Windows security concept

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-13, 23:54 UTC
by Fla$her
I don't write what he gets. I write what he could get. Just like tasklist and task manager without elevation. They see him. And TC will see it. There is no violation here.

P. S.: Why abuse overquoting? What's the point?

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-14, 06:53 UTC
by ghisler(Author)
Windows prevents apps with lower rights to send messages to apps with higher rights. This is the case here too. The already running Total Commander with higher rights could allow messages from apps with lower rights, but this would be a huge security risk.

You would have to run the command with the /O parameter with higher user rights too to pass the path to the already running version with higher rights.

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-14, 07:53 UTC
by Fla$her
ghisler(Author) wrote: 2022-08-14, 06:53 UTCbut this would be a huge security risk.
What exactly is the risk? In opening a folder in an app that you already have access to? :shock:
ghisler(Author) wrote: 2022-08-14, 06:53 UTCYou would have to run the command with the /O parameter with higher user rights too to pass the path to the already running version with higher rights.
The application has an autorun option at system startup. Accordingly, it will be launched automatically with reduced rights. It is wrong to require changes for other applications if the program action does not meet the specified conditions.

As a last resort, I prefer a window that gives the right to choose to launch a separate instance. Or even ignore the launch as such. Otherwise, the use of the specified keys becomes meaningless.

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-14, 12:08 UTC
by Horst.Epp
You still see the feature you want from a TC view.
That not what Windows security is made for
regardless of your wishes.

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-14, 13:15 UTC
by Hacker
Fla$her wrote: 2022-08-13, 14:27 UTCTC could detect the presence of other instances when it is started with a given key.
And then? The normal instance sees the admin instance. What next?

Roman

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-14, 13:25 UTC
by Dalai
2ghisler(Author)
What is OnlyOnce=-1 supposed to do when it - according to its description - applies to all users of a computer? In which case(s) does it do something? What am I missing?

Regards
Dalai

Re: Opening a new instance of TC with /O from an application with other rights

Posted: 2022-08-15, 02:28 UTC
by Fla$her
2Horst.Epp
Sorry, I don't find your answer helpful.
Hacker wrote: 2022-08-14, 13:15 UTCAnd then? The normal instance sees the admin instance. What next?
Send cd to the window by WM_COPYDATA or ignore the call if there is no possibility. In principle, I do not want the second instance to open, regardless of rights, if /N is not used. It is important. And the author must provide for this.
So far, this cannot be interpreted as anything other than an bug, given unnecessary duplication and conflicts with restartable modules, programs, scripts, which is also in my understanding a security breach.