新建一个 .reg 文件
里面的 VSCODE路径换成自己的安装路径
保存为reg文件然后管理员身份运行
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT*shellVSCode]
@="Open with Code"
"Icon"="D:\Microsoft VS Code\Code.exe"
[HKEY_CLASSES_ROOT*shellVSCodecommand]
@=""D:\Microsoft VS Code\Code.exe" "%1""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTDirectoryshellVSCode]
@="Open with Code"
"Icon"="D:\Microsoft VS Code\Code.exe"
[HKEY_CLASSES_ROOTDirectoryshellVSCodecommand]
@=""D:\Microsoft VS Code\Code.exe" "%V""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTDirectoryBackgroundshellVSCode]
@="Open with Code"
"Icon"="D:\Microsoft VS Code\Code.exe"
[HKEY_CLASSES_ROOTDirectoryBackgroundshellVSCodecommand]
@=""D:\Microsoft VS Code\Code.exe" "%V""