Grayda
Member
- Joined
- May 20, 2010
- Messages
- 16
- Programming Experience
- 10+
In my latest VB.NET app, I've written some code that grabs various laptop / UPS battery information from WMI. The idea is to let IT people see a battery's health and voltage and such. But in running this app on several of our Dell laptops, I've come across some interesting numbers.
First off, the VB.NET code that grabs the battery info is:
(If you run this code on VB.NET 2010 (with .NET 4 FW), you may get a message saying the ManagementObject classes aren't defined. In that case, you'll need to follow these steps to get it to run properly)
At work, we have a fleet of about 2000 Dell laptops of varying models. When I run the application on several of these machines, I notice that there are strange differences in serial numbers between computers of the same model. For example :
Dell Latitude 2110 - "144SMPDELL 4H63611"
Dell Latitude 2110 - "4547SMPDELL 4H6360C"
Dell Latitude 2110 - "1841Samsung SDIDELL 6P1470A"
Dell Vostro 1510 - "11Dell" (all Dell Vostro 1510s report their battery serial as "11Dell")
Some have three preceding digits, some have four. Most have SMPDELL, others have Samsung SDIDELL.
These netbooks were all purchased at the same time, created in the same batch (as the serial numbers printed on the netbook (not the battery) are sequential). Some of the numbers returned by my program line up with the sticker that's printed on the bottom of every battery, while some don't.
What I'm wondering is, is my application returning the wrong information? Is it actually returning video card data (based on the SDI string) or even CPU data (based on the SMP line)? Do you see a pattern in all of this? If you run the program, what output do you see?
This kind of information would be handy to decode so I can "guess" more about a laptop / netbook (e.g. when it was made, where etc.)
First off, the VB.NET code that grabs the battery info is:
VB.NET:
Dim results As String = ""
Dim batteryReturn As Management.ManagementObjectCollection
Dim batterySearch As Management.ManagementObjectSearcher
batterySearch = New Management.ManagementObjectSearcher("root\cimv2", "Select * from Win32_Battery")
batteryReturn = batterySearch.Get
For Each baseobject In batteryReturn
results += baseobject("DeviceID")
Next
Messagebox.show(results, "Battery serial:")
(If you run this code on VB.NET 2010 (with .NET 4 FW), you may get a message saying the ManagementObject classes aren't defined. In that case, you'll need to follow these steps to get it to run properly)
At work, we have a fleet of about 2000 Dell laptops of varying models. When I run the application on several of these machines, I notice that there are strange differences in serial numbers between computers of the same model. For example :
Dell Latitude 2110 - "144SMPDELL 4H63611"
Dell Latitude 2110 - "4547SMPDELL 4H6360C"
Dell Latitude 2110 - "1841Samsung SDIDELL 6P1470A"
Dell Vostro 1510 - "11Dell" (all Dell Vostro 1510s report their battery serial as "11Dell")
Some have three preceding digits, some have four. Most have SMPDELL, others have Samsung SDIDELL.
These netbooks were all purchased at the same time, created in the same batch (as the serial numbers printed on the netbook (not the battery) are sequential). Some of the numbers returned by my program line up with the sticker that's printed on the bottom of every battery, while some don't.
What I'm wondering is, is my application returning the wrong information? Is it actually returning video card data (based on the SDI string) or even CPU data (based on the SMP line)? Do you see a pattern in all of this? If you run the program, what output do you see?
This kind of information would be handy to decode so I can "guess" more about a laptop / netbook (e.g. when it was made, where etc.)