Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continued issues with the shell extension #14185

Open
DHowett opened this issue Oct 11, 2022 · 42 comments
Open

Continued issues with the shell extension #14185

DHowett opened this issue Oct 11, 2022 · 42 comments
Labels
Area-ShellExtension For issues related to the explorer right-click context menu Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Milestone

Comments

@DHowett
Copy link
Member

DHowett commented Oct 11, 2022

I have updated to Terminal Preview 1.16.2641.0 and am still not seeing "Open in Terminal Preview" anywhere except when RMBing on a folder. Does not appear when clicking in the background of a folder, or on the desktop, which both should theoretically be fixed according to the commit

From Win10 20H2

Originally posted by @xenobytezero in #13977 (comment)

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 11, 2022
@DHowett
Copy link
Member Author

DHowett commented Oct 11, 2022

@xenobytezero are you using any other shell extensions, explorer hooks, taskbar replacements etc. that you can think of?

@xenobytezero
Copy link

I actually only noticed this when setting up a new clean work machine, so the amount of customisation is minimal.

The only thing I run of that type is 7+ Taskbar Tweaker, but afaik that doesn't touch the context menu at all.

@lhecker lhecker added Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Area-ShellExtension For issues related to the explorer right-click context menu labels Oct 12, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 12, 2022
@lhecker lhecker removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Oct 12, 2022
@DHowett
Copy link
Member Author

DHowett commented Oct 13, 2022

Ah, thanks. And just to confirm, you really are running 20H1 (build number 19041) and not a newer version?

@xenobytezero
Copy link

I'm running 20H2, version 19042.508.

@DHowett
Copy link
Member Author

DHowett commented Oct 17, 2022

Update 1.15.2874/2875 is rolling out to the store right now; we included a quick fix for a crash in the shell extension that might be causing some trouble. I'm wondering if it helps you too :)

@xenobytezero
Copy link

Updating to 1.15.2874.0 does not appear to have fixed the issue, presenting the same as above.

@zadjii-msft zadjii-msft added this to the Terminal v1.17 milestone Oct 21, 2022
@zadjii-msft
Copy link
Member

@xenobytezero Just to be sure, have you restarted the machine (more specifically, restarted explorer.exe) since the update? Explorer's been known to cache these sorts of things until a restart

@xenobytezero
Copy link

Reasonably sure I had restarted multiple times, but will confirm at the start of the week when I am back in the office.

@xenobytezero
Copy link

Can confirm that multiple restarts does not fix the issue.

@vladhietala
Copy link

I also have this issue, fresh install of windows, connected through azure AD and Intune, heavily limited. I installed Windows Terminal via Winget (because the company limits which apps can be installed via the Windows Store) using both Msstore and Winget sources.

Edition	Windows 10 Enterprise
Version	21H2
Installed on	‎13/‎10/‎2022
OS build	19044.2130
Experience	Windows Feature Experience Pack 120.2212.4180.0
Windows Terminal Preview
Version: 1.16.2641.0
Windows Terminal
Version: 1.15.2874.0

On background:
image

On folder:
image

@vladhietala
Copy link

Tested on another company laptop (W10 Pro 21H2 19044.2251), connected through AD domain, old Windows installation. I installed Terminal from the store and "Open in Terminal" appears OK both in backgound and folder when RMBing.

@zadjii-msft
Copy link
Member

@vladhietala weird question, are both machines using the same language settings?

@vladhietala
Copy link

@vladhietala weird question, are both machines using the same language settings?

Both are in English with some regional settings in Brazilian Portuguese. I'm not sure, but I think the original language of W10Enterprise was Brazilian Portuguese and I change to English in intial configuration. In other hand W10Pro was installed initially in English, because I installed and this was my old working laptop.

@jackthepanisher
Copy link

I have the same issue on a new notebook with a fresh Windows 10 installation. RMB on a folder works but RMB on just the background doesn't show "Open in Terminal". The initial installation was 21H2 but I upgraded to 22H2 recently. Version of Windows Terminal is 1.15.3465.0 but I tried different older versions as well. I use plenty of other systems (VM/non-VM) where it works correctly but I can't find any hint why this does not work on that particular system.

I tried to debug the problem using WinDbg and break into when WindowsTerminalShellExt.dll is loaded from the dllhost process (COM surrogate) created by svchost. All I can observe is that there is no dllhost process created with RMB on the background at the problematic system while on a working system it is created. This can already be seen by just watching all dllhost processes with Process Explorer.

@piomis
Copy link

piomis commented Jan 26, 2023

Same effect on my side (RMB on folder works, RMB on background does not). I have some other extensions install (see screen shot).

image

OS Name: Windows 10 Enterprise
Version: 10.0.19045

Windows Terminal Preview Version: 1.17.1023

@zadjii-msft
Copy link
Member

I'm almost certain that this is just something that was broken in the OS, and fixed in Windows 11. Like, the OS straight up refuses to load for Directory\Background entries. Someone'll need to do some digging through the history to confirm that.... MSFT:28916295 seems to suggest that this should have been fixed and backported though...

@jackthepanisher
Copy link

Not so sure about that. I have multiple systems on Windows 10 that don't have this issue. Only one particular system has this problem.

@zadjii-msft zadjii-msft modified the milestones: Terminal v1.19, Backlog Oct 4, 2023
@diripirate
Copy link

Same problem with 1.19.10302.

When I first installed it, the right click was working ok, but I think that it disappeared after an update of powertoys... But I'm not 100% sure, I tried also uninstalling powertoys and reinstalling terminal but the context menu doesn't come back

@hugo9655
Copy link

hugo9655 commented Feb 8, 2024

I am also having this issue but on LTSC only, specifically Windows 10 IoT Enterprise LTSC 2021, though it might be an issue across all editions. Installing Terminal application should add "open in terminal" to the context menu but does not.

More info: after installing Terminal from MS Store, you have to restart explorer.exe for the context menu to update. After, you will notice the context menu item missing when trying to right click in the current working directory, like the desktop, or by opening a folder and right clicking in the empty space. However, when right clicking a folder, "Open in Terminal" appears.

(adding here since this is the main thread)

@jackthepanisher
Copy link

I run out of patience and upgraded to Windows 11 on my particular system that had this issue. The right-click context menu is now working as expected. This was an in-line upgrade so nothing change regarding the installation of Windows Terminal. Also note that I use multiple other Windows 10 systems as well that don't show this problem.

@queenbiscuit311
Copy link

queenbiscuit311 commented Feb 20, 2024

I am also having this issue but on LTSC only, specifically Windows 10 IoT Enterprise LTSC 2021, though it might be an issue across all editions. Installing Terminal application should add "open in terminal" to the context menu but does not.

More info: after installing Terminal from MS Store, you have to restart explorer.exe for the context menu to update. After, you will notice the context menu item missing when trying to right click in the current working directory, like the desktop, or by opening a folder and right clicking in the empty space. However, when right clicking a folder, "Open in Terminal" appears.

(adding here since this is the main thread)

exact same problem here on ltsc, havent seen this issue on windows 11 or normal windows 10, its just ltsc for me. wonder if its possible to make a workaround of some kind.

@hugo9655
Copy link

I am also having this issue but on LTSC only, specifically Windows 10 IoT Enterprise LTSC 2021, though it might be an issue across all editions. Installing Terminal application should add "open in terminal" to the context menu but does not.
More info: after installing Terminal from MS Store, you have to restart explorer.exe for the context menu to update. After, you will notice the context menu item missing when trying to right click in the current working directory, like the desktop, or by opening a folder and right clicking in the empty space. However, when right clicking a folder, "Open in Terminal" appears.
(adding here since this is the main thread)

exact same problem here on ltsc, havent seen this issue on windows 11 or normal windows 10, its just ltsc for me. wonder if its possible to make a workaround of some kind.

I'm curious to see if this will still be a problem on Win11 LTSC when that releases. I guess we will have to wait and see.

@SkewelVsAll
Copy link

@zadjii-msft I was wondeing - why can't you add a registry workaround for the context menu as an option to toggle on/off through Windows Terminal settings?

@Danipulok
Copy link

Danipulok commented Feb 28, 2024

@zadjii-msft I was wondering - why can't you add a registry workaround for the context menu as an option to toggle on/off through Windows Terminal settings?

Exactly my point. There should be option to add/remove Windows Terminal from context menu (via registry). I really wonder why it's still not done in 2 years, when it's such a simple option.

@SkewelVsAll
Copy link

@zadjii-msft I was wondering - why can't you add a registry workaround for the context menu as an option to toggle on/off through Windows Terminal settings?

Exactly my point. There should be option to add/remove Windows Terminal from context menu (via registry). I really wonder why it's still not done in 2 years, when it's such a simple option.

Yeah and also consider that there's just a year and a half worth of support remaining for Windows 10, either they'll do something to fix it on the Windows 10 context menu or solely focus on improving the application on Windows 11, so the registry workaround seems like a quick effortless one.

@zadjii-msft
Copy link
Member

ryan-point

you know what, having a manual escape hatch button isn't the worst idea. One that just yeets legacy style registrations into the registry. I don't hate that. I'm sure there'd be edge cases - namely, we can't really disable our manifested shell entries. So if you're getting those some of the time, and hit the "just give me the fucking context menu" button, then some of the time you'll see two entries for the Terminal. That's probably fine though - you knew what you were doing.

We discussed as a team yesterday and we're cool with that, if someone wanted to add that1. Probably a toggle on the Interaction page of the settings? Hook it up to the registry instead of the settings model (ala, the default terminal dropdown). Presto, done.

Footnotes

  1. given other team priorities, I'd guestimate that we wouldn't have time to get to this ourselves anytime soon

@SkewelVsAll
Copy link

SkewelVsAll commented Mar 1, 2024

ryan-point

you know what, having a manual escape hatch button isn't the worst idea. One that just yeets legacy style registrations into the registry. I don't hate that. I'm sure there'd be edge cases - namely, we can't really disable our manifested shell entries. So if you're getting those some of the time, and hit the "just give me the fucking context menu" button, then some of the time you'll see two entries for the Terminal. That's probably fine though - you knew what you were doing.

We discussed as a team yesterday and we're cool with that, if someone wanted to add that[^1]. Probably a toggle on the Interaction page of the settings? Hook it up to the registry instead of the settings model (ala, the default terminal dropdown). Presto, done.

That's alright with me, take your time and fix the issues slowly down the line, but I just hope it's fixed before Microsoft pulls the plug on Windows 10 in 2025.

@SkewelVsAll
Copy link

@zadjii-msft Sorry for the inconvenience, but I submitted the Windows Terminal context menu issue through Feedback Hub on my copy of Windows 10 LTSC 2021, so just thought I'd inform you.

@Danipulok
Copy link

Danipulok commented Mar 6, 2024

@SkewelVsAll did you submit only issue or solution via registry too?
If it was solution, please share here too

@SkewelVsAll
Copy link

@SkewelVsAll did you submit only issue or solution via registry too?
If it was solution, please share here too

Nah, only an issue. Whatever registry workarounds I found so far seemed to be temporary and they seemed to have their own set of issues like the icon on the context menu disappearing etc.

If someone can provide a genuine reliable registry workaround it would be the WT team itself, because if you want to add registry entries on your own, it's gonna be a very long and unreliable process because Windows Terminal's installation path is heavily protected for some reason, so yeah the WT team might know why they did this, so it's better if they give us a registry workaround that complies with the same.

@Danipulok
Copy link

@SkewelVsAll, got it, thanks.
So far I did this:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Open in terminal Custom"
"_Icon"="%LOCALAPPDATA%\\Microsoft\\WindowsApps\\wt.ico"

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="wt.exe -d ."

(Icon taken from https://raw.githubusercontent.com/microsoft/terminal/master/res/terminal.ico)
But for some reason it does nothing even with wt.exe command, even though cmd configured pretty similar (cmd.exe /s /k pushd "%V").
So if anyone knows what to put in the command there, please share, so at least people who found this issue know this fix.

Any way @zadjii-msft could help a bit, perhaps?

@jackthepanisher
Copy link

@SkewelVsAll, got it, thanks. So far I did this:
...

This should work as intended using wt.exe -d .. Can you run the wt command normally?

For simplicity, you can also set the icon to C:\windows\system32\cmd.exe which would show the old cmd icon (using "Icon", not "_Icon").

@Danipulok
Copy link

@jackthepanisher, hi. Thanks for trying to help!

What works:

cmd
cd /d D:\Temp
wt.exe -d . (works and opens current dir)
wt -d . (works and opens current dir)

But when I write wt into folder path (as usually done with cmd), it freezes too.
Here's what I mean.

cmd:
image
image
image

wt:
image
It changes wt to this immediately, changes cursor to processing (spinning blue circle), but after 5-10 seconds stops and does nothing...

@jackthepanisher
Copy link

@Danipulok this looks like a different issue to me.

I have installed Win10 LTSC into a virtual environment, updated to build 19044.4046 and installed Windows Terminal 1.19.10573.0. The problem with the right-click menu was reproducible with this setup and I was able to work around it using the registry entry. Putting wt or cmd into the Explorer address bar works without problems there. For reference, $PSVersionTable shows version 5.1.19041.4046 for the Powershell on that system.

@zadjii-msft zadjii-msft added the Help Wanted We encourage anyone to jump in on these. label May 6, 2024
@ledlamp
Copy link

ledlamp commented Oct 7, 2024

Windows 10 IoT Enterprise LTSC no context menu option when I right click a background :( but there is when I right-click a folder

@Cufoon
Copy link

Cufoon commented Nov 21, 2024

OK, keep the feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-ShellExtension For issues related to the explorer right-click context menu Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests