Opened 14 years ago

Closed 11 years ago

Last modified 10 years ago

#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: Severity: None
Keywords: Cc:



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:

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,


Attachments (0)

Change History (5)

comment:1 Changed 14 years ago by HighGuy


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)

While 1
    $line = StderrRead($foo)
    If @error Then ExitLoop
    MsgBox(0, "STDERR read:", $line)

MsgBox(0, "Debug", "Exiting...")

comment:2 follow-up: Changed 14 years ago by Jpm

  • Owner set to Jon
  • Status changed from new to assigned

comment:3 in reply to: ↑ 2 Changed 11 years ago by Bowmore

Replying to Jpm:
I have had a similar problem using StdoutRead on Windows 7 Pro 64bit with Autoit
This code somtimes gets stuck in an infinite loop.

While Not @error
    $line &= StderrRead($foo)

I have found that adding a minimal sleep(), prevents this happening.

While Not @error
    $line &= StderrRead($foo)

I hope this information may be usefull when evaluating this issue.

comment:4 Changed 11 years ago by Jon

  • Resolution set to Rejected
  • Status changed from assigned to closed

comment:5 Changed 10 years ago by Jpm

Working under Windows 8.1

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jon.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.