Skip to content

Instantly share code, notes, and snippets.

@willwm
Created November 18, 2017 14:54
Show Gist options
  • Save willwm/de8d39e21f9faac477538ebd056a7c16 to your computer and use it in GitHub Desktop.
Save willwm/de8d39e21f9faac477538ebd056a7c16 to your computer and use it in GitHub Desktop.
Add "Open PowerShell Here" command (with icon) to directory, directory background, and drive context menus.
Windows Registry Editor Version 5.00
; Directory menu
[HKEY_CLASSES_ROOT\Directory\shell\PowershellMenu]
@="Open PowerShell Here"
"NoWorkingDirectory"=""
"Icon"="%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
[HKEY_CLASSES_ROOT\Directory\shell\PowershellMenu\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
; Directory background menu
[HKEY_CLASSES_ROOT\Directory\Background\shell\PowershellMenu]
@="Open PowerShell Here"
"NoWorkingDirectory"=""
"Icon"="%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\PowershellMenu\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
; Drive menu
[HKEY_CLASSES_ROOT\Drive\shell\PowershellMenu]
@="Open PowerShell Here"
"NoWorkingDirectory"=""
"Icon"="%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
[HKEY_CLASSES_ROOT\Drive\shell\PowershellMenu\command]
@="powershell.exe -noexit -command Set-Location '%V'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment