Terminal: How do I remove the right-click menu "open in Windows terminal"?

Created on 30 Oct 2020  路  7Comments  路  Source: microsoft/terminal

Is it possible to turn this feature on or off with an option?

Area-ShellExtension Issue-Task Product-Terminal

Most helpful comment

@zadjii-msft

I'm curious as to why the context menu isn't working for you - is there a reason you want to be able to disable it?

I cannot speak for others, but I would like to put all _open shell here_ commands in one place. Moreover, I want to enable this for directory background as well.

directory_shell

directory_shell_admin

Why is Windows Terminal not good enough for me?

  • Slow startup: When I only need to execute one command or two, I prefer to run Command Prompt in Win32 Console.
  • Unable to detach tabs and move them between windows.
  • Unable to switch between tabs by mouse scroll (see: MATE Terminal).

All 7 comments

Ah no, we don't have a setting for that currently. Thanks for the request!

I'm curious as to why the context menu isn't working for you - is there a reason you want to be able to disable it?


I'm also terribly worried that we can't control whether this is shown at runtime or not. Maybe in OpenTerminalHere::GetState? We'll probably want to wait till fOkToBeSlow, then load the settings, then check if it's enabled or not.

A workaround was posted in a similar issue:

Add a value named {9f156763-7844-4dc4-b2b1-901f640f5155} to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked and restart explorer. The menu item will be gone. (HKEY_CURRENT_USER works too.)

I'm curious as to why the context menu isn't working for you - is there a reason you want to be able to disable it?

In my case I wanted to remove it because I'm still waiting on a handful of planned Terminal features before I really start using it, so until then it's just clutter.

IMO, removing shell extensions should always be an option. For every app that thinks it's being helpful adding its self to the Explorer context menu there's 10 more that are adding clutter.

That being said, it appears that Terminal is adding the shell extension via the appxmanifest, so I can imagine it's not as simple to provide an opt-out compared to traditional apps. (Maybe setting that HKCU\...\Blocked value is viable? Needing the restart is not the best UX though.)

@rmwxxwmr

Is it possible to turn this feature on or off with an option?

To disable this menu entry, just add the REG_SZ key in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked. As the name, type {9F156763-7844-4DC4-B2B1-901F640F5155}. You don't have to enter any value, but I recommend to use something like WindowsTerminal or so. Then you have to restart Explorer.

Full guide:

  1. Run the following command in an elevated Command Prompt (e.g. Open Menu Start, search for cmd.exe, then right click on Command Prompt and choose Run as administrator:
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" /v "{9F156763-7844-4DC4-B2B1-901F640F5155}" /d "WindowsTerminal"
  1. Restart Explorer.

Alternatively, you can import this Windows Registry file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked]
"{9F156763-7844-4DC4-B2B1-901F640F5155}"="WindowsTerminal"

Disable_WindowsTerminal.reg.txt

Don't forget to restart Explorer.

How did I come up with this?
Search Windows Registry for WindowsTerminal in HKCR (HKEY_CLASSES_ROOT).
Found:

  • HKEY_CLASSES_ROOT\PackagedCom\ClassIndex\{9F156763-7844-4DC4-B2B1-901F640F5155}\Microsoft.WindowsTerminal_1.3.2651.0_x64__8wekyb3d8bbwe
  • HKEY_CLASSES_ROOT\PackagedCom\Package\Microsoft.WindowsTerminal_1.3.2651.0_x64__8wekyb3d8bbwe\Class\{9F156763-7844-4DC4-B2B1-901F640F5155}

You can use similar approach to disable other Microsoft shell extensions, e.g. Skype.

See also:
https://superuser.com/questions/1539765/how-to-remove-share-with-skype-from-the-windows-explorer-context-menu

@zadjii-msft

I'm curious as to why the context menu isn't working for you - is there a reason you want to be able to disable it?

I cannot speak for others, but I would like to put all _open shell here_ commands in one place. Moreover, I want to enable this for directory background as well.

directory_shell

directory_shell_admin

Why is Windows Terminal not good enough for me?

  • Slow startup: When I only need to execute one command or two, I prefer to run Command Prompt in Win32 Console.
  • Unable to detach tabs and move them between windows.
  • Unable to switch between tabs by mouse scroll (see: MATE Terminal).

Your right click menu is so cool

Slow startup: When I only need to execute one command or two, I prefer to run Command Prompt in Win32 Console.

How much of this is attributable to the default profile being PowerShell? You .. know you can change it, right? :smile:

Change the letter "o" to a capital letter, please.
Open in Windows Terminal

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carlos-zamora picture carlos-zamora  路  3Comments

wkbrd picture wkbrd  路  3Comments

miniksa picture miniksa  路  3Comments

mdtauk picture mdtauk  路  3Comments

dev-logan picture dev-logan  路  3Comments