How to add Windows Terminal to the Windows Explorer context menu as “👩💻 Windows Terminal Here” ❔
The Windows context menu option ‘👩💻 Windows Terminal Here’ is handy to open Windows Terminal from Windows or Windows Explorer, 同时保持相同的路径.
This tutorial assumes that Windows PowerShell is run as default when Windows Terminal is started
- Edit the registry as follows…
启动注册表编辑器
Win键 + R -> regedit -> 单击“确定”
显示在注册表编辑器中的地址栏,如果它尚未显示
查看 -> 地址栏
-
Add the first registry entry to create the icon in the menu…
注册表路径:
HKEY_CLASSES_ROOT\Directory\Background\shell右键单击 shell -> 新建 -> 密钥
命名密钥
Terminal编辑 (默认) 串到
Windows Terminal HereRight click the new key Terminal -> New -> String
Name the new string
IconDownload the Windows Terminal Icon…
Open the Icon string and set the value as follows replacing {path to icon} 用自己的路:
{path to icon}terminal.ico -
添加第二个注册表项
注册表路径:
HKEY_CLASSES_ROOT\Directory\Background\shell\TerminalRight click Terminal -> New -> Key
Name the new key
command在命令, set the value of (默认):
wt -d . -
添加第三注册表项
注册表路径:
HKEY_CLASSES_ROOT\Directory\shell右键单击 shell -> 新建 -> 密钥
命名密钥
Terminal编辑 (默认) 串到
Windows Terminal HereRight click the new key Terminal -> New -> String
Name the new string
Icon设置打开图标和值,如下所示替换 {path to icon} 用自己的路:
{path to icon}terminal.ico -
添加第四注册表项
注册表路径:
HKEY_CLASSES_ROOT\Directory\shell\TerminalRight click Terminal -> New -> Key
In the new command key, 设置默认的值:
wt -d .
上下文菜单现在应该是工作. Right click on the desktop and click Windows Terminal Here. Windows Terminal should open with PowerShell with the present working directory as your desktop.
