winscp script is not started while logged off

Advertisement

Chris L
Guest

winscp script is not started while logged off

Dear all,

I'm having trouble with a winscp script, it is a quite easy one.

the CMD file is starting that:
winscp.exe /console /script=investments_download.txt
(file is located in winscp install dir)

when I execute it manually or while logged in, all works fine.


With System Scheduler Pro I'm starting the cmd file also when logged of - and the CMD file is started successfully, as I log it with echo command into a LOG file, before and after the "winscp.exe /..."

But in fact, WinScp does nothing. I tried with different right settings, different user (sysem user, always as user), I got always the same, the cmd is started fine, but WinScp isn't downloading the files it should...

as the CMD is started, it looks definitefly that the problem is NOT with starting the cmd, just with starting the winscp.exe...

anyone an idea/help?

Reply with quote

Advertisement

Chris L
Guest

yes, as I said, I'm creating with the CMD file already Log's, and this befre and after the command that should execute the WinScp job, and that is done well - so the problem is definitifely not in starting/running the CMD file, it's just in executing the WinScp command (winscp.exe....)

Reply with quote

Chris L
Guest

this is the log file I get:


. 2015-10-08 17:46:02.535 --------------------------------------------------------------------------
. 2015-10-08 17:46:02.535 WinSCP Version 5.7.5 (Build 5665) (OS 6.3.9600 - Windows Server 2012 R2 Datacenter)
. 2015-10-08 17:46:02.535 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2015-10-08 17:46:02.535 Log level: Normal
. 2015-10-08 17:46:02.535 Local account: DOMAIN\administrator
. 2015-10-08 17:46:02.535 Working directory: C:\Program Files (x86)\WinSCP
. 2015-10-08 17:46:02.535 Process ID: 4080
. 2015-10-08 17:46:02.535 Command-line: winscp.exe /console /script=investments_download.txt /log=c:\test\winscp.log
. 2015-10-08 17:46:02.535 Time zone: Current: GMT+2, Standard: GMT+1 (W. Europe Standard Time), DST: GMT+2 (W. Europe Daylight Time), DST Start: 29.03.2015, DST End: 25.10.2015
. 2015-10-08 17:46:02.535 Login time: Donnerstag, 8. Oktober 2015 17:46:02
. 2015-10-08 17:46:02.535 --------------------------------------------------------------------------
. 2015-10-08 17:46:02.536 Script: Retrospectively logging previous script records:
> 2015-10-08 17:46:02.536 Script: open blpdownload_investments
. 2015-10-08 17:46:02.536 --------------------------------------------------------------------------
. 2015-10-08 17:46:02.536 Session name: blpdownload_investments (Ad-Hoc site)
. 2015-10-08 17:46:02.536 Host name: blpdownload_investments (Port: 22)
. 2015-10-08 17:46:02.536 User name: (Password: No, Key file: No)
. 2015-10-08 17:46:02.536 Tunnel: No
. 2015-10-08 17:46:02.536 Transfer Protocol: SFTP (SCP)
. 2015-10-08 17:46:02.536 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2015-10-08 17:46:02.536 Disable Nagle: No
. 2015-10-08 17:46:02.536 Proxy: none
. 2015-10-08 17:46:02.536 Send buffer: 262144
. 2015-10-08 17:46:02.536 SSH protocol version: 2; Compression: No
. 2015-10-08 17:46:02.536 Bypass authentication: No
. 2015-10-08 17:46:02.536 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2015-10-08 17:46:02.536 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2015-10-08 17:46:02.536 KEX: dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN
. 2015-10-08 17:46:02.536 SSH Bugs: A,A,A,A,A,A,A,A,A,A,A,A
. 2015-10-08 17:46:02.536 Simple channel: Yes
. 2015-10-08 17:46:02.536 Return code variable: Autodetect; Lookup user groups: A
. 2015-10-08 17:46:02.536 Shell: default
. 2015-10-08 17:46:02.536 EOL: 0, UTF: 2
. 2015-10-08 17:46:02.536 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2015-10-08 17:46:02.536 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2015-10-08 17:46:02.536 SFTP Bugs: A,A
. 2015-10-08 17:46:02.536 SFTP Server: default
. 2015-10-08 17:46:02.536 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-10-08 17:46:02.536 Cache directory changes: Yes, Permanent: Yes
. 2015-10-08 17:46:02.536 DST mode: 1
. 2015-10-08 17:46:02.536 --------------------------------------------------------------------------
. 2015-10-08 17:46:02.539 Looking up host "blpdownload_investments"

Reply with quote

Advertisement

Chris L
Guest

ok, I just figured out it's a login problem...

how and where do I need to put username/password into the script? the script looks actually like that:

open blpdownload_investments
option transfer binary
get 1equity.csv \\xxxx.xxxx.com\c$\test\
get 1forex.csv \\xxxx.xxxx.com\d$\Data\_to_del\test\
exit


the bat file like this:

echo.script gestartet - %time%>>C:\test\LogFile.txt
winscp.exe /console /script=investments_download.txt /log=c:\test\winscp.log
echo.script durchlaufen - %time%>>C:\test\LogFile.txt


btw. in WinScp GUI I've safed Username and Password...

Reply with quote

Chris L
Guest

sorry, maybe I'm to stupid... Attached you see the "Login - WinSCP" configured site.

Now, how do I have to re-write the script?

actual script:
open blpdownload_investments
option transfer binary
get 1equity.csv \\pichsrv114.pala.com\c$\test\
get 1forex.csv \\pichfs01.pala.com\d$\Data\_to_del\test\
exit
  • winscp.png (17.03 KB, Private file)

Reply with quote

Advertisement

You can post new topics in this forum