I need to find the quickest way to determine if a computer is on the network (by machine name) - currently I use RegOpenKeyEx and if the return isn't ERROR_SUCCESS then I know I can't access the station - this takes around 8 seconds for stations that are NOT on the network.

Now, I was doing some testing today and found some odd results where RegOpenKeyEx did return ERROR_SUCCESS for stations that I am 100% sure are not on the network and that made me start thinking that this might NOT be the best approach for trying to determine if a station is on the network or not - that and 8 seconds is kind of long if I have 20 stations to check (pretty much holds my application hostage for a worst-case-scenario time of 160 seconds).

So I was hoping someone could propose a better, more efficient, more accurate, and quicker solution.

In reality what I need to accomplish is:
- Every 20 minutes check all 20 systems to see if they are on the network and retrieve the value of a specific registry key on the station
- If they are NOT on the network log the fact and continue on to the next

Any help would be much appreciated.
Thanks,