I have a script in a Batch File that works without any problems on my Windows 10 computer, but when I run it on Windows Server 2003R2 I get a confirm dialog about if I really want to connect since the certificate is not known. According to the server host no local certificate is needed to connect and I have not installed any certificate for this on either machine. Since this is suppose to run in the background I can not get the confirm dialog. WinSCP is compatible to Windows Server 2003 so I wonder what the problem might be. I have no problems connecting with the GUI on Windows Server 2003R2. The (test) script is this:
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="FilePath\WinSCP.log" /ini=nul ^
"open ftpes://user:pass@server:port/" ^
"lcd FilePath" ^
"cd in/" ^
"get test.txt" ^
if %WINSCP_RESULT% equ 0 (
) else (
exit /b %WINSCP_RESULT%
For this test I just run the .bat file manually. As you may see this is an Explicit SFTP connection.
I have attached two logs. One for Windows 10 and another one for Windows Server 2003R2.
Can you figure out what is wrong.
Thanks in advance