![]() So these are manufacturer assigned, not user assigned by formatting or partitioning. Notice they say "Manufacturer serial number" and not "Volume Serial Number" like for for each parition. If its a raid drive its serial number is given as RAID in some cases, it does for mine. I didn't provide any identification for which drive is which so thats up to you. ObjWMIService = COMate_GetObject("winmgmts:\\" strComputer "\root\cimv2", "")ĬolDDInfo = objWMIService\CreateEnumeration("ExecQuery('Select * from Win32_PhysicalMedia')")ĭebug DDInfo\GetStringProperty("SerialNumber")ĬolDDInfo = objWMIService\CreateEnumeration("ExecQuery('Select * from Win32_DiskDrive')")īoth classes produce the same serial number. Heres a quick simple thing using srods COMate for getting the hardware serial numbers of drives using both classes (there are other classes that do this also):Ĭode: Select all XIncludeFile "COMatePLUS.pbi"ĭefine.COMateObject objWMIService, DDInfo ![]() Both work in Windows 7, and they worked in Windows Vista also. ![]() So those both are the same in this respect except that one of them can be used in Windows XP and the other can't. Manufacturer-allocated number used to identify the physical media. The SerialNumber property for the Win32_PhysicalMedia class description says this: ![]() Windows Server 2003, Windows XP, Windows 2000, and Windows NT 4.0: This property is not available. Number allocated by the manufacturer to identify the physical media. The SerialNumber property for the Win32_DiskDrive class description says this: There are a few different WMI classes that offer up the drive serial number, Win32_DiskDrive and Win32_PhysicalMedia for example. WMI offers a few different classes for getting the serial number of drives.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |