Skip to content

Instantly share code, notes, and snippets.

@nhthai2005
Last active June 28, 2021 05:37
Show Gist options
  • Save nhthai2005/dfa75ecd50bacc90afdb4f997bb57b1a to your computer and use it in GitHub Desktop.
Save nhthai2005/dfa75ecd50bacc90afdb4f997bb57b1a to your computer and use it in GitHub Desktop.
Add Sublime Text to your context menu on right click
@echo off
SET sublimeTextPath=D:\opt\sublime_text_build_4107_x64\sublime_text.exe
REM ADD REGISTRY KEYS
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text" /t REG_SZ /v "" /d "Open with Sublime Text" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text" /t REG_EXPAND_SZ /v "Icon" /d "%sublimeTextPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text\command" /t REG_SZ /v "" /d "%sublimeTextPath% \"%%1\"" /f
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment