#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)
Changed 9 years ago by PTim
comment:1 Changed 9 years ago by PTim
Please close this bug. A poster on the forum assisted in identifying that the issue is OS related rather than Autoit.
Apologies
comment:2 Changed 9 years ago by BrewManNH
- Resolution set to No Bug
- Status changed from new to closed
comment:3 Changed 9 years ago by anonymous
the forum thread (mentioned above) would be: https://www.autoitscript.com/forum/topic/178468-runwait-behaviour-on-xp-and-w7/
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.
Sample AutoIt test file to show the issue