Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save strarsis/1805f42de536dbea11f191e1dfde76aa to your computer and use it in GitHub Desktop.
Save strarsis/1805f42de536dbea11f191e1dfde76aa to your computer and use it in GitHub Desktop.
Registry script to add windows terminal with cmd, powershell and ubuntu profiles to the explorer context menu with normal and admin permissions. To use, replace <Username> with your username
Windows Registry Editor Version 5.00
; Windows terminal
[HKEY_CLASSES_ROOT\Directory\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"
[HKEY_CLASSES_ROOT\Directory\background\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"
[HKEY_CLASSES_ROOT\Directory\LibraryFolder\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"
[HKEY_CLASSES_ROOT\Drive\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"
[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\CMD\shell\open]
"Icon"="imageres.dll,-5323"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\CMD\shell\open\command]
@="C:\\Users\\<Username>\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe -p \"cmd\" -d ."
[HKEY_CLASSES_ROOT\Directory\ContextMenus\CMD\shell\runas]
"HasLUAShield"=""
"MUIVerb"="Sudo"
"Icon"="imageres.dll,-5324"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\CMD\shell\runas\command]
@="cmd.exe /s /c pushd \"%V\" & start wt -p \"cmd\" -d ."
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\CMD]
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\CMD"
"Icon"="imageres.dll,-5323"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Powershell]
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\Powershell"
"Icon"="imageres.dll,-5372"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Ubuntu]
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\Ubuntu"
"Icon"="C:\\Program Files\\WindowsApps\\CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc\\ubuntu.exe"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\Powershell\shell\open]
"Icon"="imageres.dll,-5372"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\Powershell\shell\open\command]
@="C:\\Users\\<Username>\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe -p \"Windows PowerShell\" -d ."
[HKEY_CLASSES_ROOT\Directory\ContextMenus\Powershell\shell\runas]
"HasLUAShield"=""
"MUIVerb"="Sudo"
"Icon"="imageres.dll,-5373"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\Powershell\shell\runas\command]
@="cmd.exe /s /c pushd \"%V\" & start wt -p \"Windows PowerShell\" -d ."
[HKEY_CLASSES_ROOT\Directory\ContextMenus\Ubuntu\shell\open]
"Icon"="C:\\Program Files\\WindowsApps\\CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc\\ubuntu.exe"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\Ubuntu\shell\open\command]
@="C:\\Users\\<Username>\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe -p \"Ubuntu\" -d ."
[HKEY_CLASSES_ROOT\Directory\ContextMenus\Ubuntu\shell\runas]
"HasLUAShield"=""
"MUIVerb"="Sudo"
"Icon"="C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc\ubuntu.exe"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\Ubuntu\shell\runas\command]
@="cmd.exe /s /c pushd \"%V\" & start wt -p \"Ubuntu\" -d ."
Windows Registry Editor Version 5.00
; Windows terminal
[HKEY_CLASSES_ROOT\Directory\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"
[HKEY_CLASSES_ROOT\Directory\background\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"
[HKEY_CLASSES_ROOT\Directory\LibraryFolder\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"
[HKEY_CLASSES_ROOT\Drive\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"
[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"
; Windows Terminal SUDO
[HKEY_CLASSES_ROOT\Directory\shell\MenuWindowsTerminalSudo]
"MUIVerb"="Windows Terminal (Admin)"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminalSudo"
[HKEY_CLASSES_ROOT\Directory\background\shell\MenuWindowsTerminalSudo]
"MUIVerb"="Windows Terminal (Admin)"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminalSudo"
[HKEY_CLASSES_ROOT\Directory\LibraryFolder\shell\MenuWindowsTerminalSudo]
"MUIVerb"="Windows Terminal (Admin)"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminalSudo"
[HKEY_CLASSES_ROOT\Drive\shell\MenuWindowsTerminalSudo]
"MUIVerb"="Windows Terminal (Admin)"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminalSudo"
[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\MenuWindowsTerminalSudo]
"MUIVerb"="Windows Terminal (Admin)"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminalSudo"
; Subcommands
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\CMD]
"MUIVerb"="CMD"
"ExtendedSubCommandsKey"=-
"Icon"="imageres.dll,-5323"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\CMD\command]
@="C:\\Users\\<Username>\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe -p \"Command Prompt\" -d ."
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Powershell]
"MUIVerb"="Windows PowerShell"
"ExtendedSubCommandsKey"=-
"Icon"="imageres.dll,-5372"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Powershell\command]
@="C:\\Users\\<Username>\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe -p \"Windows PowerShell\" -d ."
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Ubuntu]
"MUIVerb"="Ubuntu"
"ExtendedSubCommandsKey"=-
"Icon"="C:\\Program Files\\WindowsApps\\CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc\\ubuntu.exe"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Ubuntu\command]
@="C:\\Users\\<Username>\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe -p \"Ubuntu\" -d ."
; Subcommands Sudo
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\CMD]
"MUIVerb"="CMD"
"HasLUAShield"=""
"Icon"="imageres.dll,-5324"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\CMD]
@="cmd.exe /s /c pushd \"%V\" & start wt -p \"Command Prompt\" -d ."
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Powershell]
"MUIVerb"="Windows PowerShell"
"HasLUAShield"=""
"Icon"="imageres.dll,-5373"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Powershell\command]
@="cmd.exe /s /c pushd \"%V\" & start wt -p \"Windows PowerShell\" -d ."
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Ubuntu]
"MUIVerb"="Ubuntu"
"HasLUAShield"=""
"Icon"="C:\\Program Files\\WindowsApps\\CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc\\ubuntu.exe"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Ubuntu\command]
@="cmd.exe /s /c pushd \"%V\" & start wt -p \"Ubuntu\" -d ."
Windows Registry Editor Version 5.00
; Windows terminal
[-HKEY_CLASSES_ROOT\Directory\shell\MenuWindowsTerminal]
[-HKEY_CLASSES_ROOT\Directory\background\shell\MenuWindowsTerminal]
[-HKEY_CLASSES_ROOT\Directory\LibraryFolder\shell\MenuWindowsTerminal]
[-HKEY_CLASSES_ROOT\Drive\shell\MenuWindowsTerminal]
[-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\MenuWindowsTerminal]
; Windows Terminal SUDO
[-HKEY_CLASSES_ROOT\Directory\shell\MenuWindowsTerminalSudo]
[-HKEY_CLASSES_ROOT\Directory\background\shell\MenuWindowsTerminalSudo]
[-HKEY_CLASSES_ROOT\Directory\LibraryFolder\shell\MenuWindowsTerminalSudo]
[-HKEY_CLASSES_ROOT\Drive\shell\MenuWindowsTerminalSudo]
[-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\MenuWindowsTerminalSudo]
; Subcommands
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\CMD]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\CMD\command]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Powershell]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Powershell\command]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Ubuntu]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Ubuntu\command]
; Subcommands Sudo
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\CMD]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\CMD]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Powershell]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Powershell\command]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Ubuntu]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Ubuntu\command]
[-HKEY_CLASSES_ROOT\Directory\shell\MenuWindowsTerminal]
[-HKEY_CLASSES_ROOT\Directory\LibraryFolder\shell\MenuWindowsTerminal]
[-HKEY_CLASSES_ROOT\Drive\shell\MenuWindowsTerminal]
[-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\MenuWindowsTerminal]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\CMD\shell\open]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\CMD\shell\open\command]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\CMD\shell\runas]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\CMD\shell\runas\command]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Powershell]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Ubuntu]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\Powershell\shell\open]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\Powershell\shell\open\command]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\Powershell\shell\runas]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\Powershell\shell\runas\command]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\Ubuntu\shell\open]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\Ubuntu\shell\open\command]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\Ubuntu\shell\runas]
[-HKEY_CLASSES_ROOT\Directory\ContextMenus\Ubuntu\shell\runas\command]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment