实现效果如下:

首先创建一个.reg文件,命名为 add_shortcur.reg
内容如下
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with Code"
"Icon"="C:\\Users\\wyy\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"C:\\Users\\wyy\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open with Code"
"Icon"="C:\\Users\\wyy\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"C:\\Users\\wyy\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open with Code"
"Icon"="C:\\Users\\wyy\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"C:\\Users\\wyy\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""
上面的 Code.exe 路径需要替换
本文详细介绍了如何通过创建.reg文件,在Windows中为VSCode设置全局打开快捷方式,包括对目录、背景等操作的个性化配置。
387

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



