luger

_RunDos Wrong Error

4 posts in this topic

#1 ·  Posted (edited)

Hello, My English is not good. :)

sshot-1.png

#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 by luger

Share this post


Link to post
Share on other sites



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

1 person likes this

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

On 10.01.2017 at 11: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 :)

I wish there was a command giving a detailed result :)

It was difficult to use :)

Thanks for the answer..

Edited by luger

Share this post


Link to post
Share on other sites
18 minutes ago, luger said:

I wish there was a command giving a detailed result :)

Are you referring to the output made by the command?


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now