Shell extension not available in folders which have "Libraries" as a root #14230

Closed
opened 2026-01-31 04:04:28 +00:00 by claunia · 5 comments
Owner

Originally created by @AlphaModder on GitHub (Jun 13, 2021).

Windows Terminal version (or Windows build number)

1.9.1523.0

Other Software

No response

Steps to reproduce

  • Go to a folder where the address bar displays This PC as the root in explorer (e.g. This PC > OS (C:) > MyFolder)
  • Right click on the background. Verify that the Open in Windows Terminal menu item is present.
  • Switch to a directory that is located inside a library (e.g. Libraries > Documents > MyFolder).
  • Right click on the background (not a subfolder). The menu item no longer appears.

Expected Behavior

For a context menu like this to appear:
image

Actual Behavior

A context menu like this appears:
image

Notes

  • This issue does not occur if the library is accessed through This PC, as in This PC > Documents > MyFolder
  • With a registry-based shell extension, I think the solution would be to add a subkey under HKEY_CLASSES_ROOT\LibraryFolder\background\shell\, in addition to HKEY_CLASSES_ROOT\Directory\background\shell\. I'm not sure how this translates to the COM-based shell extension API.
Originally created by @AlphaModder on GitHub (Jun 13, 2021). ### Windows Terminal version (or Windows build number) 1.9.1523.0 ### Other Software _No response_ ### Steps to reproduce - Go to a folder where the address bar displays `This PC` as the root in explorer (e.g. `This PC > OS (C:) > MyFolder`) - Right click on the background. Verify that the `Open in Windows Terminal` menu item is present. - Switch to a directory that is located inside a library (e.g. `Libraries > Documents > MyFolder`). - Right click on the background (*not* a subfolder). The menu item no longer appears. ### Expected Behavior For a context menu like this to appear: ![image](https://user-images.githubusercontent.com/2100733/121820769-68ed6780-cc49-11eb-9274-002ad793b2ea.png) ### Actual Behavior A context menu like this appears: ![image](https://user-images.githubusercontent.com/2100733/121820976-9c7cc180-cc4a-11eb-93e6-989ce96b1a53.png) ### Notes - This issue does not occur if the library is accessed through `This PC`, as in `This PC > Documents > MyFolder` - With a registry-based shell extension, I think the solution would be to add a subkey under `HKEY_CLASSES_ROOT\LibraryFolder\background\shell\`, in addition to `HKEY_CLASSES_ROOT\Directory\background\shell\`. I'm not sure how this translates to the COM-based shell extension API.
Author
Owner

@DHowett commented on GitHub (Jun 14, 2021):

Good catch. Thanks!

@DHowett commented on GitHub (Jun 14, 2021): Good catch. Thanks!
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Jun 14, 2021):

On a related note… the Windows Terminal shell extension is available when I right-click the "Libraries" node in the navigation pane, but if I try to use it, I just get an error: "The parameter is incorrect."

@KalleOlaviNiemitalo commented on GitHub (Jun 14, 2021): On a related note… the Windows Terminal shell extension *is* available when I right-click the "Libraries" node in the navigation pane, but if I try to use it, I just get an error: "The parameter is incorrect."
Author
Owner

@zadjii-msft commented on GitHub (Aug 18, 2021):

Filed this upstream at MSFT:35409337. I'm not sure we're ever even getting Invoked in this scenario, so we might not have any chance at hacking our way around this one.

@zadjii-msft commented on GitHub (Aug 18, 2021): Filed this upstream at MSFT:35409337. I'm not sure we're ever even getting `Invoke`d in this scenario, so we might not have _any_ chance at hacking our way around this one.
Author
Owner

@zadjii-msft commented on GitHub (Aug 23, 2021):

On Windows 11, I've seen that this will work when trying a folder inside a library, but not directly within the library itself. For example:
In "Libraries/Pictures"
image

but in Libraries\Pictures\screenshots (which does get resolved to %userprofile%\onedrive\pictures\screenshots):
image


The Explorer team did get back to me on this:

Libraries are not an actual location. They are virtual. They represent a merge of multiple locations. This is why you don't see "open in terminal" at the root of a library. There is not a place to open to in this case. Likewise, once you navigate into a folder within a library, you are now in an actual folder location, which is why you do see the option there.

Therefore, this is working as designed.

So, I guess we're gonna close this one out.

@zadjii-msft commented on GitHub (Aug 23, 2021): On Windows 11, I've seen that this _will_ work when trying a folder _inside_ a library, but not directly within the library itself. For example: In "Libraries/Pictures" ![image](https://user-images.githubusercontent.com/18356694/130502888-1b4886b5-fa92-49e5-b9fe-8b644bd6ea6e.png) but in Libraries\Pictures\screenshots (which does get resolved to %userprofile%\onedrive\pictures\screenshots): ![image](https://user-images.githubusercontent.com/18356694/130502920-e58b5bdc-cd45-4c80-839d-b7af9bd05b1a.png) <hr> The Explorer team did get back to me on this: > Libraries are not an actual location. They are virtual. They represent a merge of multiple locations. This is why you don't see "open in terminal" at the root of a library. There is not a place to open to in this case. Likewise, once you navigate into a folder within a library, you are now in an actual folder location, which is why you do see the option there. > > Therefore, this is working as designed. So, I guess we're gonna close this one out.
Author
Owner

@AlphaModder commented on GitHub (Aug 23, 2021):

@zadjii-msft Are there plans to backport the fix for the case for folders within a library (e.g. Libraries/Pictures/Screenshots) to Windows 10?

@AlphaModder commented on GitHub (Aug 23, 2021): @zadjii-msft Are there plans to backport the fix for the case for folders within a library (e.g. `Libraries/Pictures/Screenshots`) to Windows 10?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14230