Create a new file and name it:
vscode_context_menu.reg
Paste this content (already adapted to your path)
[code lang="bash"]
Windows Registry Editor Version 5.00
; === Open folder with VS Code ===
[HKEY_CLASSES_ROOT\Directory\shell\Open with Code]
@="Open with Code"
"Icon"="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\""
[HKEY_CLASSES_ROOT\Directory\shell\Open with Code\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""
; === Open folder background with VS Code ===
[HKEY_CLASSES_ROOT\Directory\Background\shell\Open with Code]
@="Open with Code"
"Icon"="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\Open with Code\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""
[/code]
Apply it
-
Double-click the
.regfile -
Click Yes → OK
-
Restart Windows Explorer