create a .reg
file with the following:
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,0"
[HKEY_CLASSES_ROOT*\shell\Open with VS Code\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
; 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 Folder in Code"
"Icon"=""%LocalAppData%\Programs\Microsoft VS Code\Code.exe",0"
[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 Folder in Code"
"Icon"=""%LocalAppData%\Programs\Microsoft VS Code\Code.exe",0"
[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