Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add Sublime Text to contextual menu without Admin Privileges on Windows

I do not have administrator privileges at office and I would like to add Sublime Text to contextual menu to edit easily my files such as Notepad++. Is it possible? I've only found how to add it with Administrators privileges

enter image description here

like image 997
elmigue017 Avatar asked Dec 02 '25 20:12

elmigue017


1 Answers

Often we do not have administrator privileges at office on our PC, so some weeks ago I found a useful guide to add Sublime to the contextual menu.

First you need create a new text document with any text editor, copy and paste the below script, save it on your desktop with .bat extension

@reg add "HKEY_CURRENT_USER\Software\Classes\*\shell\Open with Sublime Text 3"         /t REG_SZ /v "" /d "Open with Sublime Text 3"   /f
@reg add "HKEY_CURRENT_USER\Software\Classes\*\shell\Open with Sublime Text 3"         /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CURRENT_USER\Software\Classes\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f

Keep in mind that you must replace %st3Path% with your current SublimeText directory, e.g: C:/Tools/sublime/sublimetext.exe

Double-click on that file to apply the settings. Now you can see Sublime in the context menu.

On the other hand we may need to remove Sublime from contextual menu, for to do that you can use the following script, and repeat the same steps above:

@reg delete  "HKEY_CURRENT_USER\Software\Classes\*\shell\Open with Sublime Text 3\command" /f >nul 2>&1
@reg delete  "HKEY_CURRENT_USER\Software\Classes\*\shell\Open with Sublime Text 3" /f >nul 2>&1

Or if you prefer, here's the script ready to use it: SublimeText-ContextualMenu.bat

like image 182
JUAN CALVOPINA M Avatar answered Dec 05 '25 21:12

JUAN CALVOPINA M



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!