Skip to content

Instantly share code, notes, and snippets.

@Majramos
Created September 6, 2021 14:00
Show Gist options
  • Save Majramos/e38f8d36005fb0628965e31f8897b2c3 to your computer and use it in GitHub Desktop.
Save Majramos/e38f8d36005fb0628965e31f8897b2c3 to your computer and use it in GitHub Desktop.
Add "Open windows terminal here" option to context menu
Windows Registry Editor Version 5.00
;User action
;Download icon: https://github.com/microsoft/terminal/blob/main/res/terminal.ico
[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminal]
@="Open Terminal here"
"Icon"="%USERPROFILE%\\AppData\\Local\\terminal\\terminal.ico"
;User action command
[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminal\command]
@="%LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe -d ."
;Admin action
[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminalAdmin]
@="Open Terminal here (Admin)"
;Show the UAC shield on the action
"HasLUAShield"=""
"Icon"="%USERPROFILE%\\AppData\\Local\\terminal\\terminal.ico"
;Admin action command
[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminalAdmin\command]
@="PowerShell -WindowStyle Hidden -Command \"Start-Process wt -ArgumentList '-d','.' -Verb runAs\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment