xshell和xftp关联自动联动


问题描述

当我们找好免安装版xshell和xftp的时候,点击xshell的ftp按钮无法自动弹出xftp的界面,或者弹出命令行ftp界面,使用上比较不方便,如下图:

处理方案

这时候我们需要将xshell和xftp进行关联,只需要在Xftp.exe当前目录下执行如下命令,添加xftp到注册表中

reg add "HKLM\SOFTWARE\Classes\.xfp" /f /ve /d "Xftp.xfp" >NUL 2>NUL
reg add "HKLM\SOFTWARE\Classes\.xts" /f /ve /d "Xtransport.xts" >NUL 2>NUL
reg add "HKLM\SOFTWARE\Classes\Xftp.xfp\DefaultIcon" /f /ve /d "%~dp0Xftp.exe,0" >NUL 2>NUL
reg add "HKLM\SOFTWARE\Classes\Xftp.xfp\shell\open\command" /f /ve /d "\"%~dp0Xftp.exe\" \"%%1\"" >NUL 2>NUL
reg add "HKLM\SOFTWARE\Classes\Xtransport.xts\shell\open\command" /f /ve /d "\"%~dp0Xtransport.exe\" -f \"%%1\"" >NUL 2>NUL
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Xftp.exe" /f /ve /d "%~dp0Xftp.exe" >NUL 2>NUL

来源:

https://blog.csdn.net/jiuzuidongpo/article/details/122488604