Page 1 of 1

Context menu folder (background)

Posted: 20 Feb 2022 19:52
by notabot
When right-clicking an empty part of a listview in File Explorer, I see the following entries:
2022-02-20 19_37_02-Task Manager.png
2022-02-20 19_37_02-Task Manager.png (9.93 KiB) Viewed 2047 times

In XYplorer, I see this (64- as well as 32-bit context menu):
2022-02-20 19_38_59-.png
2022-02-20 19_38_59-.png (9.37 KiB) Viewed 2047 times

Why aren't these TEST_ context-menu entries shown in XYplorer? (mostly out-of-the-box settings, btw)




The TEST entries of the context menu can be generated with the following command on an (elevated) CMD prompt:

Code: Select all

@for %a in ("HKCU" "HKLM") DO @for %b in ("Directory" "Folder") DO @for %c in ("32" "64") Do reg.exe add  "%~a\Software\Classes\%~b\Background\Shell\TEST_%~a_%~b_%~c\command" /ve /D "notepad.exe" /F /reg:%~c

To remove these entries:

Code: Select all

@for %a in ("HKCU" "HKLM") DO @for %b in ("Directory" "Folder") DO @for %c in ("32" "64") Do reg.exe delete  "%~a\Software\Classes\%~b\Background\Shell\TEST_%~a_%~b_%~c"

Re: Context menu folder (background)

Posted: 20 Feb 2022 20:13
by jupe
You need to set this to get that style menu:

Configuration | General | Custom Event Actions | Right-click on white in file list == "Pop up folder's context menu"

Re: Context menu folder (background)

Posted: 20 Feb 2022 20:42
by notabot
Thanks!

Unfortunately, that does exactly that: Pop up folder's context menu". It is the context menu that is shown when you right-click a folder.
That is different from the folder's background context menu.


For reference, a folder's context menu (in File Explorer):
2022-02-20 20_41_07-C__test_XXX_XXXXXXXXXXX-XXXXX_XX_XX_XXXXXXXXX_(XXX_XXXXXXXX_XXX_XXXXXXXXXX)-XXX-.png
2022-02-20 20_41_07-C__test_XXX_XXXXXXXXXXX-XXXXX_XX_XX_XXXXXXXXX_(XXX_XXXXXXXX_XXX_XXXXXXXXXX)-XXX-.png (7.82 KiB) Viewed 2037 times

Re: Context menu folder (background)

Posted: 20 Feb 2022 21:09
by jupe
Yes sorry I didn't read your post properly, I don't think you can get that background menu, but if your main aim is just to be able to add items to that folder menu you see now in XY via the Registry, you still can, you'd just need to add them in a different place instead, eg. HKCR\Directory\Shell\ or the user one etc.

Re: Context menu folder (background)

Posted: 20 Feb 2022 22:00
by notabot
No problem. You are just trying to help. Really appreciated!

Yes, I'm aware of these other regkeys. Thanks for the suggestion!

A bit of background (no pun intended) why I ask:
I wrote a little script that makes use of this context menu.
It is to be used in file managers and file dialogs. It switches folders directly, without browsing through the intermediate paths.

Most (common) file managers are already supported. Total Commander is supported through a workaround. I still have to write support for XYplorer. It would be convenient if I could use the same mechanism (I'm lazy :)), but a workaround would do too. Will investigate as i'm working on an update anyway.



Example:
I want to go to some music folder to update the mp3 tags. Folder is somewhere, can't remember. The only thing I do remember is that it got 'thunderstruck' on it.
This is what that looks like in File Explorer:
EDIT: the animated GIF loops so the effect is not very clear. Explorer opens the folder that contains thunderstruck (M:\...)
JumpToFolder.gif
JumpToFolder.gif (240.56 KiB) Viewed 2017 times

Re: Context menu folder (background)

Posted: 21 Feb 2022 15:17
by Horst
Whats wrong with your current JumpToFolder ?
It works fine with XY for me.
Entering small amount of search text allows to get to a file or folder in XY.
What can be faster or easier ?

Re: Context menu folder (background)

Posted: 21 Feb 2022 20:17
by notabot
Are you sure? I think you are mixing up all your file managers :) (so do I btw, so I might be wrong here ..)

I haven't written any code for XY yet. At least not for JumpToFolder. QuickSwitch has code for XY.

How do you start it? Button? Keyboard shortcut?

Re: Context menu folder (background)

Posted: 21 Feb 2022 23:25
by Horst
notabot wrote: 21 Feb 2022 20:17 Are you sure? I think you are mixing up all your file managers :) (so do I btw, so I might be wrong here ..)

I haven't written any code for XY yet. At least not for JumpToFolder. QuickSwitch has code for XY.

How do you start it? Button? Keyboard shortcut?
I have JumpToFolder 0.9.2 modified to work with XY.
I start it with a special key on my Logitech keyboard or with a hotkey from QAP.
It works for me with Total Commander, XYPlorer and FreeCommander.

Re: Context menu folder (background)

Posted: 22 Feb 2022 00:15
by notabot
Nice! Can you send me your code? That will save me some time :-)

(preferably through the Everything forum as I visit that one more frequently)