admin wrote:Too bad. Gotta stop here. So, SC runret is Win8 and later only from now on.
Catch the output of PLINK.exe (PUTTY)
-
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)
-
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)
Sure. That's just my way to refuel my tanks. Stating in public that it's impossible gives my some magic extra power to solve a problem. Freaky, but I've done it before.highend wrote:While I understand that this must be frustrating, cutting off the support for systems older than Win 8 can't be the final solution. In that case the command gets unusable (apart for your own personal scripts) because I don't think that 99% of the userbase migrated to Win 8 +
FAQ | XY News RSS | XY X
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Catch the output of PLINK.exe (PUTTY)
Oh, really? You can never write a complete CEA system within the year.admin wrote:Stating in public that it's impossible gives my some magic extra power to solve a problem. Freaky, but I've done it before.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
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)
Works only when I state it myself. 
FAQ | XY News RSS | XY X
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Catch the output of PLINK.exe (PUTTY)
How about that?admin wrote:I can never write a complete CEA system within the year.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
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)
Black magic!
What forces will it stir up? 
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)
Gz! Works on Win 7 x64 (CP: 850 + 437). Do I need to test it with all other Win versions / bitnesses / codepages or can I safely assume that it'll work flawlessly?! SC runret: Issue on Windows XP, Vista, Windows 7. Fix attempt #6.
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)
Ah, finally!
You know, there are thousands of examples for this in C++, C#, VB.net, VB whatever... I read and did everything and apparently nothing works (in < Win8)!
Now I simply ported that AHK code you posted (which is quite different from all those other examples in the web) and, bingo, it works!
Weird and beautiful!
PS: No need to test other versions (since you already tested the AHK way on them, right?)
You know, there are thousands of examples for this in C++, C#, VB.net, VB whatever... I read and did everything and apparently nothing works (in < Win8)!
Now I simply ported that AHK code you posted (which is quite different from all those other examples in the web) and, bingo, it works!
Weird and beautiful!
PS: No need to test other versions (since you already tested the AHK way on them, right?)
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)
Yepp. In the meantime on Win 8 as well. Just to make sure xD(since you already tested the AHK way on them, right?)
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)
I still cannot believe that runret never worked for < win8. Is that really so?
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)
It is...
14.10.0113 (this version got runret())
15.00.0500
16.00.0200
None of these versions produced an output on Win 7 x64
14.10.0113 (this version got runret())
15.00.0500
16.00.0200
None of these versions produced an output on Win 7 x64
One of my scripts helped you out? Please donate via Paypal
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: Catch the output of PLINK.exe (PUTTY)
runret worked on Win 7 under some conditions ever since it was introduced.
Using the same versions as highend and
dir always returned something.
chcp did not.
Using the same versions as highend and
Code: Select all
goto 'C:\';text runret('cmd /c dir');text runret('cmd /c chcp');chcp did not.
Various Info wrote:OS: Windows 7 Professional (Service Pack 1), 64-bit (6.1)
System Locale ID: 1033 (en-US)
Thread Locale ID: 1033 (en-US)
Default ANSI Code Page: 1252 (ANSI - Latin I)
Active ANSI Code Page: 1252 (ANSI - Latin I)
Default OEM code page: 437 (OEM - United States)
Active OEM Code Page: 437 (OEM - United States)
Is DBCS Code Page: No
-
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)
It gets weirder and weirder.
Can other Win7 users confirm this? (Who knows what other factors play a role here...)
Can other Win7 users confirm this? (Who knows what other factors play a role here...)
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)
OK: it's magic
As I see it: runret worked before, and I have used it sometimes.
It seems that there were a few commands making problems. The first was plink.exe, and the other chcp. While all others that I've tried seemed to have worked OK.
To me it seems that the originating program has different ways to output the data. And there seem to be some cases that led runret *not* to receive it as wanted.
It's not just the command - it's even what it does. For plink.exe normal output could not be received. But if you called plink.exe with wrong parameters the errormsg *was* received by runret.
Magic:

As I see it: runret worked before, and I have used it sometimes.
It seems that there were a few commands making problems. The first was plink.exe, and the other chcp. While all others that I've tried seemed to have worked OK.
To me it seems that the originating program has different ways to output the data. And there seem to be some cases that led runret *not* to receive it as wanted.
It's not just the command - it's even what it does. For plink.exe normal output could not be received. But if you called plink.exe with wrong parameters the errormsg *was* received by runret.
Magic:
-
LittleBiG
- Posts: 1848
- Joined: 08 Apr 2011 12:57
- Location: Win10x64
Re: Catch the output of PLINK.exe (PUTTY)
Now runret with plink.exe works as expected. I am really happy, thanks. I have started to use this just recently, so I cannot say anything about the before.
XYplorer Beta Club