How to add Windows Terminal to context menu on Windows 10?
Solution 1
There might have been several approaches discussed everywhere, but none of them is up-to-date nor offers flexibility. So I started a new open source project and provided two PowerShell scripts to help.
https://github.com/lextm/windowsterminal-shell
You can run install.ps1
as administrator in PowerShell 7 to easily add the default
layout.
There are other layouts (mini
and flat
at this moment).
Uninstall the menu items are also easy with uninstall.ps1
.
Solution 2
The Win-X Menu shortcuts are stored in %LOCALAPPDATA%\Microsoft\Windows\WinX
and in the Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ShellCompatibility\InboxApp
part of the registry, but the file explorer option is the one that really dictates what happens in the Win-X menu. I do not suggest just adding and changing stuff in the WinX
folder because you could mess things up, however, the winaero.com/comment.php?comment.news.30 app in the link provides a way in which you wouldn't mess it up. Either way, you should put "%programfiles%\WindowsApps\Microsoft.WindowsTerminal_0.11.1121.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe"
in either a shortcut in the WinX folder, or in the app named accordingly.
Comments
-
Steev James almost 2 years
Microsoft released Windows terminal as a Microsoft Store app. How to add it to the context menu or replace 'Open Powershell window here' with it ?
-
alexzshl almost 4 yearsAwesome! The only problem is that, if I update WT, whether the icon will be missing?
-
Lex Li almost 4 years@alexzshl Unless you change profiles, the menu items should continue to work as they bind to version neutral executable path.
-
KUTlime over 3 yearsDespite the fact that this answer is valid, For quite some time, there is a PowerShell module called OpenHere that gives you granular options to control this functionality. All you need is to copy paste this into PowerShell with elevated rights:
Install-Module -Name OpenHere; Import-Module -Name OpenHere
and start to explore theSet-OpenHereShortcut
function. Disclosure: I'm a developer of this module. -
Lex Li over 3 years@KUTlime thanks for sharing but the two are completely different. Your module does not open Windows Terminal, so not for this question.
-
KUTlime over 3 years@LexLi Please, review ReadMe again. It does open Windows Terminal. 😉
-
Lex Li over 3 years@KUTlime then please post your own answer. Our scripts differ significantly. For example, the menu item cmd in the screen shot above does not open cmd.exe but Windows Terminal to wrap cmd.exe. That's not something your script supports.
-
KUTlime over 3 years@LexLi This question is closed and there was no other way to share the knowledge.
-
grt3kl over 3 years@LexLi this is great! It works for me since I can't get the latest Windows updates that include this natively. One question, though - is there any way to modify the behavior so that new terminal sessions open as tabs in an existing session?
-
Blightbuster over 3 yearsThis unfortunately this doesnt seems to work with the Windows Store version. This did the trick for me: github.com/BroJenuel/…
-
Lex Li over 3 years@Blightbuster what’s the error? Or you just want to promote another approach?
-
Blightbuster over 3 yearsI tried your answer which reported no error's but also didnt work. I assumed it was because of github.com/lextm/windowsterminal-shell/issues/43. Since I dont want to switch to another terminal deployment method I keept looking for other solutions. Would have posted it as an alternate aswer but unfortunately this question is closed (not sure why this is considered off-topic...).