Windows安装vscode后没有右键启动,此时只需要将以下内容保存为run.bat
并且替换相应的vscode安装路径后运行即可添加。
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VSCode]
@="Open with VSCode"
"Icon"="C:\\Users\\zyc12\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VSCode\command]
@="\"C:\\Users\\zyc12\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
@="Open Folder as VSCode Project"
"Icon"="\"C:\\Users\\zyc12\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
@="\"C:\\Users\\zyc12\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe\" \"%1\""
; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]
@="Open Folder as VSCode Project"
"Icon"="\"C:\\Users\\zyc12\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe\",0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
@="\"C:\\Users\\zyc12\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe\" \"%V\""
小于 1 分钟