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

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
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) »

Yes, for example /O:-1 would do the same as OnlyOnce=-1.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2298
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-25, 17:03 UTC/O:-1
Aren't you confused by the presence of the '-' sign in front? Somewhat unusual for a parameter.
Overquoting is evil! 👎
User avatar
white
Power Member
Power Member
Posts: 4618
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

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

Post by *white »

2Fla$her
No, he means it can be any value of the ini setting OnlyOnce. So it can be any positive and negative number and zero.
Fla$her
Power Member
Power Member
Posts: 2298
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 »

2white
I got that there will be several values, one of which is with a minus sign, which is confusing.
Overquoting is evil! 👎
User avatar
white
Power Member
Power Member
Posts: 4618
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

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

Post by *white »

Fla$her wrote: 2022-08-25, 21:15 UTC 2white
I got that there will be several values, one of which is with a minus sign, which is confusing.
Well, don't look at me. I don't agree with any of it :)

The /N option was meant to create a new instance when it would otherwise (without the parameter) not be created.
The /O option was meant to prevent a new instance when it would otherwise (without the parameter) be created.

Passing paths is optional and passing paths to an already running TC is not unique for the /O parameter. It also happens without the parameter when only 1 instance of TC is allowed. The /O parameter was only meant to override the setting to create a new instance, thus preventing it and causing the paths to be passed to the running instance. This is how it is explained in the Help. This is how it worked before.

And this is how it was added in Windows Commander 3.50:
Wiki - List of changes wrote: (16.08.97) Added: When only 1 instance, a second instance passes the command line (paths) to the previous instance
(16.08.97) Added: New command line switches: /O activates previous instance, /N creates multiple instances of Wincmd
I still remember when these options were added and thought they were very cool options.

But Ghisler changed it and his reasoning now is that the main purpose of /O is to pass paths to an already running instance of TC and to disregard the OnlyOnce setting completely. Its purpose is no longer to override the setting, but to completely ignore the setting and do its own thing.

This sounds more like an explanation of how he programmed it since TC version 7.55.
Fla$her
Power Member
Power Member
Posts: 2298
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 »

white wrote: 2022-08-26, 01:03 UTC Passing paths is optional and passing paths to an already running TC is not unique for the /O parameter.
Exactly. Returning to this statement
ghisler(Author) wrote: 2022-08-25, 08:32 UTCBut the user does want to open these new directories! So the logical consequence is to open a new copy of TC with these paths.
, I forgot to point out the condition where the presence of paths is not mandatory for uncharacteristic behavior:
Fla$her wrote: 2022-08-23, 07:15 UTCAfter that, press Win+R and run C:\Test\TOTALCMD64.EXE /O
That is, at a minimum, it is necessary to exclude the launch of the second instance in case of a lack of paths, regardless of the availability of new options.

white wrote: 2022-08-26, 01:03 UTCAnd this is how it was added in Windows Commander 3.50:
10 years before the appearance of UAC, as a result of which these problems with elevating rights arose. :)
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
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) »

10 years before the appearance of UAC, as a result of which these problems with elevating rights arose. :)
Exactly!
white words it as if I changed this deliberately to piss off people, but that isn't my intention. The main idea of /O is opening directories, if possible in an already running instance, otherwise in a new instance. It's not meant to prevent the launching of a second instance at all cost, that would need a new parameter.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
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) »

I'm moving this thread to suggestions because the current behaviour is intentional and a new parameter is needed for what is wanted here (no new instance in any case).
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2298
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 »

2ghisler(Author)
OK. But do you agree with my previous thesis that the second instance without paths should no longer run?
And answer about the minus, please.
ghisler(Author) wrote: 2022-08-26, 09:32 UTCno new instance in any case
Reaction.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
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) »

Why do you find it funny now? First you request it than then you make fun of it? I don't understand what you want.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2298
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 »

:shock: I thought that you were being ironic in parentheses, because this is an obvious thing that it makes no sense to write about seriously as an irritant that should be eliminated. I thought it was obvious. :roll:
Answer the questions, please.
Overquoting is evil! 👎
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6481
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 »

Somewhere in this thread the discussions lost some simple facts and it cycles in a loop :(
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13064
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 »

Am I right that everyone would be happy if TC would accept a new command line parameter (e.g. /O!) which would not open a new TC instance under any circumstance?

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.
Fla$her
Power Member
Power Member
Posts: 2298
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 »

Hacker wrote: 2022-08-28, 09:39 UTCeveryone would be happy
Not sure about Horst.Epp, he somehow resisted it. :)
Overquoting is evil! 👎
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6481
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-28, 09:45 UTC
Hacker wrote: 2022-08-28, 09:39 UTCeveryone would be happy
Not sure about Horst.Epp, he somehow resisted it. :)
I'm happy with the current implementation :D
So for me any additional switch is fine.
but for me its looks like the changes Christian suggested are still lead to endless discissions.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
Post Reply