Hard Disk Manufacturer Serial Number Vb6 String

Hard Disk Manufacturer Serial Number Vb6 String Average ratng: 8,9/10 5501 votes

How to get the Hard Drive Serial Number given by the Manufacturer with VBA? Please note that I need Number given by Manufacturer & not Hard drive serial number.

  1. Serial Number Lookup

Function GetPhysicalSerial As Variant Dim obj As Object Dim WMI As Object Dim SNList As String, i As Long, Count As Long Set WMI = GetObject('WinMgmts:') For Each obj In WMI.InstancesOf('Win32PhysicalMedia') If obj.SerialNumber ' Then Count = Count + 1 Next ReDim SNList(1 To Count, 1 To 1) i = 1 For Each obj In WMI.InstancesOf('Win32PhysicalMedia') SNList(i, 1) = obj.SerialNumber i = i + 1 If i Count Then Exit For Next GetPhysicalSerial = SNList End Function Paste into a VB code module, then enter =GetPhysicalSerial anywhere on a worksheet. If you have more than one physical hard drive enter as an array function to return the serial number for each drive. Doug Jenkins Interactive Design Services RE: How to get the Hard Drive Serial Number given by the Manufacturer with (Civil/Environmental). What other information we can get from WinMgmts:? Gsdx directx 11. I can't help there at the moment. I have never seen this object before, and I don't recall reading about it in any book I have.

Serial

Serial Number Lookup

I can only suggest following up the links in the discussion I linked to in my previous post. If I have time to do some research myself I will post something on my blog, but I don't know when that will be. Doug Jenkins Interactive Design Services RE: How to get the Hard Drive Serial Number given by the Manufacturer with (Civil/Environmental) 20 Nov 10 04:56.

Posted on