Advertisement
Inksaver

cmd and powershell context menu

Oct 4th, 2021
2,129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
REG 2.32 KB | None | 0 0
  1. Windows Registry Editor Version 5.00
  2.  
  3. ; Right-click on this file and run as administrator
  4. ; it will add CMD and powershell entries in the windows explorer context menu, both normal and admin
  5. ; This is not my code, but I am unable to locate the original source. Big thanks to the original author.
  6.  
  7. ; Command Prompt
  8.  
  9. [HKEY_CLASSES_ROOT\Directory\shell\01MenuCmd]
  10. "MUIVerb"="Command Prompts"
  11. "Icon"="cmd.exe"
  12. "ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"
  13.  
  14. [HKEY_CLASSES_ROOT\Directory\background\shell\01MenuCmd]
  15. "MUIVerb"="Command Prompts"
  16. "Icon"="cmd.exe"
  17. "ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"
  18.  
  19. [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\open]
  20. "MUIVerb"="Command Prompt"
  21. "Icon"="cmd.exe"
  22.  
  23. [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\open\command]
  24. @="cmd.exe /s /k pushd \"%V\""
  25.  
  26. [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\runas]
  27. "MUIVerb"="Command Prompt Elevated"
  28. "Icon"="cmd.exe"
  29. "HasLUAShield"=""
  30.  
  31. [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\runas\command]
  32. @="cmd.exe /s /k pushd \"%V\""
  33.  
  34.  
  35. ; PowerShell
  36.  
  37. [HKEY_CLASSES_ROOT\Directory\shell\02MenuPowerShell]
  38. "MUIVerb"="PowerShell Prompts"
  39. "Icon"="powershell.exe"
  40. "ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuPowerShell"
  41.  
  42. [HKEY_CLASSES_ROOT\Directory\background\shell\02MenuPowerShell]
  43. "MUIVerb"="PowerShell Prompts"
  44. "Icon"="powershell.exe"
  45. "ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuPowerShell"
  46.  
  47. [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\open]
  48. "MUIVerb"="PowerShell"
  49. "Icon"="powershell.exe"
  50.  
  51. [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\open\command]
  52. @="powershell.exe -noexit -command Set-Location '%V'"
  53.  
  54. [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\runas]
  55. "MUIVerb"="PowerShell Elevated"
  56. "Icon"="powershell.exe"
  57. "HasLUAShield"=""
  58.  
  59. [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\runas\command]
  60. @="powershell.exe -noexit -command Set-Location '%V'"
  61.  
  62.  
  63. ; Ensure OS Entries are on the Extended Menu (Shift-Right Click)
  64.  
  65. [HKEY_CLASSES_ROOT\Directory\shell\cmd]
  66. "Extended"=""
  67.  
  68. [HKEY_CLASSES_ROOT\Directory\background\shell\cmd]
  69. "Extended"=""
  70.  
  71. [HKEY_CLASSES_ROOT\Directory\shell\Powershell]
  72. "Extended"=""
  73.  
  74. [HKEY_CLASSES_ROOT\Directory\background\shell\Powershell]
  75. "Extended"=""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement