Topic "WinSCP, VB.NET, Windows 7"

Author Message
Widi

Guest


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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
What are you trying to do actually? Do you want to use scripting? Have you read the scripting guide?
http://winscp.net/eng/docs/guide_automation
_________________
Martin Prikryl
Guest




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


Please explain how to do this?
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License