#3162 closed Bug (No Bug)
RunWait command does not return the exit code of the program that was run on XP systems
| Reported by: | PTim | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.14.1 | Severity: | None |
| Keywords: | RunWait; XP | Cc: |
Description
I have observed that the RunWait function does not return the exit code of the program that was run on Windows XP SP3 systems.
It runs fine on Windows 7 SP1.
I have 2 test script samples:
mytest.bat - which will return exit code 99 if "file.exe" is present in the current working directory
Exit1.au3 - which uses the RunWait function to call mytest.bat, and capture the exit code returned in $Result.
$Result is set to 100 prior to calling RunWait.
When the compiled Exit1.exe runs on Windows 7 - the behaviour is as expected - either a 99 or 1 is displayed as the value of $Result.
When the same Exit1.exe runs of Windows XP - $Result is always 0.
I have discussed this on the forum, however there have been no solutions identified to-date.
Thread: RunWait behaviour on XP and W7
I have also observed the same behaviour using the following other functions: ShellExecuteWait and _RunDos.
Attachments (2)
Change History (5)
by , 10 years ago
comment:1 by , 10 years ago
Please close this bug. A poster on the forum assisted in identifying that the issue is OS related rather than Autoit.
Apologies
comment:2 by , 10 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:3 by , 10 years ago
the forum thread (mentioned above) would be: https://www.autoitscript.com/forum/topic/178468-runwait-behaviour-on-xp-and-w7/

Sample AutoIt test file to show the issue