Skip to content

Instantly share code, notes, and snippets.

@DanTup
Created February 1, 2014 11:28
Show Gist options
  • Save DanTup/8751042 to your computer and use it in GitHub Desktop.
Save DanTup/8751042 to your computer and use it in GitHub Desktop.
Creates "PowerShell Here" shortcuts on context menu for right-clicking folders, blank background space, blank background space in libraries. Preserves default PowerShell colours/settings.
Windows Registry Editor Version 5.00
; Creates "PowerShell Here" shortcuts on context menu for
;
; a) right-clicking on a folder
; b) right-clicking in the blank space when inside a folder (eg. already inside the folder)
; c) right-clicking in the blank space when inside a folder that's inside a library
;
; Uses cmd start to launch normal Powershell shortcut so that the normal PowerShell shortcut
; colours/settings are preserved (blue, not black/white)
; a) right-clicking on a folder
[HKEY_CLASSES_ROOT\Directory\background\shell\powershell]
@="PowerShell Here"
[HKEY_CLASSES_ROOT\Directory\background\shell\powershell\command]
@="cmd.exe /c start powershell -NoExit -Command \"cd '%v'\""
; b) right-clicking in the blank space when inside a folder (eg. already inside the folder)
[HKEY_CLASSES_ROOT\Directory\shell\powershell]
@="PowerShell Here"
[HKEY_CLASSES_ROOT\Directory\shell\powershell\command]
@="cmd.exe /c start powershell -NoExit -Command \"cd '%v'\""
; c) right-clicking in the blank space when inside a folder that's inside a library
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\powershell]
@="PowerShell Here"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\powershell\command]
@="cmd.exe /c start powershell -NoExit -Command \"cd '%v'\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment