美文网首页
文件夹右键菜单添加vscode快捷打开

文件夹右键菜单添加vscode快捷打开

作者: 落花僧 | 来源:发表于2020-12-17 21:54 被阅读0次

按win键 查找输入powershell 右键 管理员打开
依次执行如下命令 (将 d:\Programs\Microsoft VS Code\Code.exe 替换为自己的vscode目录)


New-Item ("Registry::HKEY_CLASSES_ROOT\Directory\Background\shell\vscode")  -type String -value 'Open with VScode' 
New-ItemProperty ("Registry::HKEY_CLASSES_ROOT\Directory\Background\shell\vscode") -name "icon" -value "d:\Programs\Microsoft VS Code\Code.exe" -propertyType string
New-Item ("Registry::HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command")  -type String  -value '"d:\Programs\Microsoft VS Code\Code.exe" "%v"' 

删除右键快捷方式

Remove-Item ("Registry::HKEY_CLASSES_ROOT\Directory\Background\shell\vscode")

相关文章

网友评论

      本文标题:文件夹右键菜单添加vscode快捷打开

      本文链接:https://www.haomeiwen.com/subject/jydtnktx.html