Skip to content

Instantly share code, notes, and snippets.

@udnaan
Created March 30, 2015 02:04
Show Gist options
  • Save udnaan/420447cb1a6086e17824 to your computer and use it in GitHub Desktop.
Save udnaan/420447cb1a6086e17824 to your computer and use it in GitHub Desktop.
A batch file to add sublime text 3 poartable to context menu
@echo off
set st3=d:\downloads\software\sublimeText3\sublime_text.exe
rem Add to file/*
@reg add "HKEY_CLASSES_ROOT\*\shell\Edit with Sublime Text 3" /t REG_SZ /v "" /d "Edit" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Edit with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Edit with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3% \"%%1\"" /f
rem Add to Dir/*
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open In ST3" /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3%,0" /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3% \"%%1\"" /f
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment