Unable to [easily] taskkill service name "Everything (1.5a)" issue [SOLVED]

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Thy Grand Voidinesss
Posts: 652
Joined: Wed Jun 01, 2022 5:01 pm

Unable to [easily] taskkill service name "Everything (1.5a)" issue [SOLVED]

Post by Thy Grand Voidinesss »

When I run my Everything in a non-elevated mode but with

Tools > Options > General > Everything Service

selected, my Task Manager reports not 1 but 2
Everything.exe

files running - of which one is for Service of Windows named Everything while the other is for that described as Everything (1.5a)


The issue I have with this dichotomy is this: a BAT file like this

Code: Select all

@echo off

taskkill /IM Everything.exe

timeout /t 1 >nul

taskkill /IM Everything.exe /T /F
is unable to close the Everything (1.5a) Service despite using the
/T
which is described in help of taskkill command as
Terminates the specified process and any child processes which were started by it
And that is, I reckon, because Everything (1.5a) runs itself with privileges - as a simple trick of executing this BAT As Administrator makes it close that Everything (1.5a) elevated Service, even if the whole script is dumbed down to just

Code: Select all

taskkill /IM Everything.exe /F


So my questions would be:

A] Why does Everything Service start itself with privileges despite

Tools > Options > General > Run as administrator

being deselected; along with other methods for making the EXE being run As Administrator not utilized [i.e. why does this sub-process ignore elevation level of the parent EXE]?

B] Why not put / enclose the Everything Service in its own EXE file?

C] Is it possible to rewrite this BAT to make it close the Everything]Service - without making some workaround, most likely of running this BAT As Administrator? [I already do know how to do it but I just do no like to have external measures applied to running anything as future changes / adjustment will have to possibly affect also those additions]



I am using Everything 1.5.0.1346a x64 Portable on Windows 10 Enterprise 20H2
Last edited by Thy Grand Voidinesss on Sun May 12, 2024 11:15 am, edited 4 times in total.
void
Developer
Posts: 15523
Joined: Fri Oct 16, 2009 11:31 pm

Re: Unable to [easily] taskkill service name "Everything (1.5a)" issue

Post by void »

There's two Everything.exe processes when running the Everything Service.

One for the Search UI
One for the Everything Service.



Please try adding the following to the start of your BAT file

net stop "everything (1.5a)"


A] Why does Everything Service start itself with privileges despite
Most services will run as SYSTEM.
The Everything Service runs as SYSTEM.

You can change the user account used to run the service.
However, I recommend leaving this as SYSTEM.



The OS will run the Everything service as SYSTEM.


B] Why not put / enclose the Everything Service in its own EXE file?
Portability.
There's only one exe file required to run Everything and the Everything Service.

Feel free to copy Everything.exe to EverythingService.exe
Exit Everything (File -> Exit)
Launch EverythingService.exe
Re-check Tools -> Options -> General -> Everything Service (please make sure it is tick-checked)
Click OK and restart Everything. (File -> Exit)
Thy Grand Voidinesss
Posts: 652
Joined: Wed Jun 01, 2022 5:01 pm

Re: Unable to [easily] taskkill service name "Everything (1.5a)" issue

Post by Thy Grand Voidinesss »

void wrote: Thu May 25, 2023 12:03 am [...]
Please try adding the following to the start of your BAT file

net stop "everything (1.5a)"
This works A-OK

void wrote: Thu May 25, 2023 12:03 am You can change the user account used to run the service.
[...]
Feel free to copy Everything.exe to EverythingService.exe
[...]
As I prefer to run things
Thy Grand Voidinesss wrote: Wed May 24, 2023 9:52 pm [...]
without making some workaround
[...]
as future changes / adjustment will have to possibly affect also those additions
[...]
thus I will stick to that first swift solution. [Although I will have to remember to update this BAT once the name of Service changes; like to, I reckon, Everything (2.x)]

Problem solved


Thank you for your help
Thy Grand Voidinesss
Posts: 652
Joined: Wed Jun 01, 2022 5:01 pm

Re: Unable to [easily] taskkill service name "Everything (1.5a)" issue

Post by Thy Grand Voidinesss »

Thy Grand Voidinesss wrote: Thu May 25, 2023 6:52 am
void wrote: Thu May 25, 2023 12:03 am [...]
Please try adding the following to the start of your BAT file

net stop "everything (1.5a)"
This works A-OK
[...]
But it seems that it has stopped working: viewtopic.php?p=66997#p66997


I am using now Everything 1.5.0.1372a x64 Portable but still on the same old Windows 10 Enterprise 20H2 x64 [10.0.19042]. Should I just run that BAT file of mine in elevated mode, as it seems to take care of the problem? Or can I just somehow adjust that

Code: Select all

net stop "Everything (1.5a)"
part of it?
Thy Grand Voidinesss
Posts: 652
Joined: Wed Jun 01, 2022 5:01 pm

Re: Unable to [easily] taskkill service name "Everything (1.5a)" issue

Post by Thy Grand Voidinesss »

As it turns out I completely forgotten that I had installed for test purposes the 1.4.1.1022 x64 version

And so it was

C:\Program Files\Everything.exe

that was [correctly] not being closed [as there was no instruction for killing of its task]


Case closed
Post Reply