Accessing Win32 hardware
| From: | Geoff A. Virgo | Date: | Thu, 08 Nov 2001 19:00:26 +0000 |
| Subject: | Accessing Win32 hardware | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-549@lists.php.net to get a copy of this message | ||
Hi all,
I'm in the initial design phase of an application designed to aid network admin/help desk staff in keeping track of the hardware and drivers installed in the machines on their network. The idea is to create a app which polls the machines on a specified subnet and gathers the information each box returns on it's hardware config. This info will be stored in a database of some sort, most likely MySQL. I've got 3 quick questions related to this idea.
1. How would I determine what are active IP's on the subnet? It'd obviously be kinda inefficient to have to probe all IP's on a Class B subnet if there are only 100 odd computers on the network, but I'd prefer not to have to manually code in each IP.
2. Is there any method of forcing each box to report back it's hardware config (ie. video card, NIC, sound card, etc.) and the version numbers of each card's current driver? The majority of the boxes to be polled will be running Win9x or Win2K so I'm guessing that there's prolly a COM object which can do this, but I've not been able to find a reference to said object. Has anyone come across such a beast in their travels? Also, although not a high priority, there are some *Nix boxes in some of the labs and the IS dept. Can I accomplish the same detection on those boxes?
3. Relating to #1, assuming the auto-network detection is possible, how can I determine the OS any given box is running? phpinfo() returns the OS version in it output, but this program is going to be run from one or two computer's and remotely poll the rest of the network. Thus, I'm assuming that phpinfo() is going to be useless for this. Perhaps a quick directory scan to see if /etc exists, the assumption being that the absence of /etc indicates an MS box? Any suggestions on a more effective/efficient test?
Thanx for any help/ideas!!
:: geoff
----------
Common lies: "This won't hurt a bit", "I'll still respect you in the morning", and "Microsoft software is secure".
In other startling news, the sky is blue and water has recently been seen flowing downhill.