Created
February 7, 2018 04:52
-
-
Save uisuru/e1a89f6d401a3edbfaa7370b5ed562fb to your computer and use it in GitHub Desktop.
Sublime Text 3 Context menu item deletion batch files with admin permission
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit) | |
rem delete it for all file types | |
@reg delete "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /f | |
@reg delete "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /f | |
rem delete it for folders | |
@reg delete "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3\command" /f | |
@reg delete "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /f | |
rem delete it for folder background | |
@reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\Open with Sublime Text 3 Here\command" /f | |
@reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\Open with Sublime Text 3 Here" /f | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment