Catch the output of PLINK.exe (PUTTY)
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Catch the output of PLINK.exe (PUTTY)
Maybe because of that. I have 850. PeterH, your codepage is?
Edit: Yes, that seems to be the reason...
When I execute it from a system with CP 437 -> No output
Switching back to 850 + restart -> Works
Edit: Yes, that seems to be the reason...
When I execute it from a system with CP 437 -> No output
Switching back to 850 + restart -> Works
One of my scripts helped you out? Please donate via Paypal
-
LittleBiG
- Posts: 1848
- Joined: 08 Apr 2011 12:57
- Location: Win10x64
Re: Catch the output of PLINK.exe (PUTTY)
It seems it is not related only to plink. This doesn't provide anything either:
I have no choice but:
These give the active codepage correctly:text runret("cmd /c chcp", <curpath>);
Code: Select all
run "cmd /k chcp", <curpath>;Code: Select all
run "cmd /c chcp >result.txt", <curpath>;To see the attached files, you need to log into the forum.
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Catch the output of PLINK.exe (PUTTY)
Works fine on a german system with CP 850 
One of my scripts helped you out? Please donate via Paypal
-
LittleBiG
- Posts: 1848
- Joined: 08 Apr 2011 12:57
- Location: Win10x64
Re: Catch the output of PLINK.exe (PUTTY)
Codepage 852, doesn't work either.
-
admin
- Site Admin
- Posts: 66672
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Catch the output of PLINK.exe (PUTTY)
Ha, love it!LittleBiG wrote:It seems it is not related only to plink. This doesn't provide anything either:These give the active codepage correctly:text runret("cmd /c chcp", <curpath>);Code: Select all
run "cmd /k chcp", <curpath>;I have no choice but:Code: Select all
run "cmd /c chcp >result.txt", <curpath>;
Gonna check that codepage issue...
FAQ | XY News RSS | XY X
-
PeterH
- Posts: 2830
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: Catch the output of PLINK.exe (PUTTY)
Sad to say: my CP is 850
-
PeterH
- Posts: 2830
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: Catch the output of PLINK.exe (PUTTY)
And also sad to say: not better with v0010.
By the way: the reason can't be the color codes: if I execute "help" no color codes are returned, but runret() still returns "".
By the way: the reason can't be the color codes: if I execute "help" no color codes are returned, but runret() still returns "".
-
LittleBiG
- Posts: 1848
- Joined: 08 Apr 2011 12:57
- Location: Win10x64
Re: Catch the output of PLINK.exe (PUTTY)
text runret... is still empty. :-(
PeterH, have you tried the simple
without any Linux involved?
PeterH, have you tried the simple
Code: Select all
text runret("cmd /c chcp", <curpath>);-
PeterH
- Posts: 2830
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: Catch the output of PLINK.exe (PUTTY)
Missed that one (here an emoticon for sleeping, instead:LittleBiG wrote:text runret... is still empty. :-(
PeterH, have you tried the simplewithout any Linux involved?Code: Select all
text runret("cmd /c chcp", <curpath>);
You are right: returns "".
It seems Don sees this, too?
-
admin
- Site Admin
- Posts: 66672
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Catch the output of PLINK.exe (PUTTY)
Next beta try this, it will return a hex dump of the raw data in the pipe:
Code: Select all
text runret("cmd /c chcp", , 1);FAQ | XY News RSS | XY X
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Catch the output of PLINK.exe (PUTTY)
With the wrong codepage (437) it still returns nothing...
While on 850 it works fine:
Code: Select all
text quote(runret("cmd /c chcp", , 1));
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 66672
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Catch the output of PLINK.exe (PUTTY)
Well, at least I know now that my own code is not the culprit. Either it's a somehow wrong API call, or Windows itself has an issue here. Needs deeper research. After the weekend... 
FAQ | XY News RSS | XY X
-
LittleBiG
- Posts: 1848
- Joined: 08 Apr 2011 12:57
- Location: Win10x64
Re: Catch the output of PLINK.exe (PUTTY)
Code: Select all
text runret("cmd /c chcp", , 1);-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Catch the output of PLINK.exe (PUTTY)
Without quote()? xDNot even ""
One of my scripts helped you out? Please donate via Paypal
-
LittleBiG
- Posts: 1848
- Joined: 08 Apr 2011 12:57
- Location: Win10x64
Re: Catch the output of PLINK.exe (PUTTY)
yes, without. :-)highend wrote:Without quote()? xDNot even ""
XYplorer Beta Club