Skip to content

Instantly share code, notes, and snippets.

@kmantel
kmantel / add_wterm.bat
Created June 17, 2020 08:22
Creates a context menu shortcut for launching Windows Terminal in the current directory from explorer
@echo off
echo You must add "startingDirectory": "." to your Windows Terminal profile ^
settings or this will not work.
echo(
set winterm_path="\"%LocalAppData%\Microsoft\WindowsApps\wt.exe\""
reg add HKCR\Directory\Background\shell\winterm\command
reg add HKCR\Directory\Background\shell\winterm\command /ve /t REG_EXPAND_SZ /d %winterm_path%
reg add HKCR\Directory\Background\shell\winterm\ /ve /t REG_EXPAND_SZ /d "Open Windows Terminal here"