Not exiting all windows

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Not exiting all windows

Post by harryray2 »

If I start Everything normally and also start another window (or several windows) , from the context menu to search a directory, when I exit Everything, only one set of windows exits leaving the other window (or windows) open

I've also noticed in the system tray that there are two Everything icons.

Is this intentional?

Sometimes this behaviour is an advantage and sometimes not...
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Not exiting all windows

Post by raccoon »

You previously installed multiple copies of Everything. One of those copies is registered with Explorer contexts, which is a different copy from the one that you run normally.

I would advise against installing so many copies of Everything unless you are performing specific software testing. (They can be hard to keep track of.)
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

This is happening when I just run one instance...It doesn't appear to happen when I run my main Everything.

My main Everything and both instances are all registered with explorer contexts.

Do instances have different behaviour?
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Not exiting all windows

Post by raccoon »

harryray2 wrote: Sat Oct 30, 2021 1:07 am... from the context menu to search a directory
Do you see more than one "Search Everything..." in the Windows Explorer right-click folder context menu?

The one you see is associated to a singular installation of Everything, and it is that installation of Everything that will be launched.

Your other installation(s) of Everything are not connected to each other, so, when you exit one, the other(s) will remain open until you exit them too.

I would advise against installing so many copies of Everything that you can no longer keep track of them all.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

I'm not running several installations at the same time..I'm only running one instance when this happens. This is happening within a single instance.

This only happens when running an instance...not when I'm running my original installation.
void
Developer
Posts: 17138
Joined: Fri Oct 16, 2009 11:31 pm

Re: Not exiting all windows

Post by void »

This sounds like you are running multiple instances.

This is the expected behavior when using multiple instances.


Please take note of the instance name in the window caption or the tooltip when hovering over the Everything system tray icon.



Please make sure allow_multiple_instances is set to 0.
This setting will always create a new instance everytime you run Everything.exe.


Please try re-enabling the context menu for your main instance:
  • In your main instance of Everything, from the Tools menu, click Options.
    Click the General tab on the left.
  • Uncheck Show Search Everything... folder context menu item.
  • Click Apply.
  • Check (tick-check) Show Search Everything... folder context menu item.
  • Click OK.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Not exiting all windows

Post by raccoon »

Right-clicking on a folder and selecting "Search Everything..." is launching the wrong installation of Everything. This is probably because you enabled [x]Show Search Everything folder context menu item on the wrong installation of Everything. And so it is that installation that is being executed instead.

Edit: void beat me to the reply.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

@void, thanks, I'll give it a try...

Just to clarify, I have a main installation and two instances, but I'm only running one at a time. Do you mean that if I have more than one instance but I'm only running one at a time that this will affect my running instance?

I do sometimes have to run both instances at the same time, will changing allow_multiple_instances only allow me to run one instance at a time?
void
Developer
Posts: 17138
Joined: Fri Oct 16, 2009 11:31 pm

Re: Not exiting all windows

Post by void »

Currently, Show Search Everything... folder context menu item can only be installed for one instance.
Show Search Everything... folder context menu item will call the instance it was installed with.


If you have any custom context menu entries, please make sure you are calling Everything.exe with the desired -instance <instance name>


I do sometimes have to run both instances at the same time, will changing allow_multiple_instances only allow me to run one instance at a time?
No, please leave this option set to 0.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

Do I need to set the allow_multiple_instances on all three ini's?

It appears that allow_multiple_instances is already set to 0

Yes, I've got one context item that was created with Everything and I created my own context menu search for the other.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

I can see what "Allow multiple instances" does, but that is not what's causing this issue.

I'm beginning to think that maybe this is because I created my own context menu entries as well as the Everything one being enabled.

It's not really a major problem as it could be useful occasionally, but if I am stuck with it is there a way of exiting Everything similar to the close-all command.

I should have mentioned as well that there are never more than two icons in the system tray. One Icon for Everything opened normally and one for anything (no matter how many windows) opened via the context menu.

Ifv I exit a window opened via the context menu, all the other Windows that were opened with the context are closed, leaving the windows opened normally.

So it takes a maximum of two clicks to exit all opened windows, same thing applies if I use close-all
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

I'm now pretty sure that having created a context menu entry is causing the problem. See posting above (I could be wrong).
I suppose my only option is to remove my context menu entry but I don't want to do that.

If I can't do anything about it I've been trying to write some batch files to.
1.Close all windows
2. Exit all Windows

And I would like (although not as important as above) is to

3. Minimise all windows
4.restore all windows from when minimised or closed.

I've been successful in closing all the windows at once and exiting all windows at once and closing, minimising and restring all windows with Nirsoft's Nircmd.

The problem is that if I close or exit all the windows with Nircmd it doesn't write changes to my Everything directory.
The exit command just stops the Everything process.

I tried the Everything close-all and exit command in a batch file but that only closed the windows that were created from Everything and not the windows that were opened via the context menu.
In my Nircmd batch file I got round that by entering the same command line twice, but that didn't work with Everything.

I couldn't find any reference minimising and restoring all windows from minimised or closed on the Everything command line.



Any thoughts on this please?
Last edited by harryray2 on Sun Oct 31, 2021 9:40 am, edited 1 time in total.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Not exiting all windows

Post by raccoon »

AutoHotkey lets you script all sorts of stuff like that. And their Discord support is very active.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

I want to try and resolve this within Everything, I've been using various solutions which work in closing and editing the windows but the problem is always that data isn't written to disc.
It's also more convenient to be able to work within Everything rather than to use third party programmes for a solution
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Toggle window

Post by harryray2 »

I tried "toggle-window" hoping it would solve my problem:
viewtopic.php?f=5&t=10713&p=40832#p40832

It didn't help, but I tried it on my main installation as well and it doesn't close any windows it only seems to restore a single window

Possibly a toggle for closing and restoring all windows would be nice (same with minimising and restoring)
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Not exiting all windows

Post by raccoon »

I cannot speak for void, but I do not believe it is his intention to make one instance (installation) of Everything manipulate any of the windows that belong to a separate and distinct instance (installation) of Everything. They are blind and ignorant of each other, as they ought to be, and should not manipulate one another.

If you want to manipulate windows that belong to multiple discrete independent running processes, then use an outside scripting language like AutoHotkey.
void
Developer
Posts: 17138
Joined: Fri Oct 16, 2009 11:31 pm

Re: Not exiting all windows

Post by void »

Everything is not aware of other Everything instances.
I don't intent for an Everything instance to be able to talk to other Everything instances.


Please configure your custom context menus to call the desired instance.

Consider using the instance name in your context menu name to avoid confusion, for example:

HKEY_CLASSES_ROOT\Folder\shell\Search Everything (My Instance)...\command
"C:\Program Files\Everything\Everything64.exe" -path "%1" -instance "My Instance"
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

I know that Everything is not aware of other instances...I'm just using the main installation to illustrate how the behaviour is different to the instance I'm having a problem with.

The context menu is set up correctly as per your instructions. However, I'm having the problem of not being able to exit all windows at once in an instance I created.
If I have two windows open, one opened normally, and one opened via the context menu on exiting everything only one window will exit at a time. ie: the window called from the context menu will close but not the window opened normally.

I have to exit Everything again from the window that has remained open.

I'm afraid that replies from other users are causing unintended confusion on this subject.
void
Developer
Posts: 17138
Joined: Fri Oct 16, 2009 11:31 pm

Re: Not exiting all windows

Post by void »

Does disabling Tools -> Options -> UI -> Create a new window when running Everything help?

There is a search command /close-all to close all open windows.
In Everything, type in the following search and press ENTER:
/close-all

Does this help?
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

Thanks, I tried all of that as well, doesn't work.

I also tries close-all and Exit in a batch file and on a shortcut with no luck.
void
Developer
Posts: 17138
Joined: Fri Oct 16, 2009 11:31 pm

Re: Not exiting all windows

Post by void »

It sounds like you are running two separate instances.
(Please let me know if you are not)

Everything will not communicate between separate instances.
Instances are designed to be separated (unique settings and data).


Consider a batch file to exit all instances:
Everything64.exe -instance "my instance" -exit
Everything64.exe -instance "my other instance" -exit
Everything64.exe -exit
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

No, the windows are being opened from within just one instance.

Although I do have another instance, that isn't running.
Last edited by harryray2 on Mon Nov 01, 2021 8:47 am, edited 2 times in total.
void
Developer
Posts: 17138
Joined: Fri Oct 16, 2009 11:31 pm

Re: Not exiting all windows

Post by void »

If I have two windows open, one opened normally, and one opened via the context menu on exiting everything only one window will exit at a time. ie: the window called from the context menu will close but not the window opened normally.
Could you please send a screenshot of both windows?
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

CUsersuserDesktopNew folder (2)  - Everything (david).jpg
CUsersuserDesktopNew folder (2) - Everything (david).jpg (18.28 KiB) Viewed 30309 times
Everything (david).jpg
Everything (david).jpg (8.33 KiB) Viewed 30309 times
void
Developer
Posts: 17138
Joined: Fri Oct 16, 2009 11:31 pm

Re: Not exiting all windows

Post by void »

Thank you for the screenshot.

This looks fine, could you please send me your Everything.ini:
  • In Everything (either window from above), type in the following search and press ENTER:
    about:config
  • Please send this file to support@voidtools.com
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

I will do, thanks...
In the meantime I've created two batch files.
One for exiting:
D:\david\Everything64.exe -instance david -exit
D:\david\Everything64.exe -instance david -exit

One for closing:
D:\david\Everything64.exe -instance david -close
D:\david\Everything64.exe -instance david -close

As you will see, the commands are in there twice to close each window. are these OK to use.
They seem to work properly and write to file each time.


Other questions:

Could you clarify for me how "-toggle-window" works?
It doesn't seem to work as expected.

Is there a way to restore all windows at once after being closed?

Is it possible to minimise/maximise all windows at once?
void
Developer
Posts: 17138
Joined: Fri Oct 16, 2009 11:31 pm

Re: Not exiting all windows

Post by void »

Instance names were case sensitive in Everything 1282a and earlier.

There was two instances David and david.

This is causing all sorts of issues with saving the Everything.ini
The two instances are over-writting each other settings.



Instance names in Everything 1.5.0.1283a are now case insensitive.
Technically, the Everything mutex is now all upper case.



Everything 1.5.0.1283a also adds the /minimize-all and /unminimize-all search commands.

Everything 1.5.0.1283a also adds the -minimize-all and -unminimize-all command line options.

I've also added a -unminimize command line option.



-toggle-window will close the Everything search window in the foreground.
If there is no Everything search window in the foreground a new search window is shown and brought into the foreground.

If you are running this from a command prompt, there will never be an Everything search window in the foreground (the command prompt will be in the foreground)

It's usage might be for binding to an external key-press, event or other non-window action.


There's no option to unclose or unhide all windows.
I'll look into support for this in a future release.

Thanks for the suggestions.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Not exiting all windows

Post by harryray2 »

Thanks so much David, I've yet to go through all the changes in 1283 but the ignore case has solved the exit problem.

The new release happily pre-empted the need for me to adjust the registry.
I look forward to an unclose/unhide feature.
Post Reply