Advertisement
FocusedWolf

Windows 10: Open in Terminal

Jul 12th, 2019
653
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
REG 3.07 KB | None | 0 0
  1. Windows Registry Editor Version 5.00
  2.  
  3. ;
  4. ; This has the latest version: https://stackoverflow.com/a/45469822/490748
  5. ; If you have any issues or requests you can communicate with me there.
  6. ;
  7.  
  8. ; Admin versions.
  9.  
  10. ; Right click on a folder in a directory.
  11. [HKEY_CLASSES_ROOT\Directory\shell\OpenCommandWindowHereAsAdministrator]
  12. @="Open in Terminal (Admin)"
  13. "Icon"="cmd.exe"
  14. "HasLUAShield"=""
  15. "Position"="middle"
  16. [HKEY_CLASSES_ROOT\Directory\shell\OpenCommandWindowHereAsAdministrator\command]
  17. @="cmd.exe /c powershell.exe -Command \"Start-Process cmd -Verb runas -ArgumentList '/k pushd \"%1\"'\""
  18.  
  19. ; Right click on nothing in a directory, i.e. the "background" of the directory.
  20. [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCommandWindowHereAsAdministrator]
  21. @="Open in Terminal (Admin)"
  22. "Icon"="cmd.exe"
  23. "HasLUAShield"=""
  24. "Position"="middle"
  25. [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCommandWindowHereAsAdministrator\command]
  26. @="cmd.exe /c powershell.exe -Command \"Start-Process cmd -Verb runas -ArgumentList '/k pushd \"%V\"'\""
  27.  
  28. ; Right click on nothing in a library directory, i.e. the "background" of the library directory.
  29. [HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\OpenCommandWindowHereAsAdministrator]
  30. @="Open in Terminal (Admin)"
  31. "Icon"="cmd.exe"
  32. "HasLUAShield"=""
  33. "Position"="middle"
  34. [HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\OpenCommandWindowHereAsAdministrator\command]
  35. @="cmd.exe /c powershell.exe -Command \"Start-Process cmd -Verb runas -ArgumentList '/k pushd \"%V\"'\""
  36.  
  37. ; Right click on a file in a directory.
  38. [HKEY_CLASSES_ROOT\*\shell\OpenWithCommandWindowAsAdministrator]
  39. @="Open in Terminal (Admin)"
  40. "Icon"="cmd.exe"
  41. "HasLUAShield"=""
  42. "Position"="middle"
  43. [HKEY_CLASSES_ROOT\*\shell\OpenWithCommandWindowAsAdministrator\command]
  44. @="cmd.exe /c powershell.exe -Command \"Start-Process cmd -Verb runas -ArgumentList '/k pushd \\\"%W \\\" && \\\"%1\\\"'\""
  45.  
  46. ; Non-Admin versions.
  47.  
  48. ; Right click on a folder in a directory.
  49. [HKEY_CLASSES_ROOT\Directory\shell\OpenCommandWindowHere]
  50. @="Open in Terminal"
  51. "Icon"="cmd.exe"
  52. "Position"="middle"
  53. [HKEY_CLASSES_ROOT\Directory\shell\OpenCommandWindowHere\command]
  54. @="cmd.exe /k pushd \"%1\""
  55.  
  56. ; Right click on nothing in a directory, i.e. the "background" of the directory.
  57. [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCommandWindowHere]
  58. @="Open in Terminal"
  59. "Icon"="cmd.exe"
  60. "Position"="middle"
  61. [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCommandWindowHere\command]
  62. @="cmd.exe /k pushd \"%V\""
  63.  
  64. ; Right click on nothing in a library directory, i.e. the "background" of the library directory.
  65. [HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\OpenCommandWindowHere]
  66. @="Open in Terminal"
  67. "Icon"="cmd.exe"
  68. "Position"="middle"
  69. [HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\OpenCommandWindowHere\command]
  70. @="cmd.exe /k pushd \"%V\""
  71.  
  72. ; Right click on a file in a directory.
  73. [HKEY_CLASSES_ROOT\*\shell\OpenWithCommandWindow]
  74. @="Open in Terminal"
  75. "Icon"="cmd.exe"
  76. "Position"="middle"
  77. [HKEY_CLASSES_ROOT\*\shell\OpenWithCommandWindow\command]
  78. @="cmd.exe /k pushd \"%W\" && \"%1\""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement