Skip to content

Instantly share code, notes, and snippets.

@cecekpawon
Last active October 9, 2018 07:01
Show Gist options
  • Select an option

  • Save cecekpawon/7554b6b8121798bcb32b to your computer and use it in GitHub Desktop.

Select an option

Save cecekpawon/7554b6b8121798bcb32b to your computer and use it in GitHub Desktop.
Add Github Shell To Windows Explorer Context Menu
@echo off
setlocal
set key=HKCR\github-windows\Defaulticon
set newkey=HKCR\Directory\shell\yodgithubhere
set newkeybg=HKCR\Directory\background\shell\yodgithubhere
set str=GitHub.exe
set regtype=REG_SZ
set mylabel=Github here
set success=Keys successfully added
set error=Error key not found
echo ==========================================================================
echo Add Github shell to explorer context menu # @cecekpawon 7:50 AM 8/29/2014
echo --------------------------------------------------------------------------
echo Please run as Administrator
echo Install GitHub GUI Windows (or make sure its already installed)
echo ==========================================================================
for /f "tokens=2,*" %%A IN ('reg query %key% /ve ^| findstr /i %str%') DO set icon=%%B
if defined icon (
reg add %newkey% /v "MUIVerb" /t "%regtype%" /d "%mylabel%" /f
reg add %newkey% /v "Icon" /t "%regtype%" /d "%icon:~0,-2%0" /f
reg add %newkey%\command /ve /t "%regtype%" /d "\"%icon:~0,-3%\" --open-shell=\"%%1\"" /f
reg add %newkeybg% /v "MUIVerb" /t "%regtype%" /d "%mylabel%" /f
reg add %newkeybg% /v "Icon" /t "%regtype%" /d "%icon:~0,-2%0" /f
reg add %newkeybg%\command /ve /t "%regtype%" /d "\"%icon:~0,-3%\" --open-shell=\"%%W\"" /f
echo %success%
) else (
echo %error%
)
pause
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\shell\yodgithubhere]
[-HKEY_CLASSES_ROOT\Directory\background\shell\yodgithubhere]
@GeorgeWL
Copy link
Copy Markdown

GeorgeWL commented Mar 2, 2017

Hola, Am I right in thinking that this little setup will add Github GUI to the right click context menu of Win Explorer?

@cecekpawon
Copy link
Copy Markdown
Author

Not to launch Github GUI, but shell 😄

@4rshdeep
Copy link
Copy Markdown

How to remove that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment