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 -> Click OK
顯示在註冊表編輯器中的地址欄,如果它尚未顯示
View -> Address Bar
-
Add the first registry entry to create the icon in the menu…
註冊表路徑:
HKEY_CLASSES_ROOT\Directory\Background\shellRight click shell -> New -> Key
命名密鑰
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\shellRight click shell -> New -> Key
命名密鑰
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.
