[Solved] Start everything from cmd without window and tray icon

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
silverqx
Posts: 7
Joined: Wed Nov 20, 2019 9:49 am

[Solved] Start everything from cmd without window and tray icon

Post by silverqx »

Hi,

first, let me thank you for the amazing tool, I'm using it years.

I need to start everything without installing service, without window and without tray icon and after that, I will use it through es.exe cli.
After few hours in documentation I get this command:

Code: Select all

Everything.exe -admin -close -config Everything.ini
I need to pass -config Everything.ini, because I didn't find any cli parameter to disable the tray icon, so I have to use this Everything.ini file, where show_tray_icon=0 option is already defined.

After I'm done I call Everything.exe -exit.

The idea is to run Everything as needed and then exit, I will run these commands from cmd.exe scripts.

So the whole flow will look like this:

Code: Select all

Everything.exe -admin -close -config Everything.ini
es.exe *.mkv
Everything.exe -exit
I have two questions:
  • Is there a better way how to start Everything in this way or is my command relatively ok :)?
  • After I start everything the first time, how long should I wait before calling e.g. es.exe *.mkv, is index immediately ready or if I call es.exe too early I can get only partial results?

    Thank you for your advice and suggestions.
Last edited by silverqx on Wed Nov 20, 2019 6:38 pm, edited 1 time in total.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Start everything from cmd without window and tray icon

Post by NotNull »

Why without the service? It doesn't do anything when the Everything client is not active and uses hardly any RAM.
And that way you don't have to handle the UAC prompt.


Anyway, if you still want to run as administrator ...
silverqx wrote: Wed Nov 20, 2019 10:27 am
  • Is there a better way how to start Everything in this way or is my command relatively ok :)?
  • After I start everything the first time, how long should I wait before calling e.g. es.exe *.mkv, is index immediately ready or if I call es.exe too early I can get only partial results?
This is how I would do it (starting fresh):
  • Start Everything.exe -admin
  • Disable Run in background (Menu:Tools > Options >UI)
  • Disable Shaow tray icon (Menu:Tools > Options >UI)
  • Configure "normal" settings
  • Exit Everything (Menu:File > Exit)
  • Run this script (not tested):

    Code: Select all

    "c:\path to\Everything.exe" -admin -startup
    start /wait "" "c:\path to\Everything.exe" -update
    "c:\path to\ES.exe"  *.mkv
    "c:\path to\Everything.exe" -admin -quit
    
    (maybe the everything.exe -admin -quit can do without the -admin)
    For some background, see this thread.
silverqx
Posts: 7
Joined: Wed Nov 20, 2019 9:49 am

Re: Start everything from cmd without window and tray icon

Post by silverqx »

NotNull wrote: Wed Nov 20, 2019 4:53 pm Why without the service? It doesn't do anything when the Everything client is not active and uses hardly any RAM.
And that way you don't have to handle the UAC prompt.
Thank you NotNull, this answered all my questions 👍

By the way, the service is good solution too, maybe I use it, but I meant to use it like a one-time search only and from the script, so Everything.exe -install-service at beginning and Everything.exe -uninstall-service at the end of script doesn't look so clean and there is a chance, that during Everything.exe -uninstall-service will be opened some handle or something and in edge cases, a restart might be required.
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Start everything from cmd without window and tray icon

Post by horst.epp »

silverqx wrote: Wed Nov 20, 2019 6:37 pm
NotNull wrote: Wed Nov 20, 2019 4:53 pm Why without the service? It doesn't do anything when the Everything client is not active and uses hardly any RAM.
And that way you don't have to handle the UAC prompt.
Thank you NotNull, this answered all my questions 👍

By the way, the service is good solution too, maybe I use it, but I meant to use it like a one-time search only and from the script, so Everything.exe -install-service at beginning and Everything.exe -uninstall-service at the end of script doesn't look so clean and there is a chance, that during Everything.exe -uninstall-service will be opened some handle or something and in edge cases, a restart might be required.
No one installs the service only for one session.
A service is installed and runs all the time without any need for shut-down.
Thats the purpose of every service in Windows, not only Everything.
silverqx
Posts: 7
Joined: Wed Nov 20, 2019 9:49 am

Re: Start everything from cmd without window and tray icon

Post by silverqx »

horst.epp wrote: Wed Nov 20, 2019 6:53 pm No one installs the service only for one session.
That is true, because of that I want to avoid service in this situation, -admin -startup flags are ideal for this case.
Post Reply