Attached is a sample project and a library that will easily allow you to get a lot of different info from the computer. Some of it's simple registry or WMI queries and other parts are API calls. I didn't make all of this code, but it's been so long since I looked up some bits, that I can't remember some parts came from.

There are two projects. One is a sample GUI and the other is the main library that does all of the work. It's called ComputerInformationLibrary. The library contains two namespaces: HardwareInformation and SoftwareInformation. If there's any properties or methods I'm missing you want added, please let me know.

There's a few things about this library I really like, but the one I like the most is the hard drive serial number. For my last job, I needed to pull the hard drive serial number from the system. You can do this via WMI, which seems the most common way. But WMI is bugged in Vista and Windows 7 to where the information pulled is incorrect. After a lot of searching, I found a method that pulls the info from a Windows API. It's the real hard drive serial number and it works really well.

Anyway, here's a quick screenshot of the demo app.

Name:  WgRUR.png
Views: 459
Size:  77.4 KB

DOWNLOAD
ComputerInformation.zip