Search This Blog

Wednesday, September 29, 2021

Windows Terminal - Add to context menu.

Windows Terminal is a windows APP so is a little different than normal programs. I am not an expect but just include this info for some background.

Windows terminal runs a wt.exe

it can be found here..

%LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe


So to do what we want we have to override some settings in the config of the wt.exe. These can be found here.. This may change depending on what version of the windows terminal you  have installed.. I have the preview...

%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState

but could be 

%LOCALAPPDATA%\Packages\Microsoft. WindowsTerminal_8wekyb3d8bbwe\LocalState\

So we need to add this line 

"startingDirectory"null

to the settings.json file...

"profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles.
            "startingDirectory"null
        },


Then we can update the registry to add an entry to the right click context menu.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Open Windows Terminal here"
"ShowBasedOnVelocityId"=dword:00639bc8
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="%LOCALAPPDATA%\\Microsoft\\WindowsApps\\wt.exe"

And now we should be good.. Right click on a folder and there should be an option







Share/Bookmark