Windows为VSCode添加右键菜单
在本地创建一个.reg后缀的文件,文件名test(可自定义)
创建好文件后将其拖到任意一款编辑器当中,添加其内容
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open VSCode Here"
"Icon"="D:\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="D:\\Microsoft VS Code\\Code.exe ."
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open VSCode Here"
"Icon"="D:\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="D:\\Microsoft VS Code\\Code.exe %1"
这里我的VSCode安装在D盘下的Microsoft VS Code目录,可根据你的安装路径进行修改,需要注意其中路径使用\\进行分割,
修改好内容后双击运行test.reg,将其添加入注册表。
可以看到已经添加成功了!