WinSCP, VB.NET, Windows 7

Advertisement

Widi
Guest

WinSCP, VB.NET, Windows 7

Hello
I try to get any files from a server with SFTP. The first problem i have: i can't running the WinSCP in hidden mode. It does not work with Windwos 7?

I work with WinSCP 4.2.9
Windows 7 32bit
VB.NET 2008

Code:

With winscp.StartInfo
' SFTPExecutable needs to be defined in app.config to point to winscp.com
Try
'.FileName = AppSettings("SFTPExecutable")
'.FileName = "winscp.com"
.FileName = "D:\Programme\WinSCP\WinSCP.exe"
If .FileName Is Nothing OrElse .FileName.Length = 0 Then Throw (New Exception("from PutSFTP: SFTPExecutable not set in config file."))
Catch ex As Exception
errmsg = ex.Message
Return False
End Try
.Arguments = "/log=" + logname
.UseShellExecute = False
.RedirectStandardInput = True
.RedirectStandardOutput = True
.CreateNoWindow = True
End With
Try
winscp.Start()
Catch ex As Exception
errmsg = "from PutSFTP: Could not run the WinSCP executable " & winscp.StartInfo.FileName & Environment.NewLine & ex.Message
Return False
End Try

After winscp.Start WinSCP is open in a new window. What can i do?

Thanks for your help

Reply with quote

Advertisement

Guest

Re: WinSCP, VB.NET, Windows 7

SFTPExecutable needs to be defined in app.config to point to winscp.com

Please explain how to do this?

Reply with quote

Advertisement

You can post new topics in this forum