Skip to content

Instantly share code, notes, and snippets.

@zhaopengme
Forked from codewithtyler/OpenPowerShellHere.reg
Created August 31, 2016 07:38
Show Gist options
  • Save zhaopengme/52c97c8e01267373228e2638c22a2129 to your computer and use it in GitHub Desktop.
Save zhaopengme/52c97c8e01267373228e2638c22a2129 to your computer and use it in GitHub Desktop.
Creates a context menu item allowing you to open a PowerShell window in whatever directory you have clicked.
Windows Registry Editor Version 5.00
;
; Add context menu entry to Windows Explorer background
;
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell]
@="Open PowerShell window here"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%V'"
;
; Add context menu entry to Windows Explorer folders
;
[HKEY_CLASSES_ROOT\Directory\shell\powershell]
@="Open PowerShell window here"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\powershell\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%V'"
;
; Add context menu entry to Windows Explorer drive icons
;
[HKEY_CLASSES_ROOT\Drive\shell\powershell]
@="Open PowerShell window here"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Drive\shell\powershell\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%V'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment