tsjippy

Do not wait for com object

7 posts in this topic

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



What kind of value does $searchresult return?


[center]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.[/center]

Share this post


Link to post
Share on other sites

It returns an object, with all pending updates

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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

You can always execute that in another script.  Then loop for the return value.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Thanks for all the replies, I have found out that there is a way to start a asynchronous update searcher, that helped.

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