Add Sublime Text 3 to the context menu

You can add Sublime Text to the context menu in Windows 10. This allows you to open folders or files directly in Sublime Text 3. All you have to do is to add some registry keys withvthe command prompt.

Just make sure you replace C:\Program Files\Sublime Text 3\sublime_text.exe with the path to Sublime Text as you might be running a portable version or have a different installation directory.

Open an elevated command prompt and run the following commands:

set SUBLIMEDIR=C:\Portable\sublimetext\sublime_text.exe
rem OPEN FILES WITH SUBLIME TEXT
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3"   /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%SUBLIMEDIR%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%SUBLIMEDIR% \"%1\"" /f
rem OPEN FOLDERS WITH SUBLIME TEXT
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3"   /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%SUBLIMEDIR%,0" /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%SUBLIMEDIR% \"%1\"" /f

Now you can open both files and folders in Sublime Text straight from the right-click menu in Windows