Problems receiving output from RunProgram and plink.exe.
Posted: Sat Sep 08, 2012 2:39 pm
I am having an issue receiving any output from plink.exe using PureBasic. If I call the program like so:
Process = RunProgram("C:\plink.exe","-l user -pw password ip_address df -h",GetCurrentDirectory(),#PB_Program_Open | #PB_Program_Read)
Debug ReadProgramString(Process)
Debug ReadProgramError(Process)
It never returns the first line in the debug window. If I call it without commands (no -l, -pw, or IP address) it will return the program's help output, and if I put in the -l and -pw commands it will then give me a request for user or password, but as soon as I make the SSH connection to the server I get nothing at all.
I have a workaround where I run it through cmd.exe and output everything to a text file, but that's hacky and I would rather have more control over the program itself.
Anyone have any ideas?
Process = RunProgram("C:\plink.exe","-l user -pw password ip_address df -h",GetCurrentDirectory(),#PB_Program_Open | #PB_Program_Read)
Debug ReadProgramString(Process)
Debug ReadProgramError(Process)
It never returns the first line in the debug window. If I call it without commands (no -l, -pw, or IP address) it will return the program's help output, and if I put in the -l and -pw commands it will then give me a request for user or password, but as soon as I make the SSH connection to the server I get nothing at all.
I have a workaround where I run it through cmd.exe and output everything to a text file, but that's hacky and I would rather have more control over the program itself.
Anyone have any ideas?
