Skip to content

Instantly share code, notes, and snippets.

@Reedbeta
Last active August 29, 2021 23:20
Show Gist options
  • Save Reedbeta/d5e7c89ca7f8828777b48ce3d8781e4c to your computer and use it in GitHub Desktop.
Save Reedbeta/d5e7c89ca7f8828777b48ce3d8781e4c to your computer and use it in GitHub Desktop.

Revisions

  1. Reedbeta revised this gist Aug 29, 2021. 1 changed file with 37 additions and 4 deletions.
    41 changes: 37 additions & 4 deletions bash-and-cmd-in-context-menu-wt.reg
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    Windows Registry Editor Version 5.00

    ; Get rid of existing Windows Terminal context menu item
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked]
    "{9F156763-7844-4DC4-B2B1-901F640F5155}"=""

    @@ -15,8 +16,9 @@ Windows Registry Editor Version 5.00
    00,74,00,61,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,\
    74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,41,00,70,00,70,00,73,\
    00,5c,00,77,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,2d,00,70,00,20,00,\
    55,00,62,00,75,00,6e,00,74,00,75,00,20,00,2d,00,64,00,20,00,2e,00,00,00
    ; REG_EXPAND_SZ "%LocalAppData%\Microsoft\WindowsApps\wt.exe" -p Ubuntu -d .
    55,00,62,00,75,00,6e,00,74,00,75,00,20,00,2d,00,64,00,20,00,22,00,25,00,56,\
    00,22,00,00,00
    ; REG_EXPAND_SZ "%LocalAppData%\Microsoft\WindowsApps\wt.exe" -p Ubuntu -d "%V"

    [HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Command Prompt]
    @="Command Prompt"
    @@ -30,5 +32,36 @@ Windows Registry Editor Version 5.00
    74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,41,00,70,00,70,00,73,\
    00,5c,00,77,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,2d,00,70,00,20,00,\
    22,00,43,00,6f,00,6d,00,6d,00,61,00,6e,00,64,00,20,00,50,00,72,00,6f,00,6d,\
    00,70,00,74,00,22,00,20,00,2d,00,64,00,20,00,2e,00,00,00
    ; REG_EXPAND_SZ "%LocalAppData%\Microsoft\WindowsApps\wt.exe" -p "Command Prompt" -d .
    00,70,00,74,00,22,00,20,00,2d,00,64,00,20,00,22,00,25,00,56,00,22,00,00,00
    ; REG_EXPAND_SZ "%LocalAppData%\Microsoft\WindowsApps\wt.exe" -p "Command Prompt" -d "%V"

    [HKEY_CURRENT_USER\Software\Classes\Directory\shell\Bash]
    @="Bash"
    "Icon"=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
    00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
    77,00,73,00,6c,00,2e,00,65,00,78,00,65,00,22,00,00,00
    ; REG_EXPAND_SZ "%SystemRoot%\System32\wsl.exe"

    [HKEY_CURRENT_USER\Software\Classes\Directory\shell\Bash\command]
    @=hex(2):22,00,25,00,4c,00,6f,00,63,00,61,00,6c,00,41,00,70,00,70,00,44,00,61,\
    00,74,00,61,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,\
    74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,41,00,70,00,70,00,73,\
    00,5c,00,77,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,2d,00,70,00,20,00,\
    55,00,62,00,75,00,6e,00,74,00,75,00,20,00,2d,00,64,00,20,00,22,00,25,00,56,\
    00,22,00,00,00
    ; REG_EXPAND_SZ "%LocalAppData%\Microsoft\WindowsApps\wt.exe" -p Ubuntu -d "%V"

    [HKEY_CURRENT_USER\Software\Classes\Directory\shell\Command Prompt]
    @="Command Prompt"
    "Icon"=hex(2):22,00,25,00,43,00,6f,00,6d,00,53,00,70,00,65,00,63,00,25,00,22,\
    00,00,00
    ; REG_EXPAND_SZ "%ComSpec%"

    [HKEY_CURRENT_USER\Software\Classes\Directory\shell\Command Prompt\command]
    @=hex(2):22,00,25,00,4c,00,6f,00,63,00,61,00,6c,00,41,00,70,00,70,00,44,00,61,\
    00,74,00,61,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,\
    74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,41,00,70,00,70,00,73,\
    00,5c,00,77,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,2d,00,70,00,20,00,\
    22,00,43,00,6f,00,6d,00,6d,00,61,00,6e,00,64,00,20,00,50,00,72,00,6f,00,6d,\
    00,70,00,74,00,22,00,20,00,2d,00,64,00,20,00,22,00,25,00,56,00,22,00,00,00
    ; REG_EXPAND_SZ "%LocalAppData%\Microsoft\WindowsApps\wt.exe" -p "Command Prompt" -d "%V"
  2. Reedbeta revised this gist May 1, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bash-and-cmd-in-context-menu-wt.reg
    Original file line number Diff line number Diff line change
    @@ -31,4 +31,4 @@ Windows Registry Editor Version 5.00
    00,5c,00,77,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,2d,00,70,00,20,00,\
    22,00,43,00,6f,00,6d,00,6d,00,61,00,6e,00,64,00,20,00,50,00,72,00,6f,00,6d,\
    00,70,00,74,00,22,00,20,00,2d,00,64,00,20,00,2e,00,00,00
    ; REG_EXPAND_SZ "%LocalAppData%\Microsoft\WindowsApps\wt.exe" -p Ubuntu -d .
    ; REG_EXPAND_SZ "%LocalAppData%\Microsoft\WindowsApps\wt.exe" -p "Command Prompt" -d .
  3. Reedbeta revised this gist May 1, 2021. No changes.
  4. Reedbeta created this gist May 1, 2021.
    34 changes: 34 additions & 0 deletions bash-and-cmd-in-context-menu-wt.reg
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked]
    "{9F156763-7844-4DC4-B2B1-901F640F5155}"=""

    [HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Bash]
    @="Bash"
    "Icon"=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
    00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
    77,00,73,00,6c,00,2e,00,65,00,78,00,65,00,22,00,00,00
    ; REG_EXPAND_SZ "%SystemRoot%\System32\wsl.exe"

    [HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Bash\command]
    @=hex(2):22,00,25,00,4c,00,6f,00,63,00,61,00,6c,00,41,00,70,00,70,00,44,00,61,\
    00,74,00,61,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,\
    74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,41,00,70,00,70,00,73,\
    00,5c,00,77,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,2d,00,70,00,20,00,\
    55,00,62,00,75,00,6e,00,74,00,75,00,20,00,2d,00,64,00,20,00,2e,00,00,00
    ; REG_EXPAND_SZ "%LocalAppData%\Microsoft\WindowsApps\wt.exe" -p Ubuntu -d .

    [HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Command Prompt]
    @="Command Prompt"
    "Icon"=hex(2):22,00,25,00,43,00,6f,00,6d,00,53,00,70,00,65,00,63,00,25,00,22,\
    00,00,00
    ; REG_EXPAND_SZ "%ComSpec%"

    [HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Command Prompt\command]
    @=hex(2):22,00,25,00,4c,00,6f,00,63,00,61,00,6c,00,41,00,70,00,70,00,44,00,61,\
    00,74,00,61,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,\
    74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,41,00,70,00,70,00,73,\
    00,5c,00,77,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,2d,00,70,00,20,00,\
    22,00,43,00,6f,00,6d,00,6d,00,61,00,6e,00,64,00,20,00,50,00,72,00,6f,00,6d,\
    00,70,00,74,00,22,00,20,00,2d,00,64,00,20,00,2e,00,00,00
    ; REG_EXPAND_SZ "%LocalAppData%\Microsoft\WindowsApps\wt.exe" -p Ubuntu -d .