Opened on May 28, 2010 at 9:01:27 AM
Closed on Jul 21, 2013 at 11:31:57 PM
Last modified on Oct 16, 2014 at 10:47:46 AM
#1650 closed Bug (Rejected)
Problem with Run("psexec", .., $STDERR_CHILD + $STDOUT_CHILD) on Vista 64bit
| Reported by: | HighGuy | Owned by: | Jon |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.6.0 | Severity: | None |
| Keywords: | Cc: |
Description
Hi,
the following code with the current version 1.98 of the Sysinternals tool psexec works fine on my XP SP3 pc but not on my Vista 64bit where it produces a stucked cmd window:
Run("psexec.exe
localhost /acceptEula ipconfig /ALL", "", @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD)
Hint: if i remove the parameters $STDERR_CHILD and $STDOUT_CHILD it will not stuck any more. Starting psexec in a cmd-Shell works fine as well.
Thanks in advance for analyzing this issue,
HighGuy
Attachments (0)
Change History (5)
follow-up: 3 comment:2 by , on Jun 27, 2010 at 8:23:06 AM
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:3 by , on Nov 12, 2012 at 10:57:51 AM
Replying to Jpm:
I have had a similar problem using StdoutRead on Windows 7 Pro 64bit with Autoit 3.3.8.1
This code somtimes gets stuck in an infinite loop.
While Not @error
$line &= StderrRead($foo)
Wend
I have found that adding a minimal sleep(), prevents this happening.
While Not @error
Sleep(10)
$line &= StderrRead($foo)
Wend
I hope this information may be usefull when evaluating this issue.
comment:4 by , on Jul 21, 2013 at 11:31:57 PM
| Resolution: | → Rejected |
|---|---|
| Status: | assigned → closed |

Hi,
I have a further example showing a similar behavior (this time using the Microsoft tool winrs.exe from Windows Remote Management):
#include <Constants.au3> ; The following 2 examples works as supposed ;Local $foo = Run("ipconfig /ALL", "", @SW_MAXIMIZE, $STDERR_CHILD + $STDOUT_CHILD) ;Local $foo = Run("winrs -r:<hostname> ipconfig /ALL", "", @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD) ; The next one not! It turns into an indefinitely loop. Why? Local $foo = Run("winrs -r:<hostname> ipconfig /ALL", "", @SW_MAXIMIZE, $STDERR_CHILD + $STDOUT_CHILD) Local $line While 1 $line = StdoutRead($foo) If @error Then ExitLoop MsgBox(0, "STDOUT read:", $line) Wend While 1 $line = StderrRead($foo) If @error Then ExitLoop MsgBox(0, "STDERR read:", $line) Wend MsgBox(0, "Debug", "Exiting...")