Windows Registry Editor Version 5.00 ; Open files [HKEY_CLASSES_ROOT*shellOpen with VS Code] @="Edit with Code" "Icon"="C:\Program Files\Microsoft VS Code\Code.exe,0" [HKEY_CLASSES_ROOT*shellOpen with VS Codecommand] @=""C:\Program Files\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_ROOTDirectoryshellvscode] @="Open with Code" "Icon"=""C:\Program Files\Microsoft VS Code\Code.exe",0" [HKEY_CLASSES_ROOTDirectoryshellvscodecommand] @=""C:\Program Files\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_ROOTDirectoryBackgroundshellvscode] @="Open with Code" "Icon"=""C:\Program Files\Microsoft VS Code\Code.exe",0" [HKEY_CLASSES_ROOTDirectoryBackgroundshellvscodecommand] @=""C:\Program Files\Microsoft VS Code\Code.exe" "%V""
打开记事本,保存为:vsCodeOpenFolder.reg,双击执行即可