How To Add Sublime Text To Windows Context Menu
Context Menu Saves Our Time As We Can Perform Any Task From There. We Are Going To Add Sublime Text To Context Menu So That It Can Open Any File Type ( Not Only Text Files )
Add Sublime Text To Context Menu
Sublime Text Can Be Added To Sublime Text Using RegEdit ( Registry Editor). We Can Do This Manually Or Using Batch File
Adding Sublime Text To Context Menu Using RegEdit
- Open RegEdit ( Run -> regedit -> ENTER ) or ( Start -> regedit )
- Goto Computer\HKEY_CLASSES_ROOT\*\shell\
- Right Click On shell -> New -> Key And Enter 'Edit with Sublime Text' [The Text Which You Want To Show On Context Menu]
- Right Click On 'Edit with Sublime Text' -> New -> String Value. Set Value Name To 'Icon' And Value Data As Path\FileName Of Sublime Text. In My Case , Installed Path With File Name Of Sublime Text Is 'C:\\Program Files\\Sublime Text\\sublime_text.exe'
- Right Click On 'Edit with Sublime Text' -> New -> Key And Enter 'command'. You Can See There Is A (Default) Value Name. Enter PathWithFieName "%1" In Its Value Data. i.e C:\Program Files\Sublime Text\sublime_text.exe "%1" [Space After sublime_text.exe ]
We Can Also Use Batch File ( Script For Command Prompt) To Add Sublime Text To Context Menu. Open Notepad And Copy Following Code , Save It As ContextMenu.bat . Alternatively You Can Download This File From Here
@echo off
title Add SublimeText To Context Menu
set/p installedpath=Enter SublimeText Installed Path :
set/p contexttext=Enter Context Menu Text :
SET STPath=%installedpath%\sublime_text.exe
@reg add "HKEY_CLASSES_ROOT\*\shell\%contexttext%"
@reg add "HKEY_CLASSES_ROOT\*\shell\%contexttext%" /t REG_SZ /v "Icon" /d "%STPath%" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\%contexttext%\command" /t REG_SZ /v "" /d "%STPath% \"%%1\"" /f
goto done
:done
echo Added To Context Menu
pause
Now Run This File As Administrator And Enter Installed Path & Context Menu Text. Done , Sublime Text Will Be Added To The Context Menu.
Post a Comment