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

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

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

Post 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.
Last edited by Fla$her on 2022-08-13, 12:37 UTC, edited 1 time in total.
Overquoting is evil! 👎
User avatar
vdijken
Member
Member
Posts: 181
Joined: 2016-07-30, 14:07 UTC
Location: The Netherlands

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

Post by *vdijken »

What is the problem? You don't mention any anomalous behaviour.
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

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

Post 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.
Overquoting is evil! 👎
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

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

Post 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.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

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

Post 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.
Overquoting is evil! 👎
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

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

Post 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.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

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

Post by *Fla$her »

TC could detect the presence of other instances when it is started with a given key.
Overquoting is evil! 👎
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

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

Post 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
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

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

Post 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?
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post 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.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

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

Post 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.
Overquoting is evil! 👎
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

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

Post 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.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

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

Post 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
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

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

Post 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
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

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

Post 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.
Overquoting is evil! 👎
Post Reply