There's no reliable way to do that. For example... If you're talking about only Windows machines, you can try to contact the WMI Service on that machine, IF it'll let you connect to it at all, then ask WMI what the O/S is. Not every machine has a WMI Service running on it though, so it's not a reliable method. The only other way to even attempt to do this is to probe the ports that the machine has listening and try to analyze the measly pieces of information you get from there. Again, a problem arises because of the multitude of firewalls that are now running on all kinds of machines, blocking the very information you need! Add into the mix Linux machines, Macs, ... Basically, what you want to do can't be done...
Dave Kreskowiak Microsoft MVP - Visual Basic