TC 11.56 and Everything.

Bug reports will be moved here when the described bug has been fixed

Moderators: Stefan2, Hacker, petermad

cmd4ever
Junior Member
Junior Member
Posts: 94
Joined: 2026-03-27, 12:15 UTC

TC 11.56 and Everything.

Post by *cmd4ever »

I've set everything path and desired instances in wincmd.ini

I typically enable auto-size when I need and then browse the options to disable it once done... But this time I forgot it still on when I closed TC.

I got a big surprise next time I opened TC. TC successfully created a DOS (Denial of Service) attack on my PC by launching an everything instances for every [beep]ing directory and subdirectories in the TABS. Since I have UAC enabled. My PC was took over by a stack of UAC consent popups.

NO FUN. The annoyance was extreme since I was working on a time sensitive matter. I really didn't need that.

(Please eventually include a cm_toggle_autosize I can set to a key as asked in feature request-suggestion. That would make it so much easier to toggle it on and off. Especially when forgetting it off has such a cost.)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53138
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.56 and Everything.

Post by *ghisler(Author) »

Please write step by step instructions how you launched Everything from TC to get a DOS attack - it makes no sense to me.
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 »

ghisler(Author) wrote: 2026-04-17, 07:39 UTC Please write step by step instructions how you launched Everything from TC to get a DOS attack - it makes no sense to me.
Well we are two. Makes no sense to me either.

0) Be ready to force a reboot, because after this 5 step procedure, your PC will be flooded by UAC consent. Look like TC is opening a new Everything instance for every single directory in the tree.

1) Windows 11
2) UAC enabled
3) In everything Options "Everything service" disabled
4) TC/Configuration/Operation Everything checked
5) TC/Configuration/Operation/Automatic (anyone)

While TC is running put one of the tab to C:\ or anywhere with a long and complex directory tree.
Close TC
Open TC

To prevent a reboot, I just left in a dir that has a manageable amount of sub dir.
Check the picture below. Look at the taskbar. All those icons (except one) are UAC consent prompts.
Each asking "Do you want Everything to interact with the computer"

Image: https://i.imgur.com/qNVgh3n.jpeg

TC process spawning Everything instances one for each subdirectory
Image: https://i.imgur.com/3ZJTPpm.jpeg

Works every time. The key step is 3.
If 3) Everything Service is enabled, then TC behave. It uses the running Everything service.
I see that as a workaround.

TC should check if the specified Everything instance is running, launch it if not (ONE UAC prompt is OK) then use that Instance for the following index requests instead of spawning a new process for every single directory.

I like my PC lean and run things on demand. So before I installed TC, Everything was working perfectly fine when I needed it without having the service running in the background all the times.
User avatar
petermad
Power Member
Power Member
Posts: 17375
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC 11.56 and Everything.

Post by *petermad »

2cmd4ever
It looks like you are running 'Everything' as administrator - if you are - try and disable that: https://tcmd.madsenworld.dk/everythingnonadmin.png

Also - which version of 'Everything' are you using?
License #524 1994
Danish TC Translator
TC 11.58rc3 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1415b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
cmd4ever
Junior Member
Junior Member
Posts: 94
Joined: 2026-03-27, 12:15 UTC

Re: TC 11.56 and Everything.

Post by *cmd4ever »

petermad wrote: 2026-04-19, 01:07 UTC 2cmd4ever
It looks like you are running Everything as administrator - if you are - try and disable that: https://tcmd.madsenworld.dk/everythingnonadmin.png
Good point and yes indeed.
If I disable it, it will lose access to all admin only areas.
I can try and see if it creates too many dead spots.

Thanks
User avatar
petermad
Power Member
Power Member
Posts: 17375
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC 11.56 and Everything.

Post by *petermad »

If I disable it, it will lose access to all admin only areas.
That is what you avoid by running Everything as a service...
License #524 1994
Danish TC Translator
TC 11.58rc3 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1415b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
cmd4ever
Junior Member
Junior Member
Posts: 94
Joined: 2026-03-27, 12:15 UTC

Re: TC 11.56 and Everything.

Post by *cmd4ever »

petermad wrote: 2026-04-19, 01:26 UTC
If I disable it, it will lose access to all admin only areas.
That is what you avoid by running Everything as a service...
Agreed!

Still, I don't think it's normal behavior to launch an Everything instance for every single directory.
That's why I mention it in this bug section.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53138
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.56 and Everything.

Post by *ghisler(Author) »

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?
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 »

petermad wrote: 2026-04-19, 01:07 UTC Also - which version of 'Everything' are you using?
Version 1.4.1.1030
cmd4ever
Junior Member
Junior Member
Posts: 94
Joined: 2026-03-27, 12:15 UTC

Re: TC 11.56 and Everything.

Post by *cmd4ever »

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?
Now we are talking, I think we're very close to what is going on.

But it doesn't explain why path C:\ went into an "infinite" loop of UAC consent while
..(near end of the tree)\test only stacked a few UAC consent then stopped. I didn't count the number of Everything processes, I just "assumed" it was the same as a recursive search for subdirectories from that starting path.

You are also bringing something else I do not understand.
"Total Commander couldn't detect when Everything was installed or updated"
But my Everthing was installed years ago, way before TC installation.

The particularity is that I never used the default database. I've created multiple instances for different needs. ie (media search, OS search).

"Any better ideas?"
Don't get me started. I used to make tools that interact with the OS and other apps all the times. Back in the days memory management was like Far Ouest. But my useful programming years are long gone and memory is fading quick. So chances of saying stupid things are high. I have very little confidence on the validity of the following suggestion:

1) have a look at the wincmd.ini file and check for everything path and instance parameter
2) check if the process for this particular instance is running
3) if yes... Use it (API?) to poll information (I don't know the extend of memory and right restrictions here.)
3b) Can you tap directly into that instance database to poll the information or do you have to use an API to question Everything? back in the days, I would tap directly into the indexing database instead of launching the process if not already running, this would spare me to fight with the Everything for access.
4) if not: Launch that specific instance only once. (UAC Prompt) then use it to do your magic.

During the debugging session. Leave traces and make a safe exit with a counter to break the loop if things goes wild. Look at your traces, figure out what is going on. Repeat until success :-P

Goal:
if the Everything instance specified in wincmd.ini is already running (not as a service) then just use it.
if not, launch it once, then use it.

Thanks for reading my crap. As said, I no longer knows what I'm talking about.
Last edited by cmd4ever on 2026-04-19, 18:38 UTC, edited 3 times in total.
User avatar
white
Power Member
Power Member
Posts: 6940
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: TC 11.56 and Everything.

Post by *white »

Moderator message from: white » 2026-04-19, 16:44 UTC

cmd4ever wrote: 2026-04-19, 15:18 UTC
It seems a duplicate post was made in an attempt to add 1 line.
I deleted the old post and kept the post with the extra line, but removed quotation of the entire post
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53138
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.56 and Everything.

Post by *ghisler(Author) »

if the Everything instance specified in wincmd.ini is already running (not as a service) then just use it.
if not, launch it once, then use it.
That's what normally happens, but what if it exists but doesn't respond after launching, as in this case?
I can't just stop trying to launch it because the user may just be updating everything, so it temporarily doesn't respond. That's why I came up with the solution of retrying only in different folders.
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 »

ghisler(Author) wrote: 2026-04-20, 07:50 UTC
if the Everything instance specified in wincmd.ini is already running (not as a service) then just use it.
if not, launch it once, then use it.
That's what normally happens, but what if it exists but doesn't respond after launching, as in this case?
I can't just stop trying to launch it because the user may just be updating everything, so it temporarily doesn't respond. That's why I came up with the solution of retrying only in different folders.
I see, I think we will have to investigate little further (I will probably sink out of my depth real quick.)

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". 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
ghisler(Author)
Site Admin
Site Admin
Posts: 53138
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.56 and Everything.

Post by *ghisler(Author) »

Currently TC just tries so contact everything with the Everything API, it doesn't check whether the EXE is running because Everything may be active as a service and doesn't need the exe running.
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 »

ghisler(Author) wrote: 2026-04-20, 13:44 UTC Currently TC just tries so contact everything with the Everything API, it doesn't check whether the EXE is running because Everything may be active as a service and doesn't need the exe running.
If the service is running, step/condition 3 isn't met.
Post Reply