Opening a new instance of TC with /O from an application with other rights
Moderators: Hacker, petermad, Stefan2, white
Re: Opening a new instance of TC with /O from an application with other rights
2ghisler(Author)
Explain why you refuse to address this issue as proposed? Unclaimed calling a new instance is a significant problem. It cannot be ignored.
Explain why you refuse to address this issue as proposed? Unclaimed calling a new instance is a significant problem. It cannot be ignored.
Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 50386
- 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
Sorry, I will not allow to send messages from a program with normal rights to TC running with higher rights. I have already described how you can do this (launch the instance with the /O parameter also with higher rights).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Opening a new instance of TC with /O from an application with other rights
2ghisler(Author)
I wrote an alternative option. Now we are talking about this:
I wrote an alternative option. Now we are talking about this:
Fla$her wrote: 2022-08-14, 07:53 UTCAs 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.
Please read my answer in full. The program is not to blame that Windows, after installing the autorun option, executes it without elevation. But your program is to blame for ignoring the ini key and /O parameter. Allow the user to determine whether it is profitable for him to run a second instance or not. Otherwise, ignoring this, you violating the given functionality and compatibility, causing conflicts between modules and resident programs that should not be duplicated.ghisler(Author) wrote: 2022-08-21, 08:02 UTClaunch the instance with the /O parameter also with higher rights.
Overquoting is evil! 👎
Re: Opening a new instance of TC with /O from an application with other rights
2ghisler(Author)
You still haven't answered my question about what OnlyOnce=-1 is supposed to do. The answer might be relevant to the topic being discussed. If OnlyOnce=-1 is supposed to work for all users of a computer, then it should do exactly that. If I understand Fla$her correctly, it doesn't currently. Maybe the TC help needs to describe more accurately what is supported and what is not supported.
Regards
Dalai
You still haven't answered my question about what OnlyOnce=-1 is supposed to do. The answer might be relevant to the topic being discussed. If OnlyOnce=-1 is supposed to work for all users of a computer, then it should do exactly that. If I understand Fla$her correctly, it doesn't currently. Maybe the TC help needs to describe more accurately what is supported and what is not supported.
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 50386
- 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
OnlyOnce=1:
When an elevated copy of TC is already running, you can also run another, non-elevated copy. Otherwise you can't open a new copy.
So if you need both an elevated and normal copy, run the elevated copy first. Unfortunately it's not possible to do the reverse (run the normal copy first).
OnlyOnce=-1:
You can't open a second copy of TC, neither elevated or not, if one copy is already running (elevated or not).
When an elevated copy of TC is already running, you can also run another, non-elevated copy. Otherwise you can't open a new copy.
So if you need both an elevated and normal copy, run the elevated copy first. Unfortunately it's not possible to do the reverse (run the normal copy first).
OnlyOnce=-1:
You can't open a second copy of TC, neither elevated or not, if one copy is already running (elevated or not).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Opening a new instance of TC with /O from an application with other rights
I started with the fact that this is not the case. The second copy starts anyway. But for some reason you ignored it.ghisler(Author) wrote: 2022-08-22, 07:25 UTCOnlyOnce=-1:
You can't open a second copy of TC, neither elevated or not, if one copy is already running (elevated or not).
Return the topic back to the desired subforum, please.
Overquoting is evil! 👎
Re: Opening a new instance of TC with /O from an application with other rights
OK, so OnlyOnce=-1 is supposed to work the way it's described in TC help, and also how I understood it. But according to Fla$her's findings TC does not behave this way. I haven't tested it myself, but on the asumption the findings are accurate, I consider the current TC behavior a bug.
Regards
Dalai
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Opening a new instance of TC with /O from an application with other rights
Confirmed. The /O parameter causes it.Dalai wrote: 2022-08-22, 17:28 UTC OK, so OnlyOnce=-1 is supposed to work the way it's described in TC help, and also how I understood it. But according to Fla$her's findings TC does not behave this way.
- Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini
- Close TC
- Edit "C:\Test\tc.ini" to include the entry "OnlyOnce=-1"
- Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini (Ctrl+Shift+Enter)
- Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini /O (Enter)
Edit:
I used Windows Run to run TC
Last edited by white on 2022-08-23, 08:54 UTC, edited 1 time in total.
Reason: Added: I used Windows Run to run TC
Reason: Added: I used Windows Run to run TC
Re: Opening a new instance of TC with /O from an application with other rights
Moderator message from: white » 2022-08-22, 18:40 UTC
Moved to Bugs forum.
Re: Opening a new instance of TC with /O from an application with other rights
But isn't that in accordance with the Help file:Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini (Ctrl+Shift+Enter)
Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini /O (Enter)
Second instance is opened.
the only difference between 1 and -1 is that -1 applies to all users - it does not say anything about /O not overriding the setting when -1 is used in stead of 1.Help wrote:Command line parameters
/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)
Ini File Settings part 2: Configuration N-Z
Onlyonce=0 1: Start only one instance of Total Commander per user (e.g. started via RunAs)
-1: Start only one instance of Total Commander on this computer (for all users)
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Opening a new instance of TC with /O from an application with other rights
2petermad
overrides = cancels = regardless of
Сan be refine:
overrides = cancels = regardless of
Сan be refine:
So it shouldn't be a setting that does the opposite.If Total Commander is already running, this parameter activates it and passes the path(s) from the command line to this copy of the program (regardless of the configuration dialog setting that allows to open multiple Total Commander windows).
Last edited by Fla$her on 2022-08-22, 21:15 UTC, edited 1 time in total.
Overquoting is evil! 👎
Re: Opening a new instance of TC with /O from an application with other rights
It says it overrides when the setting is 0 (to have multiple windows).petermad wrote: 2022-08-22, 20:45 UTC the only difference between 1 and -1 is that -1 applies to all users - it does not say anything about /O not overriding the setting when -1 is used in stead of 1.
Re: Opening a new instance of TC with /O from an application with other rights
Hmm, I read the sentence "overrides the settings in the configuration dialog to have multiple windows)" that it overrides any of the two settings (notice settings is plural): on or off.
But anyvay I tried this:
It is not clear if:
Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini (Ctrl+Shift+Enter)
Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini /O (Enter)
means whether I should run the them from TC's command line, or run thme from Windows' Run - so I tried both bot never got a second instance.
It is not clear either whether I should start TC with "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini and then perform
Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini (Ctrl+Shift+Enter)
Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini /O (Enter)
but I tried this too without getting a second instance.
But anyvay I tried this:
And I never got a second instance with OnlyOnce=-1 in tc.iniSecond instance is opened.
- Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini
- Close TC
- Edit "C:\Test\tc.ini" to include the entry "OnlyOnce=-1"
- Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini (Ctrl+Shift+Enter)
- Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini /O (Enter)
It is not clear if:
Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini (Ctrl+Shift+Enter)
Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini /O (Enter)
means whether I should run the them from TC's command line, or run thme from Windows' Run - so I tried both bot never got a second instance.
It is not clear either whether I should start TC with "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini and then perform
Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini (Ctrl+Shift+Enter)
Run: "C:\Test\TOTALCMD64.EXE" /i=.\tc.ini /F=.\tcftp.ini /O (Enter)
but I tried this too without getting a second instance.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Opening a new instance of TC with /O from an application with other rights
2petermad
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
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
Overquoting is evil! 👎
Re: Opening a new instance of TC with /O from an application with other rights
If you can't start a second instance of TC when running it without parameters, then it definitely shouldn't when you add the /O parameter.