luger Posted January 10, 2017 Posted January 10, 2017 (edited) Hello, My English is not good. #include <Process.au3> $Result = _RunDos("a"); Return 0 $Result2 = _RunDos("color a"); Return not 0 MsgBox(0, "Result", $Result) MsgBox(0, "Result", $Result2) There is a mistake here. Rundos_Help->Look Note: @AutoItVersion ;-->v3.3.14.2 Edited January 10, 2017 by luger
TheDcoder Posted January 10, 2017 Posted January 10, 2017 That is because cmd.exe (command prompt) returned 1 (That means the call actually succeeded). Failure only occurs if the process/command was not able to execute, in this case, the command did execute. _RunDos is just a wrapper for cmd.exe (look at the code yourself). That means cmd.exe was successfully executed and therefore there is no failure here, hope I have cleared your doubt luger 1 EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
luger Posted January 11, 2017 Author Posted January 11, 2017 (edited) On 1/10/2017 at 8:55 AM, TheDcoder said: That is because cmd.exe (command prompt) returned 1 (That means the call actually succeeded). Failure only occurs if the process/command was not able to execute, in this case, the command did execute. _RunDos is just a wrapper for cmd.exe (look at the code yourself). That means cmd.exe was successfully executed and therefore there is no failure here, hope I have cleared your doubt Expand I wish there was a command giving a detailed result It was difficult to use Thanks for the answer.. Edited January 11, 2017 by luger
TheDcoder Posted January 11, 2017 Posted January 11, 2017 On 1/11/2017 at 9:25 AM, luger said: I wish there was a command giving a detailed result Expand Are you referring to the output made by the command? EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now