Windows 编程:简单的 SFTP 传输应用程序
我以前从未开发过 Windows 应用程序。我现在需要一个简单的应用程序,它将向具有特定扩展名的文件添加上下文菜单。当您单击上下文菜单时,应用程序将通过 sftp 连接到远程 Linux 服务器,要求提供凭据,并在身份验证成功后将所选文件传输到服务器。
该应用程序需要与 Windows XP 及以上版本兼容。
我可以使用哪种语言/平台来快速开发这个应用程序?我需要什么工具?如何注册上下文菜单项?我将如何分配它?
任何指导方针都会有帮助。
I've never worked on a Windows application before. I now need a simple application that will add a context menu to files with a specific extension. When you click the context menu, the application will connect to a remote linux server via sftp, ask for credentials and upon successful authentication, transfer the selected file to the server.
The application needs to be compatible with Windows XP onwards.
Which language / platform can I use to quickly develop this application? What tools do I need? How do I register the context menu item? And how would I distribute it?
Any guidelines would help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要一个 shell 扩展和一个执行实际传输工作的应用程序。 shell 扩展将仅使用参数启动应用程序。
对于 shell 扩展,C++ 是一个自然的选择。使用 .NET 进行 shell 扩展可能会导致多次讨论的不同问题。
对于应用程序,您几乎可以使用任何东西 - .NET 和 C++ 存在 SFTP 客户端组件(主要是 ActiveX 控件)。不过,我不推荐 Java - 对于像您这样的小程序来说,它是相当重量级的。
You need a shell extension and an application that will do the actual transfer job. The shell extension will just start the application with parameters.
For shell extensions C++ is a natural choice. Use of .NET for shell extensions can cause different problems discussed many times.
For an application you can use virtually anything - SFTP client components exist for .NET and for C++ (mainly ActiveX controls). I would not recommend Java though - it is quite heavyweight for a small program such as yours.
要创建上下文菜单条目: 使用 VB6 创建 COM-ShellExtension。这个仅在选择文件时调用上传应用程序。
要进行上传:只需从 COM 应用程序调用命令行 sftp 客户端,然后让它进行上传。我想到了 CopSSH,但我不知道他们是否有 sftp。
To create the context menu entry: Create a COM-ShellExtension with VB6. This one just calls the upload app when a file is selected.
To do the upload: Just call a command line sftp client from your COM app, and let this do the upload. CopSSH comes to mind, but I don't know if they hae sftp on board.
我相信您可以在 codeproject 的“Microsoft All-In-One Code Framework”页面找到几乎所有您需要的内容;它似乎记录了如何执行您所要求的操作,假设我正确理解您想要在资源管理器中创建上下文菜单。
http://www.codeproject.com/KB/dotnet/CSShellExtContextMenuHand.aspx
编辑:澄清;这是针对 .NET 解决方案的,我在首页上看到的示例是 c#
i believe you can find almost everything you need at codeproject's "Microsoft All-In-One Code Framework" page; it seems to document how to do what you're asking assuming i understood correctly that you want to create a context menu in explorer.
http://www.codeproject.com/KB/dotnet/CSShellExtContextMenuHand.aspx
edit: to clarify; this is for a .NET solution, the examples i saw on the front page are c#