教程
简单记录一下:
首先得找到自己安装的VisualStudioCode路径,然后替换下面的配置相应的路径
例如我的VisualStudioCode路径是:
"D:\\Program Files (x86)\\Microsoft VS Code\\Code.exe"

配置图:

创建一个read.reg文件(文件名自定义),在这个文件内替换相应的路径,然后保存,双击运行该文件,即可在相应的注册表中加入。
直接上配置
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with Code"
"Icon"="D:\\Program Files (x86)\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"D:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\"\"%1\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open with Code"
"Icon"="D:\Program Files (x86)\Microsoft VS Code\Code.exe"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"D:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%V\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open with Code"
"Icon"="D:\\Program Files (x86)\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"D:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%V\""
附件
推荐优质文章:https://blog.youkuaiyun.com/weixin_44941576/article/details/124647383
本教程介绍了如何创建一个.reg文件来修改注册表,使得可以通过右键菜单使用VisualStudioCode(VSCode)打开文件和目录。用户需替换示例中的路径以匹配自己的VSCode安装位置,然后运行.reg文件将设置导入到系统注册表。
3078

被折叠的 条评论
为什么被折叠?



