[SOLVED] Inconsistent behavior when middle clicking Everything in the taskbar

Discussion related to "Everything" 1.5 Alpha.
Post Reply
GSD
Posts: 42
Joined: Fri Apr 28, 2023 12:59 pm

[SOLVED] Inconsistent behavior when middle clicking Everything in the taskbar

Post by GSD »

This is a convoluted one and way above my head, but please bare with me.

I use several EV instances and have them all as (manually created) shortcuts on the desktop and in the start menu. I also call the instances through scripts via the command line.

If I first open EV via said shortcuts, when middle clicking EV in the taskbar I get the expected/desired behavior, which is to open a new window with the respective instance I middle clicked on. However, if I first start EV via the command line, when middle clicking, Windows opens the first instance it finds as a shortcut, either on the desktop or in the start menu. Probably alphabetically, but not sure. This seems to affect other apps as well (I've found this vscode issue to be informative: https://github.com/microsoft/vscode/issues/13905)

After some digging, I believe this is related to the app's AppUserModelID and System.AppUserModel.RelaunchCommand:
https://learn.microsoft.com/en-us/windo ... ell/appids
https://learn.microsoft.com/en-us/windo ... nchcommand

Those shortcuts that are created in the start menu(manually, in my case) get an auto generated AppUserModelID, which, if you have multiple instances in the start menu, can be seen by running this in powershell, which will show said info for all shortcuts present:

Code: Select all

Get-StartApps | Format-Table
I speculate that, when lauching EV from the command line, it gets a different AppUserModelID(or none?), ergo said behavior.

Perhaps if we could set the AppUserModelID for each instance?

Thank you for your patience and please excuse my speculations, if they are unfounded.
Last edited by GSD on Fri Jun 20, 2025 1:28 pm, edited 1 time in total.
void
Developer
Posts: 17807
Joined: Fri Oct 16, 2009 11:31 pm

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by void »

Thanks for the issue report GSD,

I have code to set the PKEY_AppUserModel_ID to:
com.voidtools.Everything (instance-name)


-it's currently disabled though..

I have been trying to fix the issue with the pinned taskbar button using the wrong command line options on Windows 11.
On Windows 11 the pinned taskbar button is incorrectly using the -startup command line option, so clicking the button does nothing. (well it adds it to the tray, but doesn't open a window)

I haven't worked out a clean solution yet..

I will look into your middle click issue with multiple instances as it's related.
-What OS are you using?
GSD
Posts: 42
Joined: Fri Apr 28, 2023 12:59 pm

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by GSD »

void wrote: Thu Jun 12, 2025 1:02 am -What OS are you using?
I'm on Windows 10, sorry for not specifying. Also, I'm not using pinned taskbar buttons for EV and have the taskbar set to "never combine".
void wrote: Thu Jun 12, 2025 1:02 am I have been trying to fix the issue with the pinned taskbar button using the wrong command line options on Windows 11.
On Windows 11 the pinned taskbar button is incorrectly using the -startup command line option, so clicking the button does nothing. (well it adds it to the tray, but doesn't open a window)

I haven't worked out a clean solution yet..
Like I said, this is all a bit over my head, but I believe they also do go through what you're saying in that github vscode issue I've linked and it's related/mentioned issues + the solution. So that might be a good resource because they have solved it and they are, after all, microsoft engineers for the most part :)

Thank you for taking a look at this!
void
Developer
Posts: 17807
Joined: Fri Oct 16, 2009 11:31 pm

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by void »

Thanks for the information.

I've got something working on Windows 10 and will have an update soon.
void
Developer
Posts: 17807
Joined: Fri Oct 16, 2009 11:31 pm

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by void »

Everything 1.5.0.1395a will now register an AppUserModel ID and RelaunchCommand when creating a window.



When you middle click the Everything taskbar button you should see a new window for that instance.



Everything will set the PKEY_AppUserModel_ID to:
voidtools.Everything-1.5a.<instance-name>


Everything will set the PKEY_AppUserModel_RelaunchCommand to:
<path-to-Everything.exe> -is-relaunch-command -instance <instance-name>


This should allow me to future proof the action to perform when relaunching.
Currently, Everything will run normally if it wasn't already running.
If Everything was already running, a new window is created.
I will consider a custom action, please let me know if you would like to override the above behavior.

Everything will set the PKEY_AppUserModel_RelaunchIconResource to:
%APPDATA%\Everything\Everything-<instance-name>.ico,0

(if the icon exists, otherwise the default icon is used:
<path-to-Everything.exe>,0
)

Everything will set the PKEY_AppUserModel_RelaunchDisplayNameResource to:
Everything (instance-name)




-is-relaunch-command
GSD
Posts: 42
Joined: Fri Apr 28, 2023 12:59 pm

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by GSD »

I'm not in a position to analize the technical info you've outlined, but everything seems to be working correctly. Only thing I've noticed, and this is more of a nitpick than real problem, is that ancillary windows(rename, console etc) retain the old behavior described in my original post.

Thank you!
stef
Posts: 3
Joined: Sun Mar 12, 2017 2:25 am

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by stef »

void wrote: Fri Jun 13, 2025 5:50 am Everything 1.5.0.1395a will now register a AppUserModel ID and RelaunchCommand when creating a window.
[...]
Currently, Everything will run normally if it wasn't already running.
If Everything was already running, a new window is created.
I have pinned it to the taskbar and after upgrading to 1.5.0.1395a and clicking on the pinned taskbar button, it always launches with:

Code: Select all

"C:\Program Files\Everything 1.5a\Everything64.exe" -is-relaunch-command -instance "1.5a"
Shouldn't it be launching "normally" the first time? (without -is-relaunch-command ...)

My system: Windows 10 22H2 (Everything 1.5.0.1395a, Everything Service installed)
void
Developer
Posts: 17807
Joined: Fri Oct 16, 2009 11:31 pm

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by void »

I have put on my TODO List to add AppUserModel information to the Everything Advanced Renamer and File List Editor.

Other windows, like the options window, debug console will likely not get their own AppUserModel as these windows cannot be relaunched.

I will look into setting all windows that have a taskbar button to share the same main window AppUserModel.
Middle clicking on the Options window in the taskbar would then open a new Everything window with that instance name.
-Is this the preferred behavior?


I have pinned it to the taskbar and after upgrading to 1.5.0.1395a and clicking on the pinned taskbar button, it always launches with:

"C:\Program Files\Everything 1.5a\Everything64.exe" -is-relaunch-command -instance "1.5a"
This is expected.

Everything will now use the -is-relaunch-command command line option when:
  • Clicking on the pinned taskbar button if Everything is not running.
  • Middle clicking the taskbar button.
The default -is-relaunch-command action:
If Everything wasn't running, Everything will launch normally and -is-relaunch-command does nothing.
However, if Everything was already running, Everything will instead show a new window.

To customize the taskbar relaunch command line:
  • Right click the taskbar button.
  • Right click Everything.
  • Click Properties.
  • Adjust the command line in the Target.
  • Click OK.

Shouldn't it be launching "normally" the first time? (without -is-relaunch-command ...)
Everything should now launch with -is-relaunch-command

Everything should launch normally for the first time.
Are you seeing unexpected behavior when Everything launches?
GSD
Posts: 42
Joined: Fri Apr 28, 2023 12:59 pm

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by GSD »

void wrote: Sat Jun 14, 2025 12:05 am I have put on my TODO List to add AppUserModel information to the Everything Advanced Renamer and File List Editor.

Other windows, like the options window, debug console will likely not get their own AppUserModel as these windows cannot be relaunched.

I will look into setting all windows that have a taskbar button to share the same main window AppUserModel.
Middle clicking on the Options window in the taskbar would then open a new Everything window with that instance name.
-Is this the preferred behavior?
Yes, that would indeed be the preferred behavior: any window, be it options, console, advanced renamer, file list editor, bookmark editor etc. that was launched from a specific instance(and therefore has that instance's icon) should open a new search window with that instance upon middle click.
stef
Posts: 3
Joined: Sun Mar 12, 2017 2:25 am

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by stef »

void wrote: Sat Jun 14, 2025 12:05 am Everything should now launch with -is-relaunch-command

Everything should launch normally for the first time.
Are you seeing unexpected behavior when Everything launches?
It is running fine now.

First i was wondering because normally a pinned taskbar-icon "becomes active" after clicking it.
This was not the case after upgrading to 1.5.0.1395a.
But after modifying the pinned taskbar-icon from:

Code: Select all

"C:\Program Files\Everything 1.5a\Everything64.exe"
to:

Code: Select all

"C:\Program Files\Everything 1.5a\Everything64.exe" -is-relaunch-command -instance "1.5a"
the pinned taskbar-icon now gets active after a click on it.
void
Developer
Posts: 17807
Joined: Fri Oct 16, 2009 11:31 pm

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by void »

Existing pinned taskbar buttons may not "become active" when Everything is running.

Please re-pin Everything:
  • Unpin Everything from the taskbar.
  • Pin the active window to the taskbar.
void
Developer
Posts: 17807
Joined: Fri Oct 16, 2009 11:31 pm

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by void »

Everything 1.5.0.1396a will now register an AppUserModel ID and RelaunchCommand for all windows.

The same AppUserModel ID and RelaunchCommand is used for all windows.
All windows should now share the same taskbar button.



Everything 1396a will now set the PKEY_AppUserModel_ID to:
voidtools.Everything 1.5a.<instance-name>


You will need to re-pin your taskbar buttons.
Sorry for the inconvenience.
GSD
Posts: 42
Joined: Fri Apr 28, 2023 12:59 pm

Re: Inconsistent behavior when middle clicking Everything in the taskbar

Post by GSD »

void wrote: Fri Jun 20, 2025 4:48 am Everything 1.5.0.1396a will now register an AppUserModel ID and RelaunchCommand for all windows.

The same AppUserModel ID and RelaunchCommand is used for all windows.
All windows should now share the same taskbar button.



Everything 1396a will now set the PKEY_AppUserModel_ID to:
voidtools.Everything-1.5a.<instance-name>


You will need to re-pin your taskbar buttons.
Sorry for the inconvenience.
All good here. As always, thank you for your excellent work, Sir!
Post Reply