---
# System prepended metadata

title: 新增右鍵 以code編輯 之功能

---

# 新增右鍵 以code編輯 之功能

* 先將以下文字複製到 `*.txt` 內

```
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="Put Your VSCode.exe Absolute Path here,0"

[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"Put Your VSCode.exe Absolute Path here\" \"%1\""


[HKEY_CLASSES_ROOT\Directory\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"Put Your VSCode.exe Absolute Path here\",0"

[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
@="\"Put Your VSCode.exe Absolute Path here\" \"%1\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"Put Your VSCode.exe Absolute Path here\",0"

[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
@="\"Put Your VSCode.exe Absolute Path here\" \"%V\""

```
* 確認路徑放置完畢後，將 `*.txt` 重新命名為 `VSCodeRightClick.reg`

![](https://i.imgur.com/RFM7faa.jpg)

