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
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

Fla$her wrote: 2022-08-23, 07:15 UTC 2petermad
Save Onlyonce=-1 in %COMMMANDER_INI% и and reload TC.
With reload - do you mean start TC from Explorer or from it's Deskop link?
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2247
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 »

2petermad
Just close it and run it with elevated rights (lnk + launch flag with admin rights, for example).
Don't forget about UseIniInProgramDir=7.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

2Fla$her
Save Onlyonce=-1 in %COMMMANDER_INI% и and reload TC.
Explorer must have user rights, and TC, in turn, must have elevated rights. Is this condition met?
After that, press Win+R and run C:\Test\TOTALCMD64.EXE /O
With this approach I can confirm that a second instance is opened.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2247
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 »

2petermad
Thanks for another bug confirmation. ) Let's wait for the author.
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) »

/O does not override the problem that elevated programs cannot receive messages from programs running with normal user rights. This is a Microsoft security measure, and I do not want to bypass it.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4596
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 »

ghisler(Author) wrote: 2022-08-24, 06:49 UTC /O does not override the problem that elevated programs cannot receive messages from programs running with normal user rights. This is a Microsoft security measure, and I do not want to bypass it.
That's OK, but what about /O causing an extra instance compared to not using it. That doesn't make sense.
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) »

/O always opens a new instance when no instance is running yet. An elevated instance is ignored, so when no instance with normal rights is running, /O will open a new one.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4596
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 »

ghisler(Author) wrote: 2022-08-24, 09:44 UTC /O always opens a new instance when no instance is running yet. An elevated instance is ignored, so when no instance with normal rights is running, /O will open a new one.
In that case running without /O also opens a new one. I was talking about when this isn't the case:
white wrote: 2022-08-24, 09:09 UTC That's OK, but what about /O causing an extra instance compared to not using it.
I was talking about when using "Onlyonce=-1" like described in this topic's first post.
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) »

/O just overrides the OnlyOnce option. I don't understand what else you want to know.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4596
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 »

ghisler(Author) wrote: 2022-08-24, 10:04 UTC /O just overrides the OnlyOnce option. I don't understand what else you want to know.
It was my understanding that the purpose of adding /O is to prevent another instance, so overriding the OnlyOnce=0 option. Not to force another instance.

Don't you think it's odd that the option /O (Only once) means no extra instance, but in another circumstance (OnlyOnce=-1) means force an extra instance?
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) »

No, /O doesn't just mean "no extra instance". From the help:
/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).

So the switch is meant to pass parameters to an already running instance (if that exists). Otherwise it works just like without the switch.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4596
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 »

ghisler(Author) wrote: 2022-08-24, 10:34 UTC So the switch is meant to pass parameters to an already running instance (if that exists).
Exactly, preventing another instance.
ghisler(Author) wrote: 2022-08-24, 10:34 UTC Otherwise it works just like without the switch.
You mean like with OnlyOnce=1?
Fla$her
Power Member
Power Member
Posts: 2247
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-24, 06:49 UTC /O does not override the problem that elevated programs cannot receive messages from programs running with normal user rights. This is a Microsoft security measure, and I do not want to bypass it.
Read all my recent messages, please. Otherwise, I got the feeling of a lack of feedback. I explained everything in detail.
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) »

You mean like with OnlyOnce=1?
Yes.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4596
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 »

ghisler(Author) wrote: 2022-08-24, 13:38 UTC
You mean like with OnlyOnce=1?
Yes.
You misunderstood..
Post Reply