Skip to content

Instantly share code, notes, and snippets.

@erm3nda
Created June 13, 2023 22:55
Show Gist options
  • Save erm3nda/07895249eeb574e9f2f92dc637408d34 to your computer and use it in GitHub Desktop.
Save erm3nda/07895249eeb574e9f2f92dc637408d34 to your computer and use it in GitHub Desktop.
Lets you add the proper handler for Directory and Directory\Background types for VS Code
Windows Registry Editor Version 5.00
; Open files [HKEY_CLASSES_ROOT\*\shell\Open with VS Code] @="Edit with VS Code"
"Icon"="%LocalAppData%\\Programs\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"%LocalAppData%\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
@="Open in VS Code"
"Icon"="\"%LocalAppData%\\Programs\\Microsoft VS Code\\Code.exe\""
[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
@="\"%LocalAppData%\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]
@="Open in VS Code"
"Icon"="\"%LocalAppData%\\Programs\\Microsoft VS Code\\Code.exe\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
@="\"%LocalAppData%\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@=hex(2):22,00,25,00,4c,00,6f,00,63,00,61,00,6c,00,41,00,70,00,70,00,44,00,61,\
00,74,00,61,00,25,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,73,00,\
5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,56,00,53,\
00,20,00,43,00,6f,00,64,00,65,00,5c,00,43,00,6f,00,64,00,65,00,2e,00,65,00,\
78,00,65,00,22,00,20,00,22,00,25,00,56,00,22,00,00,00
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@=hex(2):22,00,25,00,4c,00,6f,00,63,00,61,00,6c,00,41,00,70,00,70,00,44,00,61,\
00,74,00,61,00,25,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,73,00,\
5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,56,00,53,\
00,20,00,43,00,6f,00,64,00,65,00,5c,00,43,00,6f,00,64,00,65,00,2e,00,65,00,\
78,00,65,00,22,00,20,00,22,00,25,00,56,00,22,00,00,00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment