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: Running custom commands always leads to error code 2

WinSCP is 32-bit application. In 64-bit Windows, 32-bit applications get redirects to 32-bit C:\Windows\SysWOW64, when they try to access C:\Windows\System32. If you want to access the 64-bit C:\Windows\System32, you need to use C:\Windows\Sysnative.
See also https://winscp.net/eng/docs/integration_putty#win32-openssh
DK

So I found a solution, it sounds dumb I guess, but I just simply copy the ssh.exe to another folder and it seems to have fixed it somehow, oh well, as long as it works I guess.
DK

Re: Running custom commands always leads to error code 2

Now some of the time it says it can't find "ssh" for some reason, but the funny thing is, it still can't find it even after I put the absolute path to it
"C:\Windows\System32\OpenSSH\ssh.exe" !U@!@ -p !# cat !/! | vlc -
DK

Running custom commands always leads to error code 2

So the gist of what I'm trying to do is playing a video with ssh and vlc, to put it simply I need to run:
ssh user@target -p PORT cat FILE | vlc -

all the parameters can be provided by WinSCP using the patterns, I also use the "Local command" and "Use remote files" so that it doesn't download and then run the command.

But after running it, I got error code 2 instead, even though the same exact command works on normal cmd terminal, which confuses me. This is the command I tried to run
ssh !U@!@ -p !# cat !/! | vlc -

the error message or the actual log for that matter only says the same thing which doesn't help at all. Here's what it says

System Error. Code: 2.
The system cannot find the file specified