Modify

#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)

comment:1 by HighGuy, on Jun 17, 2010 at 3:32:08 PM

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...")

comment:2 by J-Paul Mesnage, on Jun 27, 2010 at 8:23:06 AM

Owner: set to Jon
Status: newassigned

in reply to:  2 comment:3 by Bowmore, 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 Jon, on Jul 21, 2013 at 11:31:57 PM

Resolution: Rejected
Status: assignedclosed

comment:5 by J-Paul Mesnage, on Oct 16, 2014 at 10:47:46 AM

Working under Windows 8.1

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.