Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

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?
Widi

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