I think this is a good solution.
Opening a new instance of TC with /O from an application with other rights
Moderators: white, Hacker, petermad, Stefan2
Re: Opening a new instance of TC with /O from an application with other rights
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
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.50 on Android 6 & 13
Try: 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
You mean really any circumstances? No new instance when there wasn't any yet? And also no new instance with OnylOnce=1 and 1 elevated instance running when a new instance would be created without /O)?
(Just asking what your proposal is)
Re: Opening a new instance of TC with /O from an application with other rights
It pleases.
They (there were several) require clarification and improvements. Therefore, additional questions are being asked.
Overquoting is evil! 👎
Re: Opening a new instance of TC with /O from an application with other rights
white,
Roman
I assume that was what was being requested. Fla$her would be the person to answer.You mean really any circumstances?
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.
Re: Opening a new instance of TC with /O from an application with other rights
Didn't I answer? I'll try in more detail:
If TC was started with an elevation and the launch command is executed without an elevation:
1. /O without specifying paths: a new instance should not start.
2. /O is missing, but there is OnlyOnce=-1, paths are specified: the current behavior remains when the second instance is not created.
3. If a new parameter is specified (/E, for example) or an attach to /O (:! :n :no :0, etc.), then a new instance is not created.
4. If /O is specified along with the paths, then a new instance is created, as it is now. This is the author's wish.
1-3. There should be no focus on the window. It is desirable to have a pop-up window (somewhere in the lower right corner of the screen) for 2-3 seconds warning about the reason for the start ban.
Overquoting is evil! 👎
Re: Opening a new instance of TC with /O from an application with other rights
Fla$her,
I am not sure if I understand correctly, but from what you write I assume the answer is yes, then.
Roman
I am not sure if I understand correctly, but from what you write I assume the answer is yes, then.
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.
Re: Opening a new instance of TC with /O from an application with other rights
2Hacker
I don't understand what you mean by yes. I'm writing how I see it as a result of the discussion. And how the author sees it, I have no idea, because he does not answer my questions.
I don't understand what you mean by yes. I'm writing how I see it as a result of the discussion. And how the author sees it, I have no idea, because he does not answer my questions.
Overquoting is evil! 👎
Re: Opening a new instance of TC with /O from an application with other rights
Fla$her,
Well, white asked a question, I said you would be the correct person to answer yes or no. You answered in a lengthy four-point answer, from which I tried to understand that the answer to white's question is yes. Perhaps you simply missed white's question?
Roman
Well, white asked a question, I said you would be the correct person to answer yes or no. You answered in a lengthy four-point answer, from which I tried to understand that the answer to white's question is yes. Perhaps you simply missed white's question?
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.
Re: Opening a new instance of TC with /O from an application with other rights
2Hacker
I didn't understand the meaning of his questions well, especially in the context of your. In my opinion, he was asking about something of his own that he had discussed earlier. It will be easier for the author to guided by my points, IMHO.
I didn't understand the meaning of his questions well, especially in the context of your. In my opinion, he was asking about something of his own that he had discussed earlier. It will be easier for the author to guided by my points, IMHO.
Overquoting is evil! 👎
Re: Opening a new instance of TC with /O from an application with other rights
I wanted to show what the purpose of the parameter is, which is relevant now.
The introduction of the UAC didn't cause the problem you describe in your first post. The option OnlyOnce=1 was introduced very early on in the development of TC (then Windows Commander). It allowed only one running copy at the time. That behavior didn't change with the arrival of administrator accounts and normal accounts and the ability to run programs as a different user. If you had set OnlyOnce to 1 and had TC running elevated (before UAC that was every program run by an administrator) and would then run TC as a normal user passing paths as parameters. Tough luck, the paths couldn't be passed to the running TC and no new instance was created. The same when you had set OnlyOnce to 0 (or 1) and used parameter /O.
The situation remained the same with the arrival of UAC. UAC only made it harder to run programs elevated.
Then came TC 7.55 which introduced the behavior we see today. The default became to create an extra instance in the scenarios described above. If you have set OnlyOnce to 1 and have TC running elevated, running TC non-elevated creates a new non-elevated instance of TC. Likewise if you set OnlyOnce to 0 and run TC non-elevated with the /O switch. Regardless of any parameters.
If you want the old behavior you can set OnlyOnce to -1. Except that that doesn't work for the /O switch, which is the problem you reported.
All of this is not very well described in the Help. The Help about /O remained the same since it was added with Windows Commander 3.50. Only this was added to the Help about OnlyOnce to describe all of this:
First of all, it is good to understand that "on this/that computer" is poorly chosen. Replace that with "in the current logon session".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)
x>0: Same as 1, but multiple allowed per user
x<0: Same as -1, but multiple allowed on that computer (all users together)
Also, the word "user" has been very poorly chosen to indicate "user account type" (Administrator or Standard). And actually should be described in terms of elevated/non-elevated. It never meant user.
Furthermore, it doesn't explain that only when you run TC non-elevated and a previous instance would be activated and that previous instance is elevated, and only if all already running instances are elevated, that a new instance can be created.
Example:
- Set OnlyOnce to 2.
- Run TC non-elevated.
- Run another instance of TC, this time elevated (this is now the last active one).
- Run another TC with parameter /O.
If you do these steps again, but replace step 2 with running TC elevated, then a new instance will be created.
It is also not explained that, if for example OnlyOnce is set to 3, the maximum number of instances is 3 to 6 depending on circumstances.
If you start 3 elevated instances first, you can add 3 non-elevated instances. (max 6)
But if you start 3 non-elevated instances first, you can add zero non-elevated instances. (max 3, non-elevated instance is activated instead)
When OnlyOnce is set to -3, then the maximum number of instances is 3 to 4.
A fourth instance is only possible when running 3 elevated instances and then running TC non-elevated with parameter /O. You know, because of the /O thing you talk about in the first post of this thread.
Of course not. I think it is probably an unintentional side effect which you now approve of. I just don't agree with your reasoning and I am passionate in making my argument. That's all.ghisler(Author) wrote: ↑2022-08-26, 07:03 UTC white words it as if I changed this deliberately to piss off people, but that isn't my intention.
/O is meant to activate the previous instance that was last active. That's how the program works. That's how it is described by you in command line syntax, help text and texts in history files.ghisler(Author) wrote: ↑2022-08-26, 07:03 UTC 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.
Re: Opening a new instance of TC with /O from an application with other rights
2white
I agree that more details are needed in the help.
But instead of cluttering up the topic with our thoughts, let's get at least some positive result from the author, otherwise two RC versions have been released, and there are still no additives.
2ghisler(Author)
Please do something already! You can call it premeditated behavior, but this behavior creates big problems. Please correct them. For me, this is perceived exactly as a bug, regardless of what goal you were pursuing (we just found out about it now).
I agree that more details are needed in the help.
But instead of cluttering up the topic with our thoughts, let's get at least some positive result from the author, otherwise two RC versions have been released, and there are still no additives.
2ghisler(Author)
Please do something already! You can call it premeditated behavior, but this behavior creates big problems. Please correct them. For me, this is perceived exactly as a bug, regardless of what goal you were pursuing (we just found out about it now).
Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 48196
- 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, TC versions are meant for bugfixes only, no new functions.
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
*RC versionsghisler(Author) wrote:TC versions
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.
Re: Opening a new instance of TC with /O from an application with other rights
OK. Start by disallow a new instance with /O without paths. This is definitely a bug.ghisler(Author) wrote: ↑2022-08-31, 07:04 UTC Sorry, RC versions are meant for bugfixes only, no new functions.
Overquoting is evil! 👎
Re: Opening a new instance of TC with /O from an application with other rights
ghisler(Author) wrote: ↑2022-08-25, 09:10 UTC A new parameter would be the best solution for this case.
Thanks! Immediately added to the settings.ghisler(Author) wrote:TC 10.52 RC1: Command line parameters: option /O now supports a parameter, e.g. /O0 to never open a new instance in any case
Letter с is omitted:
Command line parameters wrote:number Same as value of OnlyOnсe= in wincmd.ini (positive or negative value)
Overquoting is evil! 👎