vscode添加到右键菜单【适用于 win11,win10系统】

1、新建文件add.reg,(名字可以随便取,后缀得是reg)

2、复制一下代码,到文件中

Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with Code"
"Icon"="E:\\Microsoft VS Code\\Code.exe"
 
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"E:\\Microsoft VS Code\\Code.exe\" \"%1\""
 
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open with Code"
"Icon"="E:\\Microsoft VS Code\\Code.exe"
 
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"E:\\Microsoft VS Code\\Code.exe\" \"%V\""
 
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open with Code"
"Icon"="E:\\Microsoft VS Code\\Code.exe"
 
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"E:\\Microsoft VS Code\\Code.exe""

3、替换“D:\software\Microsoft VS Code”为自己的安装目录【注意:路径分割是双\,如果你是从资源管理器中复制的地址的话是但个\,会出错】

4、保存退出,双击文件图标,运行就可以了

猜你喜欢

转载自blog.csdn.net/weixin_46533797/article/details/121229087