把VSCode重新加入右键菜单中,实现Open with Code功能
我们希望能直接快速的找到并使用VSCode的Open with Code功能,在安装的时候没有选择添加到右键菜单中的同学可以使用以下方法。
1、在桌面建立一个add_shortcut.reg文件,注意文件后缀名是 .reg。然后用vscode打开
2.加入以下配置信息:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with Code"
"Icon"="D:\\Programs\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"D:\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open with Code"
"Icon"="D:\\Programs\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"D:\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open with Code"
"Icon"="D:\\Programs\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"D:\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""
而"Icon"= 或部分@ = 后跟着要配置的则是 , 该工具或软件的可执行文件,.exe,此处我们可以看到,我的是路径是
D:\\Programs\\Microsoft VS Code\\Code.exe
3、修改后,保存,然后双击执行
4、右键单击验证,是否存在