Opened 16 years ago

Closed 16 years ago

#344 closed Bug (Wont Fix)

RunAs + StdxxxRead doesn't work as expected on XP SP1 and XP RTM

Reported by: DaveF Owned by: Valik
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


When running a script like this one:

Dim $ourProcess, $ourOutput
; No output on STDOUT @ rev 3244 - 3372
$ourProcess = RunAs("chump", @ComputerName, "tolchock", 1, @ComSpec & " /c dir", @SystemDir, @SW_HIDE, 2)

While 1
    $ourOutput &= StdoutRead($ourProcess)
    $ourError = @error
    MsgBox(0, "Debug", "@error returned: " & $ourError & ", @extended (chars read) is: " & @extended)
    If $ourError Then ExitLoop
MsgBox(0, "STDOUT output:", "[" & @AutoItVersion & "]" & @CRLF & $ourOutput)

...on Windows XP RTM and XP SP1, no output is returned to StdoutRead and the child console window is briefly visible, seemingly in disregard of the flags provided in the RunAs function.

In Windows XP SP2 and Server 2003 SP2 output is returned as desired to StdoutRead and the console window is correctly hidden.

The test environments between the OS versions were as close as I could make them to identical, in that I was running as an Administrator, the RunAs user existed and had access to the test files. A matching test script using the Run function with STDOUT redirection worked as expected on all tested OS versions.

Attachments (0)

Change History (2)

comment:1 Changed 16 years ago by Valik

  • Owner set to Valik
  • Status changed from new to accepted

comment:2 Changed 16 years ago by Valik

  • Resolution set to Wont Fix
  • Status changed from accepted to closed

This is a bug in Windows. See for details and a hotfix. Closing as wont fix since I can't fix this in AutoIt.

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

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

Note: See TracTickets for help on using tickets.