I am currently experiencing a problem getting my winScp file exchange to work when the user is not (interactively) logged on. This is a new setup, so it not like it worked, and then stopped working. I have tried to read the troubleshooting information without finding a solution.
I am running 5.1.5 on an Windows Server 2008 R2. I have set up a job in the Task Scheduler running with highest priviliges and configured for Windows 7 and Windows 2008 R2. The action of the task runs a bat file which calls Winscp with an ini file. Based on the result of the WinSCP job I perform certain actions of the files (as described in "Check results" section of the "Scripting and Automation" documentation). The Task Scheduler Job furthermore takes the working directory as "Start In" parameter.
The job runs in an account, having (seemingly) been given the necessary permissions.
The batfile takes an ini file as a parameter for the WinSCP tasks.
Whenever I run this job scheduled or manully via the Task Scheduler it works, provided that the security option on the Task Scheduler job is set to "Run only when user is logged on". As soon as I check the option "Run whether user is logged on or not" the batfile doesn't run. It doesn't even produce a logfile from WinSCP.
I have tried removing the call to WinSCP in the batfile, and then the rest of it works fine, no matter the security option chosen. So the account has access to the directory and to log on as a batch job.
I suspect, that the problem is that the script somehow gets run interactively, which the "Run whether user is logged on or not" does not support (the script windows does pop-up when it runs). But how can I prevent it from running interactively? Is it the way that I put an input to the batfile that creates a problem?
Any inputs, on getting this to work?