下载地址:VSCode

使用方法

解压到相应目录,同目录下新建一个cmd或bat文件,复制以下内容并保存

REG ADD HKCR\directory\shell\VSCode         /F /t REG_EXPAND_SZ /ve      /d "Open with VC&ode"
REG ADD HKCR\directory\shell\VSCode         /F /t REG_EXPAND_SZ /v Icon  /d "%~dp0\Code.exe"
REG ADD HKCR\directory\shell\VSCode\command /F /t REG_EXPAND_SZ /ve      /d "\"%~dp0\Code.exe\" \"%%V\""
 
REG ADD HKCR\directory\Background\shell\VSCode         /F /t REG_EXPAND_SZ /ve      /d "Open with VC&ode"
REG ADD HKCR\directory\Background\shell\VSCode         /F /t REG_EXPAND_SZ /v Icon  /d "%~dp0\Code.exe"
REG ADD HKCR\directory\Background\shell\VSCode\command /F /t REG_EXPAND_SZ /ve      /d "\"%~dp0\Code.exe\" \"%%V\""
 
REG ADD HKCR\*\shell\VSCode         /F /t REG_EXPAND_SZ /ve     /d "Open with VC&ode"
REG ADD HKCR\*\shell\VSCode         /F /t REG_EXPAND_SZ /v Icon /d "%~dp0\Code.exe"
REG ADD HKCR\*\shell\VSCode\command /F /t REG_EXPAND_SZ /ve     /d "\"%~dp0\Code.exe\" \"%%1\""

set Program=%~dp0\Code.exe
set LnkName=VCode
set Desc=VCode
if not defined WorkDir call:GetWorkDir "%Program%"
(echo Set WshShell=CreateObject("WScript.Shell"^)
echo strDesKtop=WshShell.SpecialFolders("DesKtop"^)
echo Set oShellLink=WshShell.CreateShortcut(strDesKtop^&"\%LnkName%.lnk"^)
echo oShellLink.TargetPath="%Program%"
echo oShellLink.WorkingDirectory="%WorkDir%"
echo oShellLink.WindowStyle=1
echo oShellLink.Description="%Desc%"
echo oShellLink.Save)>makelnk.vbs
makelnk.vbs
del /f /q makelnk.vbs
exit
goto :eof
:GetWorkDir
set WorkDir=%~dp1
set WorkDir=%WorkDir:~,-1%
goto :eof

右键管理员权限执行该批处理即可完成桌面图标和右键菜单的创建

内容查看此隐藏内容查看价格为1元,请先