Modify

Opened 15 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: 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 Changed 15 years ago by HighGuy

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 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 12 years ago by Bowmore

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

Action
as closed The owner will remain Jon.
Author


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

 
Note: See TracTickets for help on using tickets.