-
Codeproject.com - How to Write Windows Shell Extension with .NET Languages
-
Codeproject.com - .NET Shell Extensions - Shell Context Menus
-
Stackoverflow.com - How to add a menu item in Windows right-click menu
-
How to Add & Remove Entries from the Windows Right-Click Menu
-
NirSoft - ShellExView - Disable/enable shell extensions that add
dynamicmenu items of Explorer -
NirSoft - ShellMenuView - Disable/enable
staticcontext menu items of Explorer -
NirSoft - ShellMenuNew - Disable/enable menu items in the
Newsubmenu of Explorer
[HKEY_CLASSES_ROOT\Drive]
[HKEY_CLASSES_ROOT\Folder]
[HKEY_CLASSES_ROOT\Directory]
[HKEY_CLASSES_ROOT\LibraryFolder]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory] - Legacy, Auto write by [HKEY_CLASSES_ROOT]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder] - Legacy, Auto write by [HKEY_CLASSES_ROOT]
SET REGPATH=HKEY_CLASSES_ROOT\Directory\Background\shell\CMDShell
REG ADD "%REGPATH%" /ve /d "CMD Prompt" /f
REG ADD "%REGPATH%\command" /ve /d "cmd.exe /K CD %%1" /f
SET REGPATH=HKEY_CLASSES_ROOT\Folder\shell
REG ADD "%REGPATH%\zzdos" /ve /d "CMD Prompt" /f
REG ADD "%REGPATH%\zzdos\command" /ve /d "cmd.exe /K CD %%1" /f
REM
REG ADD "%REGPATH%\zzexplorer" /ve /d "Open in new window" /f
REG ADD "%REGPATH%\zzexplorer\command" /ve /d "explorer.exe /e,/root,%%L" /f
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
@="Open CMD Here"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd "%V""
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
@="Open CMD Here"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere]
@="Open CMD Here"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere]
@="Open CMD Here"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""
Previous Version
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
@="Open CMD Here"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
@="Open CMD Here"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
@="cmd.exe -noexit -command Set-Location -literalPath '%V'"
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere]
@="Open CMD Here"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere]
@="Open CMD Here"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""
The chere command - official tool
-
Stackoverflow - Open Cygwin at a specific folder
Open a Cygwin terminal as Administrator and type the command: chere -i -t mintty -s bash
Cygwin-Bash-Here Repo
How does it work? It adds a simple command to HKCR\Directory\shell and HKCR\Directory\Background\shell:
C:\cygwin\bin\mintty.exe --dir "%V" -e /bin/env CHERE_INVOKING=1 /bin/bash --login
Open cygwin bash shell from Windows context menu using Windows Registry Table
[HKEY_CLASSES_ROOT\Directory\shell\bash]
@="Open Bash Here"
[HKEY_CLASSES_ROOT\Directory\shell\bash\command]
@="c:\\cygwin\\bin\\mintty.exe bash --login -i -c 'cd \"`cygpath \"$*\"`\";bash' bash %L"
[HKEY_CLASSES_ROOT\Drive\shell\bash]
@="Open Bash Here"
[HKEY_CLASSES_ROOT\Drive\shell\bash\command]
@="c:\\cygwin\\bin\\mintty.exe bash --login -i -c 'cd \"`cygpath \"$*\"`\";bash' bash %L"
BACKGROUND : Add option in the background context menu - This works in Windows 7, but requires the chere package
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash]
@="Open Bash Here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash\command]
@="c:\\cygwin\\bin\\mintty.exe -i /Cygwin-Terminal.ico -e /bin/xhere /bin/bash.exe"
BACKGROUND : Add option in the background context menu - This works in Windows 8, but DONOT requires the chere package
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash]
@="Open Bash Here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash\command]
@="c:\\cygwin\\bin\\mintty.exe -i /Cygwin-Terminal.ico bash -i -c 'cd \"`cygpath \"%V\"`\";bash'
[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell]
[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\bash]
@="Open Bash Here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash\command]
@="c:\\cygwin\\bin\\mintty.exe -i /Cygwin-Terminal.ico bash -i -c 'cd \"`cygpath \"%V\"`\";bash'
Version 1
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_gui]
@="Git &GUI Here"
"Icon"="C:\\Program Files\\Git\\cmd\\git-gui.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_gui\command]
@="\"C:\\Program Files\\Git\\cmd\\git-gui.exe\" \"--working-dir\" \"%v.\""
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell]
@="Git Ba&sh Here"
"Icon"="C:\\Program Files\\Git\\git-bash.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""
Version 2
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_shell\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_gui\command]
@="\"C:\\Program Files\\Git\\cmd\\git-gui.exe\" \"--working-dir\" \"%1\""
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\git_shell\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\git_gui\command]
@="\"C:\\Program Files\\Git\\cmd\\git-gui.exe\" \"--working-dir\" \"%v.\""
Version 3
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\git_gui]
@="Git &GUI Here"
"Icon"="C:\\Program Files\\Git\\cmd\\git-gui.exe"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\git_gui\command]
@="\"C:\\Program Files\\Git\\cmd\\git-gui.exe\" \"--working-dir\" \"%v.\""
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\git_shell]
@="Git Ba&sh Here"
"Icon"="C:\\Program Files\\Git\\git-bash.exe"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\git_shell\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""