Recycle Bin Context Menu Item Positioning

Discussion related to "Everything" 1.5 Alpha.
Post Reply
albino
Posts: 9
Joined: Mon Jun 19, 2023 5:02 pm

Recycle Bin Context Menu Item Positioning

Post by albino »

If you have "Show Search Everything folder context menu item" enabled, then your right-click on the Recycle Bin puts the Everything search above Empty Recycle Bin. I wonder if that could be modified on your end so that when enabled the normal Windows default of Empty Recycle Bin is still on top.

Example image:
everything.jpg
everything.jpg (10.55 KiB) Viewed 2149 times
I imagine this could be fixed with some sort of regex or 3rd party program, but I would think the default Everything install behavior should still be with Empty Recycle Bin at the top as I'm sure that's much more frequently used by the majority of people. Thanks.
horst.epp
Posts: 1349
Joined: Fri Apr 04, 2014 3:24 pm

Re: Recycle Bin Context Menu Item Positioning

Post by horst.epp »

I don't see the benefit as the Open entry will still be on the top.
So I have to click on some entry anyway, as Enter will just Open.
NotNull
Posts: 5294
Joined: Wed May 24, 2017 9:22 pm

Re: Recycle Bin Context Menu Item Positioning

Post by NotNull »

albino wrote: Tue Jan 16, 2024 9:12 pm I imagine this could be fixed with some sort of regex
Yes, that is possible. Would also put the Search Everything context menu lower when right-clicking a regular folder. That is fixable too (menu entry higher up), but less maintenance friendly (updates might revert these changes).

Let me know if you plan to make these changes. Then I will post the needed registry keys.
albino
Posts: 9
Joined: Mon Jun 19, 2023 5:02 pm

Re: Recycle Bin Context Menu Item Positioning

Post by albino »

horst.epp wrote: Wed Jan 17, 2024 1:49 pm I don't see the benefit as the Open entry will still be on the top.
So I have to click on some entry anyway, as Enter will just Open.
I guess the benefit would be that the default Windows behavior isn't changed meaning that decades of muscle memory still works.
NotNull wrote: Wed Jan 17, 2024 3:47 pm Yes, that is possible. Would also put the Search Everything context menu lower when right-clicking a regular folder. That is fixable too (menu entry higher up), but less maintenance friendly (updates might revert these changes).

Let me know if you plan to make these changes. Then I will post the needed registry keys.
I'm hopeful to get it fixed for everyone in the future without editing the registry, but I would gladly take at least the Recycle Bin change if you would be so kind as to post it. Thanks.
NotNull
Posts: 5294
Joined: Wed May 24, 2017 9:22 pm

Re: Recycle Bin Context Menu Item Positioning

Post by NotNull »

To position the Everything context menu entry lower:

  • From the Start menu, search for: regedit
  • Right click Registry Editor and click Run as administrator.
  • Navigate to:

    Code: Select all

    HKEY_CLASSES_ROOT\Folder\shell\Search Everything 1.5a...
  • Right-click Search Everything 1.5a...
  • From the context menu, select New => String Value
  • Set the Name to Position
  • Double-click Position
  • Set the value data to Bottom
  • Press OK
  • Exit Registry Editor
To undo this change, delete the Position key.


To put the Everything context menu entry higher up for regular folders, use the following settings
Change the paths to where your Everything is installed.
(this is an export of the settings; too much effort to describe it in detail)

Not that is is the Directory registry key; not the Folder key

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\Search Everything 1.5a...]
@="Search Everything 1.5a..."
"Icon"="C:\\Program Files\\Everything 1.5a\\Everything64.exe,0"
"Position"="Top"

[HKEY_CLASSES_ROOT\Directory\shell\Search Everything 1.5a...\command]
@="\"C:\\Program Files\\Everything 1.5a\\Everything64.exe\" -path \"%1\""
Massor
Posts: 17
Joined: Sat Sep 03, 2022 3:27 pm

Re: Recycle Bin Context Menu Item Positioning

Post by Massor »

Nilesoft Shell just does this by default. It's a little portable and customizable app.
Snap20240117200316.png
Snap20240117200316.png (47.37 KiB) Viewed 2115 times
Snap20240117200636.png
Snap20240117200636.png (35.9 KiB) Viewed 2115 times
NotNull
Posts: 5294
Joined: Wed May 24, 2017 9:22 pm

Re: Recycle Bin Context Menu Item Positioning

Post by NotNull »

Result of the registry settings above:


2024-01-17 21_52_59-.png
2024-01-17 21_52_59-.png (32.23 KiB) Viewed 2114 times
albino
Posts: 9
Joined: Mon Jun 19, 2023 5:02 pm

Re: Recycle Bin Context Menu Item Positioning

Post by albino »

Wonderful, thanks so much!
albino
Posts: 9
Joined: Mon Jun 19, 2023 5:02 pm

Re: Recycle Bin Context Menu Item Positioning

Post by albino »

Massor wrote: Wed Jan 17, 2024 8:51 pm Nilesoft Shell just does this by default. It's a little portable and customizable app.
Just started messing with this as it looks incredibly useful and powerful, but it's also awfully dense and complex. It desperately needs a GUI. Thanks for the recommendation though, I'm curious enough to spend some more time going through the docs to see if I can improve anything in my workflow with it.

Also, interestingly, it doesn't work inside of Everything, only in normal Windows Explorer.
soaper
Posts: 55
Joined: Sun Nov 08, 2015 9:34 am

Re: Recycle Bin Context Menu Item Positioning

Post by soaper »

The registry hack by NotNull totally works, thank you!

Going one step further, I would suggest having an option *not* to add this context menu option to the Recycle Bin at all.

Wonder if the Position string accepts a value of Nowhere? :?:
NotNull
Posts: 5294
Joined: Wed May 24, 2017 9:22 pm

Re: Recycle Bin Context Menu Item Positioning

Post by NotNull »

Haha .. and a Random setting too, to keep everyone on their toes :D

But yes, "Nowhere" is actually possible:
  • In Everything, uncheck Show Search Everything folder context menu item (Menu => Tools => Options => General)
  • Save the following on disk as a .reg file

    Code: Select all

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\Directory\shell\Search Everything 1.5a...]
    @="Search Everything 1.5a..."
    "Icon"="C:\\Program Files\\Everything 1.5a\\Everything64.exe,0"
    "Position"="Bottom"
    
    [HKEY_CLASSES_ROOT\Directory\shell\Search Everything 1.5a...\command]
    @="\"C:\\Program Files\\Everything 1.5a\\Everything64.exe\" -path \"%1\""
    
    
  • Start Registry Editor (regedit.exe) as administrator
  • Menu => File => Import
  • Browse to the previously saved .reg file
  • Press the Open button
  • Done.
Now the Search Everything 1.5a... context-menu entry will only be shown on regular filesystem folders.
void
Developer
Posts: 15443
Joined: Fri Oct 16, 2009 11:31 pm

Re: Recycle Bin Context Menu Item Positioning

Post by void »

To exclude the Search Everything context menu item from the Recycle bin:
  • From the Start menu, search for:
    regedit
  • Right click Registry Editor and click Run as administrator.
  • In the Registry Editor, navigate to:
  • HKEY_CLASSES_ROOT\Folder\shell\Search Everything 1.5a...
  • Create the following String Value:
    AppliesTo
  • Set the AppliesTo data to:
    NOT (System.ParsingPath:=::{645FF040-5081-101B-9F08-00AA002F954E})
albino
Posts: 9
Joined: Mon Jun 19, 2023 5:02 pm

Re: Recycle Bin Context Menu Item Positioning

Post by albino »

void wrote: Wed Feb 07, 2024 4:05 am To exclude the Search Everything context menu from the Recycle bin:
This works, thanks!
soaper
Posts: 55
Joined: Sun Nov 08, 2015 9:34 am

Re: Recycle Bin Context Menu Item Positioning

Post by soaper »

void wrote: Wed Feb 07, 2024 4:05 am To exclude the Search Everything context menu item from the Recycle bin:
  • ...
  • Create the following String Value:
    AppliesTo
  • Set the AppliesTo data to:
    NOT (System.ParsingPath:=::{645FF040-5081-101B-9F08-00AA002F954E})
As soon as I applied the above, the option disappeared from the context menu, huuuuuuuge thanks.

BTW, am I the only one sensing a competition b/w void and NotNull here in the forum for the best solution? :D :) ;) :lol: :?:

Seriously, I am grateful to you both, and grateful for Everything. It's invariably the first application I install on any new VM I create.

Regards
NotNull
Posts: 5294
Joined: Wed May 24, 2017 9:22 pm

Re: Recycle Bin Context Menu Item Positioning

Post by NotNull »

void wrote: Wed Feb 07, 2024 4:05 amAppliesTo
Where the <bleep> did you find this :shock: This is awesome! Documentation seems scarce though.



soaper wrote: Wed Feb 07, 2024 5:42 am BTW, am I the only one sensing a competition b/w void and NotNull here in the forum for the best solution? :D :) ;) :lol: :?:
Hahaha, if this was a competition, I would have stopped trying to answer questions many years ago :D No change of winning that.
It is all about helping people and sharing knowledge/experiene in my opinion.

This way I have also learned a thing or two three many. And not only about Everything (see above for a good example).
froggie
Posts: 297
Joined: Wed Jun 12, 2013 10:43 pm

Re: Recycle Bin Context Menu Item Positioning

Post by froggie »

void wrote: Wed Feb 07, 2024 4:05 amAppliesTo

Where the <bleep> did you find this :shock: This is awesome! Documentation seems scarce though.
Some information about 2/3's of the way down in

https://learn.microsoft.com/en-us/windo ... ical-verbs

Cascading menus look interesting. too.
NotNull
Posts: 5294
Joined: Wed May 24, 2017 9:22 pm

Re: Recycle Bin Context Menu Item Positioning

Post by NotNull »

Thank you! This is a nice overview of the options, including another new one (for me): Custom Verbs for Folders.
froggie wrote: Thu Feb 08, 2024 9:57 pm Cascading menus look interesting. too.
Yes, i've done this a couple of times. From what I remember, it was hard to get the syntax right at first.


Again: Thanks for finding this! And now I'm off, playing with my new toys :D
void
Developer
Posts: 15443
Joined: Fri Oct 16, 2009 11:31 pm

Re: Recycle Bin Context Menu Item Positioning

Post by void »

How to exclude libraries from custom right-click menu entries using AppliesTo string?
https://learn.microsoft.com/en-us/answers/questions/264315/how-to-exclude-libraries-from-custom-right-click-m

Using Advanced Query Syntax Programmatically
https://learn.microsoft.com/en-us/windows/win32/search/-search-3x-advancedquerysyntax



I did experiment with making some virtual folders not show the Everything context menu by default.

I ran into a few issues:
1) you are limited to 259 characters.
2) you can index virtual folders in Everything 1.5. (although this is currently not used much, it will be extended in future versions)
3) AppliesTo seems expensive, do I really want Windows Explorer going to disk when I right click a folder?



Using HKEY_CLASSES_ROOT\Directory\shell\Search Everything 1.5a... is broken
(showing the context menu on file system objects only)
The context menu still shows up on some virtual folders and gives an error when running.
There's even builtin Windows context menu items that fail:
Hold down Shift and right click Libraries, then click Open Powershell here =>

Code: Select all

This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel.


I will consider a shell extension that only shows the context menu on items that are indexed in Everything.



Other useful AppliesTo for hiding the context menu on other virtual folders:
Recycle bin ::{645FF040-5081-101B-9F08-00AA002F954E}
Network ::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}
Libraries ::{031E4825-7B94-4DC3-B131-E946B44C8DD5}
Quick access ::{679F85CB-0220-4080-B29B-5540CC05AAB6}
Favourites ::{323CA680-C24D-4099-B94D-446DD2D7249E}

This one hides from Library children (but not the main library folder):

Code: Select all

NOT (System.ItemType:~Library)
File System objects only: (doesn't work for \\server and works for libraries...)

Code: Select all

((System.SFGAOFlags:>=1073741824) AND (System.SFGAOFlags:<2147483648) OR (System.SFGAOFlags:>=3221225472))
Hide from Recycle bin, Network, Libraries and Quick access: (this one is near the 259 character limit)

Code: Select all

(System.ParsingPath:((<>::{645FF040-5081-101B-9F08-00AA002F954E}) AND (<>::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}) AND (<>::{031E4825-7B94-4DC3-B131-E946B44C8DD5}) AND (<>::{679F85CB-0220-4080-B29B-5540CC05AAB6})))
Hide from Recycle bin, Network:

Code: Select all

(System.ParsingPath:((<>::{645FF040-5081-101B-9F08-00AA002F954E}) AND (<>::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C})))


Remember to set AppliesTo in both:
HKEY_CLASSES_ROOT\Folder\shell\Search Everything 1.5a...
and
HKEY_CLASSES_ROOT\Directory\background\shell\Search Everything 1.5a...

Explorer also pulls the context menu from Directory\background
(The Recycle bin is an exception)
soaper
Posts: 55
Joined: Sun Nov 08, 2015 9:34 am

Re: Recycle Bin Context Menu Item Positioning

Post by soaper »

At this age I thought nothing would surprise me about Windows, but have to say that I did not know about the features described in void's last post.

Specifically, I was under the impression that AppliesTo was an Everything implementation.

Everything is great on its own, but being involved with it like we do here leads to additional learning, which is just great.

Thank you all.
DrLightman
Posts: 3
Joined: Tue Feb 13, 2024 10:03 am

Re: Recycle Bin Context Menu Item Positioning

Post by DrLightman »

void wrote: Wed Feb 07, 2024 4:05 am To exclude the Search Everything context menu item from the Recycle bin:
  • From the Start menu, search for:
    regedit
  • Right click Registry Editor and click Run as administrator.
  • In the Registry Editor, navigate to:
  • HKEY_CLASSES_ROOT\Folder\shell\Search Everything 1.5a...
  • Create the following String Value:
    AppliesTo
  • Set the AppliesTo data to:
    NOT (System.ParsingPath:=::{645FF040-5081-101B-9F08-00AA002F954E})
Has this stopped working? I still got the item in the Recycle bin:

Image

Windows 10 Pro 22H2
Last edited by DrLightman on Wed Feb 28, 2024 1:53 pm, edited 1 time in total.
void
Developer
Posts: 15443
Joined: Fri Oct 16, 2009 11:31 pm

Re: Recycle Bin Context Menu Item Positioning

Post by void »

Still appears to work here Windows 10 Enterprise 22H2.

Was this working before, but stopped?

Where's the Everything context menu item showing from?
(eg: from the desktop / from Windows Explorer under Desktop / from within the recycle bin and clicking on the background?)
DrLightman
Posts: 3
Joined: Tue Feb 13, 2024 10:03 am

Re: Recycle Bin Context Menu Item Positioning

Post by DrLightman »

void wrote: Thu Feb 29, 2024 11:58 am Was this working before, but stopped?

Where's the Everything context menu item showing from?
(eg: from the desktop / from Windows Explorer under Desktop / from within the recycle bin and clicking on the background?)
Never tried before, just installed the reg couple of days ago for the first time.

This context menu by right clicking the recycle bin, from the desktop:

Image
void
Developer
Posts: 15443
Joined: Fri Oct 16, 2009 11:31 pm

Re: Recycle Bin Context Menu Item Positioning

Post by void »

Could you please check your AppliesTo value under:

HKEY_CLASSES_ROOT\Folder\shell\Search Everything...

Please make sure there's no leading space or trailing space.

If the issue persists, could you please export the Search Everything... key:
  • Right click the Search Everything... key and click Export...
  • Choose a filename and click Save.
  • Please open this file with Notepad and post the contents here.
void
Developer
Posts: 15443
Joined: Fri Oct 16, 2009 11:31 pm

Re: Recycle Bin Context Menu Item Positioning

Post by void »

Please try the alternative AppliesTo:

System.ParsingName:<>"::{645FF040-5081-101B-9F08-00AA002F954E}"



Maybe your ParsingName is different? (It shouldn't be)
Please try creating a shortcut to your recycle bin on the Desktop.
Open Notepad and drag-drop this shortcut onto Notepad.
The parsing name is at the end of this file.
DrLightman
Posts: 3
Joined: Tue Feb 13, 2024 10:03 am

Re: Recycle Bin Context Menu Item Positioning

Post by DrLightman »

void wrote: Fri Mar 01, 2024 8:20 am Please try the alternative AppliesTo:

System.ParsingName:<>"::{645FF040-5081-101B-9F08-00AA002F954E}"
It works now! :D
Thanks!
Post Reply