martin wrote:
Try to enable logging from the script to see if there are any difference. Also in what environment do you run your C# program? Also have you tried to disable firewall?
I am running this c# app on a Vista box. I did try disabling the firewall (after creating a rule for WinSCP, of course).
I found out what is happening by looking at the log. WinSCP is looking at the /script in the bat file as the host. Therefore, it's looking up a host called script instead of running a script. So if the bat file looks like this:
"c:\Program Files\WinSCP\WinSCP.exe" /console /script=GetSyncFilesPRERelease.txt
the log seems to indicate that it is looking at the /script as the host name. Please advise asap.
Here is the log:
. 2008-10-03 09:24:02.985 --------------------------------------------------------------------------
. 2008-10-03 09:24:02.985 WinSCP Version 4.1.7 (Build 413) (OS 6.0.6001 Service Pack 1)
. 2008-10-03 09:24:02.985 Login time: Friday, October 03, 2008 9:24:02 AM
. 2008-10-03 09:24:02.985 --------------------------------------------------------------------------
. 2008-10-03 09:24:02.985 Session name: script
. 2008-10-03 09:24:02.985 Host name: script (Port: 22)
. 2008-10-03 09:24:02.985 User name: (Password: No, Key file: No)
. 2008-10-03 09:24:02.985 Tunnel: No
. 2008-10-03 09:24:02.985 Transfer Protocol: SFTP (SCP)
. 2008-10-03 09:24:02.985 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2008-10-03 09:24:02.985 Proxy: none
. 2008-10-03 09:24:02.985 SSH protocol version: 2; Compression: No
. 2008-10-03 09:24:02.985 Bypass authentication: No
. 2008-10-03 09:24:02.985 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2008-10-03 09:24:02.985 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2008-10-03 09:24:02.985 SSH Bugs: -,-,-,-,-,-,-,-
. 2008-10-03 09:24:02.985 SFTP Bugs: -,-
. 2008-10-03 09:24:02.985 Return code variable: Autodetect; Lookup user groups: Yes
. 2008-10-03 09:24:02.985 Shell: default, EOL: 0
. 2008-10-03 09:24:02.985 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2008-10-03 09:24:02.985 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2008-10-03 09:24:02.985 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2008-10-03 09:24:02.985 Cache directory changes: Yes, Permanent: Yes
. 2008-10-03 09:24:02.985 DST mode: 1
. 2008-10-03 09:24:02.985 --------------------------------------------------------------------------
. 2008-10-03 09:24:02.985 Looking up host "script"