'Open in Terminal' not appearing in Windows Explorer context menu #20746

Closed
opened 2026-01-31 07:22:54 +00:00 by claunia · 19 comments
Owner

Originally created by @CodeGenStudio on GitHub (Oct 27, 2023).

Windows Terminal version

1.18.2822.0

Windows build number

10.0.19045.3570

Other Software

No response

Steps to reproduce

No steps, just install, uninstall, reinstall.

Expected Behavior

Right clicking in any folder in Explorer should show 'Open in Terminal'

Actual Behavior

I've installed Terminal from the MS Store as well as via the bundle in the releases page. However, the 'Open in Terminal' option does not appear in Explorer when I right click a folder. I've also install Terminal on another PC and it is showing up there, but not on my current PC.

I've tried following some tutorials to manually add it in regedit but they do not work. If someone can point out on how to go about adding the context menu to Explorer it would be much appreciated, as I can easily load projects into terminal without having to cd to it each time.

Thank you.

Originally created by @CodeGenStudio on GitHub (Oct 27, 2023). ### Windows Terminal version 1.18.2822.0 ### Windows build number 10.0.19045.3570 ### Other Software _No response_ ### Steps to reproduce No steps, just install, uninstall, reinstall. ### Expected Behavior Right clicking in any folder in Explorer should show 'Open in Terminal' ### Actual Behavior I've installed Terminal from the MS Store as well as via the bundle in the releases page. However, the 'Open in Terminal' option does not appear in Explorer when I right click a folder. I've also install Terminal on another PC and it is showing up there, but not on my current PC. I've tried following some tutorials to manually add it in regedit but they do not work. If someone can point out on how to go about adding the context menu to Explorer it would be much appreciated, as I can easily load projects into terminal without having to cd to it each time. Thank you.
Author
Owner

@CodeGenStudio commented on GitHub (Nov 12, 2023):

Hate to be that guy, but I assume this is being looked into during the next phase? (Based on the current tags)

@CodeGenStudio commented on GitHub (Nov 12, 2023): Hate to be that guy, but I assume this is being looked into during the next phase? (Based on the current tags)
Author
Owner

@zadjii-msft commented on GitHub (Nov 13, 2023):

Nope. Backlog is for "things that we should get to eventually, but don't have in a particular milestone". I'm not even sure this is something that we can fix, either. I must've missed the triage meeting where we stuck this on the backlog.

There've been threads about this in the past, where for some reason, the Store & file explorer seem to lose the registration for our shell context menus. It's been terribly unreliable.

There's a very dumb question: have you restarted since re-installing the Terminal/? Explorer is weird about context menu entries sometimes. I think it caches the context menu entries. (taskkill /f /im explorer.exe && explorer.exe might also work without a full reboot)

Other things that might be relevant:

  • Right clicking on the directory background is sorta busted on Windows 10. I believe you need to right click on an actual file.
  • Same thing with directly on drives (e.g. c:\)

If that all doesn't work, we might need you to send feedback using the Feedback Hub and the "Desktop Environment > Right-click context menu" category:
image

If you "share" that feedback here, I can make sure it gets promoted internally

@zadjii-msft commented on GitHub (Nov 13, 2023): Nope. Backlog is for "things that we should get to eventually, but don't have in a particular milestone". I'm not even sure this is something that _we_ can fix, either. I must've missed the triage meeting where we stuck this on the backlog. There've been threads about this in the past, where for some reason, the Store & file explorer seem to lose the registration for our shell context menus. It's been terribly unreliable. There's a very dumb question: have you restarted since re-installing the Terminal/? Explorer is weird about context menu entries sometimes. I think it caches the context menu entries. (`taskkill /f /im explorer.exe && explorer.exe` might also work without a full reboot) Other things that might be relevant: * Right clicking on the directory _background_ is sorta busted on Windows 10. I believe you _need_ to right click on an actual file. * Same thing with directly on drives (e.g. `c:\`) If that all doesn't work, we might need you to send feedback using the Feedback Hub and the "Desktop Environment > Right-click context menu" category: ![image](https://github.com/microsoft/terminal/assets/18356694/db94bd30-8b6f-4b12-92b6-c564a049df2f) If you "share" that feedback here, I can make sure it gets promoted internally
Author
Owner

@CodeGenStudio commented on GitHub (Nov 13, 2023):

I actually did do a restart after re-installing, but that did not do anything. I will retry tho, including the taskkill command as well - if they don't solve this I'll submit a report via Feedback Hub. Either way, I'll make sure to provide an update. Preciate the support

@CodeGenStudio commented on GitHub (Nov 13, 2023): I actually did do a restart after re-installing, but that did not do anything. I will retry tho, including the `taskkill` command as well - if they don't solve this I'll submit a report via Feedback Hub. Either way, I'll make sure to provide an update. Preciate the support
Author
Owner

@zadjii-msft commented on GitHub (Nov 13, 2023):

FWIW, we don't use a .reg file to install these shell extensions. We're leveraging the built-in support in MSIX packages for declaring your shell extensions. I honestly don't know how it gets hooked up from the manifest to the actual context menu. If I did, then it'd be pretty easy to write a script for us to look if we're still even registered

see: d14524cd4c/src/cascadia/CascadiaPackage/Package.appxmanifest (L221-L230)


investigation notes:

Under Computer\HKEY_USERS\S-1-12-1-3854915828-1115607085-215819146-1265292413\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Cached
Value name: {9F156763-7844-4DC4-B2B1-901F640F5155} {A08CE4D0-FA25-44AB-B57C-C7B1C323E0B9} 0xFFFF
reg_binary

01 00 00 00 00 00 00 00 
DD 58 2B 81 77 16 DA 01

That's clearly useless, what's Preview got?


Under Computer\HKEY_USERS\S-1-12-1-3854915828-1115607085-215819146-1265292413\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Cached
Value name: {02DB545A-3E20-46DE-83A5-1329B1E88B6B} {A08CE4D0-FA25-44AB-B57C-C7B1C323E0B9} 0xFFFF
reg_binary

01 00 00 00 00 00 00 00 
E1 45 64 81 77 16 DA 01

more garbage, hmm

@zadjii-msft commented on GitHub (Nov 13, 2023): FWIW, we don't use a .reg file to install these shell extensions. We're leveraging the built-in support in MSIX packages for declaring your shell extensions. I honestly don't know how it gets hooked up from the manifest to the actual context menu. If I did, then it'd be pretty easy to write a script for us to look if we're still even registered see: https://github.com/microsoft/terminal/blob/d14524cd4cc4970bb1b6456f9667e2dd661b9854/src/cascadia/CascadiaPackage/Package.appxmanifest#L221-L230 ---- investigation notes: Under `Computer\HKEY_USERS\S-1-12-1-3854915828-1115607085-215819146-1265292413\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Cached` Value name: `{9F156763-7844-4DC4-B2B1-901F640F5155} {A08CE4D0-FA25-44AB-B57C-C7B1C323E0B9} 0xFFFF` reg_binary ``` 01 00 00 00 00 00 00 00 DD 58 2B 81 77 16 DA 01 ``` That's clearly useless, what's Preview got? ---- Under `Computer\HKEY_USERS\S-1-12-1-3854915828-1115607085-215819146-1265292413\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Cached` Value name: `{02DB545A-3E20-46DE-83A5-1329B1E88B6B} {A08CE4D0-FA25-44AB-B57C-C7B1C323E0B9} 0xFFFF` reg_binary ``` 01 00 00 00 00 00 00 00 E1 45 64 81 77 16 DA 01 ``` more garbage, hmm
Author
Owner

@3052 commented on GitHub (Nov 13, 2023):

OK got it working. first DON'T download the MsixBundle, it does stupid stuff with the installation. the terminal gets installed to some weird folder with extreme security settings. I cant mess with it even as an admin. instead just get the dumb zip file, like this:

https://github.com/microsoft/terminal/releases/download/v1.18.2822.0/Microsoft.WindowsTerminal_1.18.2822.0_x64.zip

extract to wherever, for example:

C:\terminal-1.18.2822.0

then save the below as INSTALL.REG:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\background\shell\terminal\command]
@="C:\\terminal-1.18.2822.0\\WindowsTerminal.exe"

and you can fix the starting folder like this:

{
   "profiles": {
      "defaults": {"startingDirectory": ""}
   }
}

done. Microsoft making stuff WAY harder than it needs to be.

@3052 commented on GitHub (Nov 13, 2023): OK got it working. first DON'T download the MsixBundle, it does stupid stuff with the installation. the terminal gets installed to some weird folder with extreme security settings. I cant mess with it even as an admin. instead just get the dumb zip file, like this: <https://github.com/microsoft/terminal/releases/download/v1.18.2822.0/Microsoft.WindowsTerminal_1.18.2822.0_x64.zip> extract to wherever, for example: ~~~ C:\terminal-1.18.2822.0 ~~~ then save the below as INSTALL.REG: ~~~ Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\background\shell\terminal\command] @="C:\\terminal-1.18.2822.0\\WindowsTerminal.exe" ~~~ and you can fix the starting folder like this: ~~~json { "profiles": { "defaults": {"startingDirectory": ""} } } ~~~ done. Microsoft making stuff WAY harder than it needs to be.
Author
Owner

@DHowett commented on GitHub (Nov 13, 2023):

Two notes about 3052's solution:

  1. It will work for the MSIX version of Terminal if you change the path to %LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe
  2. You do not need to change the global startingDirectory setting if you add -d "%V\." to the commandline. That will reduce the impact of this change to only the launched terminal tab rather than all terminal profiles.
@DHowett commented on GitHub (Nov 13, 2023): Two notes about 3052's solution: 1. It will work for the MSIX version of Terminal if you change the path to `%LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe` 2. You do not need to change the global `startingDirectory` setting if you add ` -d "%V\."` to the commandline. That will reduce the impact of this change to only the launched terminal tab rather than all terminal profiles.
Author
Owner

@DHowett commented on GitHub (Nov 14, 2023):

@3052 Please follow this repository's Code of Conduct.

@DHowett commented on GitHub (Nov 14, 2023): @3052 Please follow this repository's Code of Conduct.
Author
Owner

@DHowett commented on GitHub (Nov 14, 2023):

@DHowett was that really needed? the comment was deleted like an hour ago, for good reason. please dont make trouble where there is none.

Yes, it was. I received two e-mail notifications for two separate comments which have since been deleted. I was willing to let the first one slide, and I am only warning you for the second.

Deleting a comment doesn't really let you un-say whatever was in it.

@DHowett commented on GitHub (Nov 14, 2023): > @DHowett was that really needed? the comment was deleted like an hour ago, for good reason. please dont make trouble where there is none. Yes, it was. I received two e-mail notifications for two separate comments which have since been deleted. **I was willing to let the first one slide,** and I am only warning you for the second. Deleting a comment doesn't really let you un-say whatever was in it.
Author
Owner

@zadjii-msft commented on GitHub (Nov 20, 2023):

@3052 We're waiting for @CodeGenStudio to send feedback on this using the Feedback Hub, so that we can get diagnostics sent to the context menu team. If you're seeing the same issue, then you're also welcome to send feedback in the same way. Clearly, there's a bug in the way explorer populates context menu entries from packaged apps in certain scenarios. We'd love to help that team get to the bottom of it ☺️

@zadjii-msft commented on GitHub (Nov 20, 2023): @3052 We're waiting for @CodeGenStudio to send feedback on this using the Feedback Hub, so that we can get diagnostics sent to the context menu team. If you're seeing the same issue, then you're also welcome to send feedback in the same way. Clearly, there's a bug in the way explorer populates context menu entries from packaged apps in certain scenarios. We'd love to help that team get to the bottom of it ☺️
Author
Owner

@3052 commented on GitHub (Nov 20, 2023):

@zadjii-msft cant you just reproduce the issue yourself? if not, then it makes sense to request this information. my understanding is that this is a known and long standing issue, so we are well past the point of needing to verify that its valid and/or reproducible.

@3052 commented on GitHub (Nov 20, 2023): @zadjii-msft cant you just reproduce the issue yourself? if not, then it makes sense to request this information. my understanding is that this is a known and long standing issue, so we are well past the point of needing to verify that its valid and/or reproducible.
Author
Owner

@zadjii-msft commented on GitHub (Nov 20, 2023):

I sure can't! Hence why I'm asking for help 😉

@zadjii-msft commented on GitHub (Nov 20, 2023): I sure can't! Hence why I'm asking for help 😉
Author
Owner

@CodeGenStudio commented on GitHub (Nov 24, 2023):

After trying all the suggested solutions it still does not work - HOWEVER, the context menu does appear when I right click a directory. Never noticed this until now so I'm not exactly sure which solution at least made this work, if it wasn't working before.

Anyway this is much faster than cd manually, although right clicking in the empty space would be more ideal.

@3052 I understand your frustration but you don't have to be so rude. @zadjii-msft I didn't mean to start trouble, just couldn't find an issue regarding this mentioned previously. Appreciate all the support from you guys till now.

Let me know if you guys have any other suggestions.

EDIT: I have still yet to submit a report via Feedback Hub, forgot about that. will do that and update here

@CodeGenStudio commented on GitHub (Nov 24, 2023): After trying all the suggested solutions it still does not work - HOWEVER, the context menu does appear when I right click a directory. Never noticed this until now so I'm not exactly sure which solution at least made this work, if it wasn't working before. Anyway this is much faster than cd manually, although right clicking in the empty space would be more ideal. @3052 I understand your frustration but you don't have to be so rude. @zadjii-msft I didn't mean to start trouble, just couldn't find an issue regarding this mentioned previously. Appreciate all the support from you guys till now. Let me know if you guys have any other suggestions. EDIT: I have still yet to submit a report via Feedback Hub, forgot about that. will do that and update here
Author
Owner

@zadjii-msft commented on GitHub (Dec 4, 2023):

@3052 Since you're hitting this too, we could always use feedback from you as well. That would be better than posting comments and then deleting them to keep the thread alive.

I firmly suspect that this is an OS-side bug, not something in the Terminal codebase. I further suspect that this is something that was fixed in Windows 11 (since I know there was quite a few bugfixes for the way File Explorer loaded shell extensions in 22000). However, the only way for us to be sure is with logs, that Feedback Hub would capture, that we can then share with the OS shell folks and have them investigate.

HOWEVER, the context menu does appear when I right click a directory

This SPECIFICALLY makes me think what you're seeing here is something like #10119. Honestly, we should probably just de-dupe this to that thread.

  • MSFT:18029514 got backported to Windows 10 in MSFT:29893761, in the 2021.04 C servicing release
@zadjii-msft commented on GitHub (Dec 4, 2023): @3052 Since you're hitting this too, we could always use feedback from you as well. That would be better than posting comments and then deleting them to keep the thread alive. I firmly suspect that this is an OS-side bug, not something in the Terminal codebase. I further suspect that this is something that was fixed in Windows 11 (since I know there was quite a few bugfixes for the way File Explorer loaded shell extensions in 22000). However, the only way for us to be sure is with logs, that Feedback Hub would capture, that we can then share with the OS shell folks and have them investigate. > HOWEVER, the context menu does appear when I right click a directory This SPECIFICALLY makes me think what you're seeing here is something like #10119. Honestly, we should probably just de-dupe this to that thread. <other notes> * MSFT:18029514 got backported to Windows 10 in MSFT:29893761, in the 2021.04 C servicing release
Author
Owner

@3052 commented on GitHub (Dec 4, 2023):

yeah both issues are the same, with the older being over two years old. so hopefully you can understand my frustration when you are still trying to "confirm" the issue. the issue is valid and well known. I am currently using this:

https://github.com/microsoft/terminal/issues/16236#issuecomment-1808992396

but it would be nice if it was properly fixed

@3052 commented on GitHub (Dec 4, 2023): yeah both issues are the same, with the older being over two years old. so hopefully you can understand my frustration when you are still trying to "confirm" the issue. the issue is valid and well known. I am currently using this: https://github.com/microsoft/terminal/issues/16236#issuecomment-1808992396 but it would be nice if it was properly fixed
Author
Owner

@zadjii-msft commented on GitHub (Dec 4, 2023):

I'm not trying to confirm the issue - it's been plenty confirmed. I'm trying to gather diagnostics from users who are repro'ing this bug, so that our internal partners (who aren't reproing it) can try to investigate.

@zadjii-msft commented on GitHub (Dec 4, 2023): I'm not trying to confirm the issue - it's been plenty confirmed. I'm trying to gather diagnostics from users who are repro'ing this bug, so that our internal partners (who aren't reproing it) can try to investigate.
Author
Owner

@3052 commented on GitHub (Dec 4, 2023):

I think time would be better spent in the other issue. its older and has more participants

@3052 commented on GitHub (Dec 4, 2023): I think time would be better spent in the other issue. its older and has more participants
Author
Owner

@zadjii-msft commented on GitHub (Dec 4, 2023):

Yea, that seems sensible here. Let's merge the threads.

/dup #10119

@zadjii-msft commented on GitHub (Dec 4, 2023): Yea, that seems sensible here. Let's merge the threads. /dup #10119
Author
Owner

@danny-dang commented on GitHub (Jul 28, 2024):

I solved this by upgrading to Windows 11, and then download the new Terminal app from Appstore.

@danny-dang commented on GitHub (Jul 28, 2024): I solved this by upgrading to Windows 11, and then download the new Terminal app from Appstore.
Author
Owner

@AAUCrisp commented on GitHub (Nov 20, 2024):

I solved this by upgrading to Windows 11, and then download the new Terminal app from Appstore.

I specifically "downgraded" from Windows 11 on my machine, because of so many things I disliked there.
I seem to be in the minority here, but Windows 11 is almost WinXP unstable, and generally feels sluggish for reasons I can't seem to figure out.
And no... my computer is not ancient (7800X3D, 7900XTX and 32GB 7200MT/s RAM, running off of a PCIe 4.0 M.2)

But yeah.
I have this context menu issue too.
Works when right-clicking folders, but doesn't when using "background click" context menu.

@AAUCrisp commented on GitHub (Nov 20, 2024): > I solved this by upgrading to Windows 11, and then download the new Terminal app from Appstore. I specifically "downgraded" from Windows 11 on my machine, because of **so many** things I disliked there. I seem to be in the minority here, but Windows 11 is almost WinXP unstable, and generally feels sluggish for reasons I can't seem to figure out. And no... my computer is not ancient (7800X3D, 7900XTX and 32GB 7200MT/s RAM, running off of a PCIe 4.0 M.2) But yeah. I have this context menu issue too. Works when right-clicking folders, but doesn't when using "background click" context menu.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20746