将下面两块代码保存在文本文件里然后保存修改文件后缀为 .reg, 双击运行就可以,注意代码里的路径要修改成自己的
这是设置文件夹空白处右键出现vscode选项:
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="open folder as VSCode"
"Icon"="\"E:\\program\\environment\\Microsoft VS Code\\Code.exe\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\Command]
@="\"E:\\program\\environment\\Microsoft VS Code\\Code.exe\" \"%1\""
这是设置文件夹右键出现vscode选项:
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="open folder as VSCode"
"Icon"="\"E:\\program\\environment\\Microsoft VS Code\\Code.exe\""
[HKEY_CLASSES_ROOT\Directory\Background\VSCode\Command]
@="\"E:\\program\\environment\\Microsoft VS Code\\Code.exe\" \"%1\""