Windows WMI

Using LDAPMBS to pull all computer names from Active Directory and then using these computer names to pull uptime information.

While I have both processes working, when there is an issue connecting to a particular computer there is a long delay before the connection attempt times out. I cannot figure out how to change the timeout or to more efficiently move on to the next computer after the error state is encountered.

I’m using LDAPMBS to grab the computer names. No problems here.

For uptime gathering, I have tried OLEOBJECT (WMI) and WindowsWMIMBS. Both are working, but I can’t figure out how to get around the long delays that are encountered at times.

For instance, RPC server availability errors.

These delays are encountered when ConnectServer is called
OLE:
objWMIService = locator.Invoke(“ConnectServer”, wmiServiceParams)

WindowsWMIMBS:
if w.ConnectServer("\" + theComputer + “\root\cimv2”) then

Any input is appreciated.

Roughly how long are the delays ?
2 minutes or so ?

Seems you need a way to make them asynchronous
Not sure doing these checks in a thread would make any difference

It seems to be averaging about 20 seconds per each computer where the RPC server is unavailable.

thats probably a timeout that you cant alter
and if you could if you make it to short you’d get false refusals when tere might just be some delay in a response for whatever reason
I’d see about running the queries in an asynch shell where you can start the query and it eventually returns with success or not and doesnt tie up the main UI while its waiting

Thanks. You are probably right.

I’m currently trying to figure out if there isn’t a way to simply check to see if the RPC server is available, rather than assuming that it is and blindly sending queries.

I’m not as much worried about the interface freezing up as I am wasting the time on a query that will obviously fail.

I’m giving up and accepting that this is how it is for now.

Thanks for your help!