Created
June 28, 2022 08:54
-
-
Save sglbl/dbec41151c090c3724f85f2d52b59665 to your computer and use it in GitHub Desktop.
Open Vscode with Wsl Batch File
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
| :: ######################################- batch file from github.com/sglbl -############################################## | |
| chcp 1254 | |
| @echo off | |
| color 04 | |
| title Open VSCode with Wsl option in right click context menu | |
| :: ######################################################################################################################## | |
| set "KeyOfOpeningSpesificFolder=HKCR\Directory\shell\Wsl and VSCode" | |
| REG ADD "%KeyOfOpeningSpesificFolder%" /ve /t REG_EXPAND_SZ /d "Open VSCode with Wsl" | |
| REG ADD "%KeyOfOpeningSpesificFolder%\command" /ve /t REG_EXPAND_SZ /d "wsl --cd \"%%V\" code . " | |
| :: ######################################################################################################################### | |
| set "KeyOfOpeningCurrentFolder=HKCR\Directory\Background\shell\Wsl and VSCode" | |
| REG ADD "%KeyOfOpeningCurrentFolder%" /ve /t REG_EXPAND_SZ /d "Open VSCode with Wsl" | |
| REG ADD "%KeyOfOpeningCurrentFolder%\command" /ve /t REG_EXPAND_SZ /d "wsl --cd \"%%V\" code ." | |
| :: ######################################################################################################################### | |
| pause>nul | |
| exit /b | |
| :: ##########################################Prepared by: Suleyman Golbol#################################################### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment