UseEverythingInstance and Everything options [SOLVED]

Here you can propose new features, make suggestions etc.

Moderators: petermad, Stefan2, white, Hacker

User avatar
AntonyD
Power Member
Power Member
Posts: 2142
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: TC 11.56 and Everything.

Post by *AntonyD »

2ghisler(Author)
Because I want to give the user full control over the entire parameters.
And how does my misunderstanding differ from this control? I also agree to provide it.
It's just that it would be quite logical to provide the logic of these changes along with it.
HOW then, according to your logic, should these parameters interact?
I can start the process with help of INI param:
"Everything=path-to-everything\everything.exe -instance A -startup"
But with the help of another parameter UseEverythingInstance, will I require searching and interacting
with another TC instance? PERHAPS someone started it once? Is that logical? It's a full control of what?
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52921
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.56 and Everything.

Post by *ghisler(Author) »

I just don't see any benefit in modifying the Everything= command when the user can set the parameters as they like. And it works the way it is now, so I won't change it. Btw, this has diverged a lot from the original bug report of this thread...
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 2142
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: TC 11.56 and Everything.

Post by *AntonyD »

And it works the way it is now
You still couldn't describe HOW it works today. Which parameter is responsible for what and how they interact
when both are present in the INI-parameters. Then describe the algorithm, briefly.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52921
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.56 and Everything.

Post by *ghisler(Author) »

Well, the two parameters UseEverythingInstance= and Everything= are responsible for two different things:
UseEverythingInstance=<instance name> tells Total Commander to interact with a named instance of Everything, which may already be running, e.g. the user may have started it this way.
Everything= on the other hand tells TC to start Everything with the user-provided parameters when the user tries to use Everything but it cannot be contacted.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 2142
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: TC 11.56 and Everything.

Post by *AntonyD »

So if the UseEverythingInstance parameter IS SET, it is clearly obvious that the user expects work ONLY with this instance!
That means that the LAUNCH - if it turns out that the process has to be started manually - MUST be carried out taking this
parameter into account!
Because it ADDs an amplifying influence on the user's decision about HOW the Total-Everything bundle should work.
Everything= can't works W/O using the UseEverythingInstance= !

In the theory of working with the utility Everything - it is the instances that are the main object of choice - for what purpose and how this product can be used. That's why we had to add this value (UseEverythingInstance) to Total somehow - JUST to be able to access the necessary instance from it! And now when we talk about restarting/primary start of the utility it suddenly turns out that the start will be performed WITHOUT taking into account the data from UseEverythingInstance ?
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52921
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.56 and Everything.

Post by *ghisler(Author) »

Sorry, I just don't want to modify the command line the user has provided.
Author of Total Commander
https://www.ghisler.com
cmd4ever
Junior Member
Junior Member
Posts: 94
Joined: 2026-03-27, 12:15 UTC

Re: TC 11.56 and Everything.

Post by *cmd4ever »

AntonyD wrote: 2026-04-27, 16:46 UTC So if the UseEverythingInstance parameter IS SET, it is clearly obvious that the user expects work ONLY with this instance!
That means that the LAUNCH - if it turns out that the process has to be started manually - MUST be carried out taking this
parameter into account!

Because it ADDs an amplifying influence on the user's decision about HOW the Total-Everything bundle should work.
Everything= can't works W/O using the UseEverythingInstance= !

In the theory of working with the utility Everything - it is the instances that are the main object of choice - for what purpose and how this product can be used. That's why we had to add this value (UseEverythingInstance) to Total somehow - JUST to be able to access the necessary instance from it! And now when we talk about restarting/primary start of the utility it suddenly turns out that the start will be performed WITHOUT taking into account the data from UseEverythingInstance ?
^THIS! Thank you!

The initial bug: UAC flood
The collateral: How TC launches the Everything process and deal with the user designated instance.

That is why I recommended to
1) Poll processes to spot if any Everything.exe is running with the -instance UseEverythingInstance
2) if yes, just use it. (this seems to work with 11.57RC5 and Everything 1.4.1)
3) if not, that is where things are currently derailing. But the solution is simple, just launch Everything.exe with -instance UseEverythingInstance
ghisler(Author) wrote: 2026-04-19, 09:24 UTC Thanks, I can reproduce that now with Everything 1.4x, but not with the Alpha version 1.5x.

Currently Total Commander launches Everything.exe with CreateProcess, which returns immediately. Then it waits a moment for Everything to start, and then tries again to use it. It does this for every subdirectory in the queue. If I only try it once, then Total Commander couldn't detect when Everything was installed or updated, only a restart of Total Commander would help.

As a workaround, I will remember in which parent directories (separately for left and right side) Everything was launched, so you will get a maximum of 2 UAC prompts when launching Total Commander, and one more each time you change directories.

Any better ideas?
cmd4ever wrote: 2026-04-20, 13:20 UTC
First we need to establish the state of the Everything instance dedicated to TC.
ie Question every Everything processes until we have a match with wincmd.ini ie both path and instance.
If no match, then you know it isn't running.

Option 1: Use WMI (simplest)
You can query:
Class: Win32_Process
Filter: Name = "Everything.exe"
Then check ProcessId and CommandLine

Option 2: Use native Windows API (more control)
Enumerate processes (CreateToolhelp32Snapshot or EnumProcesses)
Open each process (OpenProcess)
Query command line via:
QueryFullProcessImageName (path only)
Or deeper: NtQueryInformationProcess → read PEB → extract command line

Since I don't know how TC interacts with Everything. I don't know what's next.
What I know is that the UAC prompt is not exposed. So TC can't see it directly. But you can deduct what is going on.

Once you know the Everyting TC instance isn't running. You launch it with "runas" instead for CreateProcess. If Handle: success → process started or ERROR_CANCELLED → user refused then notify user accordingly.

Safety net: Count the number of Everything.exe processes launched with the TC specific instance. ABORT if it grows to an abnormal point :-)
User avatar
AntonyD
Power Member
Power Member
Posts: 2142
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: TC 11.56 and Everything.

Post by *AntonyD »

ghisler(Author) wrote: 2026-04-27, 17:06 UTC Sorry, I just don't want to modify the command line the user has provided.
You do realize that you are providing the user with a mechanism for INTERACTING with a third-party utility, right?
You are saying directly that there is a parameter to start - and if you need to specify which of the running processes
you want - here is another parameter.
So you have NO need to influence the user's decision in any way. HE HAS given you the pointers to what he wants.
You just specify both in the help and in the code that both parameters will be used.
And exactly in conjunction - because ONE parameter without the other is a total lack of logic.

So you don't modify this cmd.line - you use to the full the BOTH parameters that the user provided you with!!!

And if we talk about logic - in your answer to HOW the current code works, you completely missed the moment - when both parameters are set.
From the brief explanation it is not clear at all - WHAT and HOW and at WHICH moment Total is trying to do - when both parameters have values.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52921
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.56 and Everything.

Post by *ghisler(Author) »

It's just so pointless to change something now which works perfectly fine while there are real problems with launching Everything discussed in this thread which need more urgent fixing...
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 2142
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: TC 11.56 and Everything.

Post by *AntonyD »

So you don't see the root of the problem described by the topic starter in what - HOW you use env.vars and interact with the utility through them? Well, okay - then there are no more questions or suggestions))))
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52921
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.56 and Everything.

Post by *ghisler(Author) »

Sorry, I can't find any post where the thread starter writes about environment variables - can you post the URL, please? The user posted about problems launching "Everything" when it was set to run as administrator.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 2142
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: TC 11.56 and Everything.

Post by *AntonyD »

2 discussed parameters from Totals' INI - that's what I called in my last post env.vars. Sorry if it was not so easily understandable.

P.S.
You see, it's just one phrase that's accidentally inserted in the wrong place, and you can't figure out what it's all about.
The same thing happens with HOW you decide to use these two parameters, although it seems to be absolutely clear
that they COMPLEMENT each other. But you use them somehow separately and without any logic.
Everything= - is the BASIS!
UseEverythingInstance= - is a complimentary addition to it!
#146217 personal license
User avatar
tuska
Power Member
Power Member
Posts: 4391
Joined: 2007-05-21, 12:17 UTC

Re: TC 11.56 and Everything.

Post by *tuska »

Since there have been strong calls here for a new approach regarding 'UseEverythingInstance=',
I would like to share my opinion on this below.

Code: Select all

UseEverythingInstance=somename
For me, 'UseEverythingInstance=' has always been necessary only to establish a connection from TC to EV 1.5a.
wincmd.ini [Configuration] UseEverythingInstance=1.5a

Note:
- This 1.5a instance will be removed when Everything 1.5 is ready for beta/release.
- Since Everything has also made the configuration parameter: NO_ALPHA_INSTANCE (file without an extension)
  available for the same purpose, UseEverythingInstance= is no longer strictly necessary.

Example:
UseEverythingInstance=PRIVATE

This parameter isn't strictly necessary to launch a specific Everything instance,
not even in Everything 1.5, which is why I haven't used it in a long time.

I use a main instance (which starts automatically) and sub-instances for special cases (currently launched manually)
where the sub-instances are currently launched via buttons in Total Commander and have different icon colors.
This means that any Everything instance can be manually started with a single click.
In the current EV 1.5 version, there is only one Everything service named "Everything."

Code: Select all

Everything=
This optional setting in wincmd.ini is suitable if 'Everything'
- is only occasionally started manually and NOT automatically with Windows
- Program files, e.g. Everything64.exe respectively Everything.exe, etc. were NOT stored in %COMMANDER_PATH%

This parameter causes Everything to launch automatically in the background when a search query is started in TC.
This prevents the user from seeing the message "... 'Everything isn't installed!' ...".

For me, the main instance ALWAYS starts automatically with Windows (in theory, I wouldn't need this parameter)
(main instance == my desired Everything instance == "UseEverythingInstance=" without requiring an entry in wincmd.ini!).

I also don't consider it too much to ask if, for a desired instance <> main instance, the following parameters must be specified:
The instance name once and the path to that instance [with additional Everything parameters] once.


My conclusion:
The TC parameter: UseEverythingInstance= is not required ...
a) if you use the main instance for this purpose (your desired instance)
b) if you start the desired instance using a [colored] button when needed
c) if you start Everything along with Windows (this may require sufficient RAM [if multiple instances are running]...)

It's interesting that this issue is causing such a stir now, since it was actually introduced back in 2016.

HISTORY.TXT
28.06.16 Added: wincmd.ini [Configuration] Everything=Everything.exe set location of everything to run when it's not running,
                         and TC checks "Everything" checkbox (32/64)
27.11.16 Added: Everything: Support named instances (Everything.exe -instance "somename"): wincmd.ini [Configuration]
                         UseEverythingInstance=somename (32/64)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52921
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.56 and Everything.

Post by *ghisler(Author) »

For me, 'UseEverythingInstance=' has always been necessary only to establish a connection from TC to EV 1.5a.
wincmd.ini [Configuration] UseEverythingInstance=1.5a
Ah, yes, that was the main reason for introducing UseEverythingInstance - and when using UseEverythingInstance=1.5a, Everything.exe 1.5 doesn't need to be started with parameter -instance 1.5a!
Author of Total Commander
https://www.ghisler.com
cmd4ever
Junior Member
Junior Member
Posts: 94
Joined: 2026-03-27, 12:15 UTC

Re: TC 11.56 and Everything.

Post by *cmd4ever »

2all

Back to bases please

Everything= Tells where everything.exe IS
-Why do I get an Everything is not installed when a simple isFileExist() would confirm the presence of the file.
-It can also tells what parameters to use when TC Launch it... ok I can live with that. But if people use -instance there. They are looking for trouble. TC should always use UseEverythingInstance= for proper TC-Everything calls.

UseEverythingInstance=
Specified which Instance TC is supposed to use. That is mandatory for me since there is no such thing as "main" instances in my setup.

Let me tell you why UseEverythingInstance= is a better option than adding - instance in Everything=
1) Because TC can lookup what Everything instances are already running and make sure it uses the one specified by the user.
2) If Everything -instance UseEverythingInstance is not running then TC can use UseEverythingInstance to launch the desired instance.

Once again That is where both 11.56 and 11.57 fails to do it properly.
Post Reply