Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Batch File works on Windows 10 but not on Windows Server 2003R2

As you can see in the log, the server's certificate is not recognized by the Windows certificate store on 2003. Most probably because the store is no longer updated and does not contain a respective root certificate.

You can manually confirm the certificate by adding -certificate switch to the open command:
https://winscp.net/eng/docs/scriptcommand_open#certificate
helm

Batch File works on Windows 10 but not on Windows Server 2003R2

Hi
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:

@echo off


"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="FilePath\WinSCP.log" /ini=nul ^
  /command ^
    "open ftpes://user:pass@server:port/" ^
    "lcd FilePath" ^
    "cd in/" ^
    "get test.txt" ^
    "exit"

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)

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