Jump to content
Sign in to follow this  

COM error

Recommended Posts


Hi All,

I use nice script to read user properties from Active Directory. There is an input box to put necessary login and password to read AD.

By putting wrong password autoit script returns an error:

Local $objRecordSet = $objCommand.Execute

Local $objRecordSet = $objCommand.Execute^ ERROR

But compiled program returns msgbox with an error:

AutoIt Error

Line -1:

Error: The requested action with this object has failed.

I don't like this msgbox, better way for me is to redirect this error to log file.

Unfortunately in the latest version of AuotiT function Opt("RunErrorsFatal", 0) is removed.

I also don't want to run the program with command line parameter /ErrorStdOut.

How to avoid msgbox with error message in case on wrong login or password?

Thanks for any help.

Share this post

Link to post
Share on other sites

Use COM error handling.

Manual: Obj/COM Reference -> errors

The forum should also have some nice COM error handling examples.

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