How to exclude libraries from custom right-click menu entries

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 521
    Win7 Pro X64, Win10 Pro x640
    Thread Starter
       #11

    KeithM said:
    1. No luck here, even stripped down to 0x20040000 (the flags needed to appear in the Navigation Pane and expand to show subfolders), the menu options stilll display.


    2. Yes, I'm using the CLSID because that is the namespace path to the virtual folder, "Librarires", rooted in the virtual Desktop. The ParsingName value found under HKLM\...\FolderDescriptions\<KnownFolderID> is the namespace path. And when I saw it used in other entries, it seemed the best way to exclude the LIbraries folder. The paths you reference refer to acutal file system locations which handle the menu commands just fine. But Explorer has no %V value to pass to your command when your command is launched from a virtual folder -- that's what causes the error.

    3. Yes. Background seems to be a different animal. Even an AppliesTo test such as System.IsFolder:=System.StructuredQueryType.Boolean#True, which seems to always be true for Directories (and also works to exclude Libraries ), causes the command to disappear if specified for he Background command.

    4. Files and directories are refer to actual file system items. AllFileSystemObjects includes both. Directories are a subset of Folders, but folders can also be virtual, with no corresponnding file system directory: Control Panel, Network, This PC, etc.
      Your command requires a valid directory path, right? If you defined it under HKCR\Folder, it would appear in even more loactions where it would throw an error. If you define it under AllFIleSystemObjects, it will appear in the context menu of every file & file sytem folder(directory), but it doesn't solve the background issue.Attachment 318648

    5. I don't think that would make a difference. We already know two ways to exclude the Librarires from the regualr context menu, but no way to filter the background context menu.

    6. Modify which commands?!?!? How!?!?!?
    @KeithM

    Some more followup questions and comments.

    1. The 0x20040000 SFGAO flag is the value that allows entries in the navigation pane, such as control panel applets, to expand to show subfolders if available, correct?
    I didn't know that. Very useful info. Is that value a hex number or decimal number?

    2. Your comment "Explorer has no %V value to pass to your command when your command is launched from a virtual folder", this means that Explorer has no way to open a command prompt in any way within a virtual folder, right? A limitation of windows, correct? If so, that answers my previous question #6, which asked if there was a way to make explorer open a window in a virtual folder and not have to deal with figuring out how to use the AppliesTo string to exclude libraries in the first place.

    3. Understood.

    4. Thank you for the clarification, that is what I thought in the first place.

    5. I have another idea. Please see the attached figure. If you open file explorer, and select file from the menu bar, the native ribbon powershell and command prompt options are greyed out in libraries but active in a standard folder. From what I understand, there is some sort of command store set of keys that handle all of the options for explorer. Can you find the key that handles the command prompt and/or powershell for the ribbon and apply it to the context menu entries? In other workds, is there a way to exploit the inability of command prompt and/or powershell to open a shell in virtual folders and apply the same to the contect menu?

    How to exclude libraries from custom right-click menu entries-exp.png
    Thanks!
      My Computer


  2. Posts : 521
    Win7 Pro X64, Win10 Pro x640
    Thread Starter
       #12

    Is there any update on this issue of selectively removing the shell context menu entries for libraries?

    The default open command prompt and powershell entries that are part of the windows installation also appear on libraries but don't work. However, the powershell/command prompt entries on the Ribbon are greyed out. Any idea how to make that work with context menus?
      My Computer


  3. Posts : 989
    Microsoft Windows 10 Home
       #13

    Lost track of this thread. There's too much compression on your screenshots to read anything or see the options you're talking about.
      My Computer


  4. Posts : 521
    Win7 Pro X64, Win10 Pro x640
    Thread Starter
       #14

    KeithM said:
    Lost track of this thread. There's too much compression on your screenshots to read anything or see the options you're talking about.
    Do you mean the screenshot in the reply posted on Feb 15?
      My Computer


  5. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #15

    Hello @bamajon1974,

    Individual screenshots are normally a lot easier and clearer to see . . .

    > How to Upload and Post Screenshots and Files at Ten Forums

    I hope this helps.
      My Computer


  6. Posts : 521
    Win7 Pro X64, Win10 Pro x640
    Thread Starter
       #16

    Is this screenshot more readable?

    How to exclude libraries from custom right-click menu entries-exp1.png
      My Computer


  7. Posts : 989
    Microsoft Windows 10 Home
       #17

    bamajon1974 said:
    Do you mean the screenshot in the reply posted on Feb 15?
    Yes. OPenignimage in a new tab & trying to zoom in... no text is legible....
      My Computer


  8. Posts : 521
    Win7 Pro X64, Win10 Pro x640
    Thread Starter
       #18

    KeithM said:
    Yes. OPenignimage in a new tab & trying to zoom in... no text is legible....
    I uploaded a new image. Does that help?

    The main question I had was....

    If you go to This PC and select Libraries in the Navigation Pane (or right-click the background of the Library window), the Open Command Prompt/Powershell windows options are are present (shift+right-click I believe) but no shell windows open when you select. Moreover, this is the default windows behavior. MS included non-functional right-click menu entries in Libraries for opening shells. However, if you go to the Ribbon, File Menu option, the Powershell entries are grayed out.

    So is there a way to make the right-click menu behave like the ribbon command in this case? Does this make sense?

    Where are Ribbon commands that appear on the Ribbon stored in the registry? Maybe I can look around.

    Thanks!
      My Computer


  9. Posts : 14,020
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #19

    It may not be of help but in View, Options, View tab at the bottom I deselect Show libraries, there's other choices there for a number of things that can be done. I also right-click Quick Access and choose Collapse. Both items seem to be just shortcuts to the actual folders in C:\Users\USERNAMEHERE.
    How to exclude libraries from custom right-click menu entries-image.png
      My Computers


  10. Posts : 989
    Microsoft Windows 10 Home
       #20

    bamajon1974 said:
    I uploaded a new image. Does that help?

    The main question I had was....

    If you go to This PC and select Libraries in the Navigation Pane (or right-click the background of the Library window), the Open Command Prompt/Powershell windows options are are present (shift+right-click I believe) but no shell windows open when you select. Moreover, this is the default windows behavior. MS included non-functional right-click menu entries in Libraries for opening shells. However, if you go to the Ribbon, File Menu option, the Powershell entries are grayed out.

    So is there a way to make the right-click menu behave like the ribbon command in this case? Does this make sense?

    Where are Ribbon commands that appear on the Ribbon stored in the registry? Maybe I can look around.

    Thanks!
    I think you're thing of subkeys of:
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell

    Code:
    >gci 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell' | ? PSChildName -match CMd | select PSChildName
    
    PSChildName
    -----------
    Windows.cmd
    Windows.cmdPromptAsAdministrator
    Windows.location.cmd
    Windows.location.cmdPromptAsAdministrator
    Windows.MultiVerb.cmd
    Windows.MultiVerb.cmdPromptAsAdministrator
    but I have no idea how to make use of the values found under them:
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:01.
Find Us




Windows 10 Forums