Jump to content

Do not wait for com object

Recommended Posts

I am working on automating windows updates.

That works great.

however the line, Global $searchresult = $updatesearcher.search("IsInstalled=0 and IsHidden=0 and Type='Software'") takes a lot of time.

Is there a way to execute this line and wait for it to complete in a while loop?

Share this post

Link to post
Share on other sites

I was afraid of that... then the answer I'm guessing is no.  Is there something pressing you must do while that is running?

If it's a GUI thing, then I'd suggest creating a popup that says "still running..." using AdlibRegister() to update it.  I'm not going to guess more, but if it's an object you must use within your script, then you're pretty much stuck waiting for it to be done unless you can utilize AdlibRegister().

If it's just data you're receiving that you want, and you have no further need for the object, then maybe run a second script that writes the data to an ini file, data base, or something similar.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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

  • Create New...