Created
August 28, 2018 07:02
-
-
Save aielwaste/88264281d530662b4c0fee1dd333224a to your computer and use it in GitHub Desktop.
Open all unknown file extensions with Sublime Text
This file contains hidden or 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 | |
Title Reg Converter v1.0 & Color 1A | |
cd %systemroot%\system32 | |
call :IsAdmin | |
Reg.exe add "HKCR\Unknown" /v "AlwaysShowExt" /t REG_SZ /d "" /f | |
Reg.exe add "HKCR\Unknown" /v "QueryClassStore" /t REG_SZ /d "" /f | |
Reg.exe add "HKCR\Unknown" /v "TypeOverlay" /t REG_SZ /d "" /f | |
Reg.exe add "HKCR\Unknown\DefaultIcon" /ve /t REG_EXPAND_SZ /d "%ProgramFiles%\Sublime Text 3\sublime_text.exe,0" /f | |
Reg.exe add "HKCR\Unknown\shell" /ve /t REG_SZ /d "Sublime" /f | |
Reg.exe add "HKCR\Unknown\shell\Sublime Text\command" /ve /t REG_SZ /d "\"%ProgramFiles%\Sublime Text 3\sublime_text.exe\" \"%%1\"" /f | |
Exit | |
:IsAdmin | |
Reg.exe query "HKU\S-1-5-19\Environment" | |
If Not %ERRORLEVEL% EQU 0 ( | |
Cls & Echo You must have administrator rights to continue ... | |
Pause & Exit | |
) | |
Cls | |
goto:eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment