It would really help if you post an exact error message or a log file. Anyway, you are probably looking for
Session.XmlLogPath. But I'm not really sure, if temp file location is the root cause of your problem.
3/4/2014 7:45:51 PM
Error: System.TimeoutException: Timeout waiting for WinSCP to respond - Log file C:\Users\marshg\AppData\Local\Temp\tmpFB19.tmp was not created in time, please make sure WinSCP has write permissions to the folder
at WinSCP.Session.CheckForTimeout(String additional)
at WinSCP.Session.Open(SessionOptions sessionOptions)
at ArmyTADownload.GetTAFiles.Main() in C:\Documents and Settings\marshg\My Documents\Visual Studio 2010\Projects\GetArmyTAs\Get TA Files.vb:line 36
It is clearly the temp file location, and I clearly have permissions to the folder. It is not really a WinSCP problem, but to figure it out, I want to store it outside my profile. When I run it manually, in other words, I'm locally logged onto the server, it works fine, and it worked fine for a long time as a scheduled program.