Discussion Locked

Enumerate all computers on local subnet

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

Can anyone help here. I am using the API call NetServerEnum to get a list of local computers, but I can only get it to list those computers in my local WORKGROUP. I need to list all computers on the local network regardless of which DOMAIN / WORKGROUP they are in. Any ideas ...?

Thanks

6 replies

by dwayne.terry

You've got a couple of possibilities. You can enumerate servers using WNetOpenEnum and WNetEnumResource.

by lw

I will investigate these calls further. My initial look at them led me to believe they wouldn't help in this case, but I will have another look and get back to you...

by lw

OK, I have looked back at my testing of WNetOpenEnum and find that I could not get it to work in the way I require. Attempting to find all computers results in error code 87 being returned.

I have searched the web and find many references to other people having the same problem, but no solutions...

This seems to be problem in win2K based machines. Stupidly it works on 'client' versions of windows (9x), but not on server versions (2k,xp ,nt4). How bizarre is that, a potentially useful api call for network admins which doesn't work on servers!!??

Any more ideas?

This discussion is closed to new replies.