Created
January 14, 2016 01:05
-
-
Save aaronchiang/68817c5b467220cd793b to your computer and use it in GitHub Desktop.
OpenWithVSCode on Windows
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 | |
SET codePath=C:\Program Files (x86)\Microsoft VS Code\code.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with VS Code" /t REG_SZ /v "" /d "Open with VS Code" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with VS Code" /t REG_EXPAND_SZ /v "Icon" /d "%codePath%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command" /t REG_SZ /v "" /d "%codePath% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with VS Code" /t REG_SZ /v "" /d "Open with VS Code" /f | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with VS Code" /t REG_EXPAND_SZ /v "Icon" /d "%codePath%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with VS Code\command" /t REG_SZ /v "" /d "%codePath% \"%%1\"" /f | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment