Sign in to follow this  
Followers 0

Reading value returned by VB .exe

2 posts in this topic

Dear AutoItians,

I am a newbie to AutoIT and would like your help on this:

I have a Visual Basic exe that returns a value (a return code) to indicate success/failure, how do I read this return value in my script? Should I use @error?

Here's the VB code of exe:

Function Main() As Integer

Return returnValue

End Function

As per Microsoft: "Other programs can test this code by examining the Windows ERRORLEVEL value"

Thank you very much,


Share this post

Link to post
Share on other sites

#2 ·  Posted (edited)



Runs an external program and pauses script execution until the program finishes.

RunWait ( "filename" [, "workingdir" [, flag]] )


filename The name of the executable (EXE, BAT, COM, PIF) to run.

workingdir [optional] The working directory.

flag [optional] The "show" flag of the executed program:

@SW_HIDE = Hidden window

@SW_MINIMIZE = Minimized window

@SW_MAXIMIZE = Maximized window

Return Value

Success: Returns the exit code of the program that was run.

Failure: Depends on RunErrorsFatal; see Remarks.

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
Live for the present,
Dream of the future,
Learn from the past.

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
Sign in to follow this  
Followers 0