Page 3 of 7

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

Posted: 2022-08-23, 08:52 UTC
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?

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

Posted: 2022-08-23, 09:55 UTC
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.

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

Posted: 2022-08-23, 10:39 UTC
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.

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

Posted: 2022-08-23, 13:51 UTC
by Fla$her
2petermad
Thanks for another bug confirmation. ) Let's wait for the author.

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

Posted: 2022-08-24, 06:49 UTC
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.

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

Posted: 2022-08-24, 09:09 UTC
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.

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

Posted: 2022-08-24, 09:44 UTC
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.

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

Posted: 2022-08-24, 09:54 UTC
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.

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

Posted: 2022-08-24, 10:04 UTC
by ghisler(Author)
/O just overrides the OnlyOnce option. I don't understand what else you want to know.

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

Posted: 2022-08-24, 10:23 UTC
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?

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

Posted: 2022-08-24, 10:34 UTC
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.

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

Posted: 2022-08-24, 11:03 UTC
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?

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

Posted: 2022-08-24, 11:41 UTC
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.

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

Posted: 2022-08-24, 13:38 UTC
by ghisler(Author)
You mean like with OnlyOnce=1?
Yes.

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

Posted: 2022-08-24, 14:53 UTC
by white
ghisler(Author) wrote: 2022-08-24, 13:38 UTC
You mean like with OnlyOnce=1?
Yes.
You misunderstood..