Advertisement
Guest User

OpenWithSublimeText2.bat

a guest
Sep 4th, 2015
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.92 KB | None | 0 0
  1. # Add "Open with Sublime Text 2" to Windows Explorer Context Menu (including folders)
  2. @echo off
  3. SET st2Path=C:\Program Files\Sublime Text 2\sublime_text.exe
  4.  
  5. rem add it for all file types
  6. @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2"         /t REG_SZ /v "" /d "Open with Sublime Text 2"   /f
  7. @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2"         /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
  8. @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
  9.  
  10. rem add it for folders
  11. @reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2"         /t REG_SZ /v "" /d "Open with Sublime Text 2"   /f
  12. @reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2"         /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
  13. @reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
  14. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement