Created
December 14, 2015 08:29
-
-
Save nhtera/f8e5f4c0e9936f90e90a to your computer and use it in GitHub Desktop.
Open folders and files with Visual Studio Code from windows explorer context menu (tested in Windows 10)
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 | |
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 Visual Studio Code" /t REG_SZ /v "" /d "Open with Visual Studio Code" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Visual Studio Code" /t REG_EXPAND_SZ /v "Icon" /d "%codePath%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Visual Studio Code\command" /t REG_SZ /v "" /d "%codePath% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Visual Studio Code" /t REG_SZ /v "" /d "Open with Visual Studio Code" /f | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Visual Studio Code" /t REG_EXPAND_SZ /v "Icon" /d "%codePath%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Visual Studio 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