新建.reg的文件,复制下面代码,然后运行
D:\软件\VsCode\Microsoft VS Code\Code.exe路径改为自己的,必须是两个 \ 才能生效
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT*shellVSCode] @="Open with Code" "Icon"="D:\软件\VsCode\Microsoft VS Code\Code.exe" [HKEY_CLASSES_ROOT*shellVSCodecommand] @=""D:\软件\VsCode\Microsoft VS Code\Code.exe" "%1"" Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTDirectoryshellVSCode] @="Open with Code" "Icon"="D:\软件\VsCode\Microsoft VS Code\Code.exe" [HKEY_CLASSES_ROOTDirectoryshellVSCodecommand] @=""D:\软件\VsCode\Microsoft VS Code\Code.exe" "%V"" Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTDirectoryBackgroundshellVSCode] @="Open with Code" "Icon"="D:\软件\VsCode\Microsoft VS Code\Code.exe" [HKEY_CLASSES_ROOTDirectoryBackgroundshellVSCodecommand] @=""D:\软件\VsCode\Microsoft VS Code\Code.exe" "%V""