Signature Property Win32_DiskDrive

Does anyone know what the Signature property of the WMI Win32_DiskDrive class is? Is it unique, or can users change it like the serial number of a disk volume?

Thanks.

+1
source share
4 answers

The Signature property was introduced in Windows XP and is used for disks that are used as shared cluster disks. In my opinion, it is created the first time a disk is connected to a Windows system and will not be changed even if the disk is connected through another controller (or in a cluster scenario even through another computer).

See MSDN for a detailed description: Creating Physical Disk Resources http://msdn.microsoft.com/en-us/library/aa369328(VS.85).aspx

+3
source

I can help you by providing some important information about the "Win32_DiskDrive WMI class".

copy the following code into a C # project.

public static string HardDiskID() { ManagementClass partionsClass = new ManagementClass("Win32_DiskDrive"); ManagementObjectCollection partions = partionsClass.GetInstances(); string hdd = string.Empty; foreach (ManagementObject partion in partions) { hdd = Convert.ToString(partion["SerialNumber"]); if (hdd != string.Empty) return hdd; } return hdd; } 

Note. The string labeled "SerialNumber" can be replaced with the following attributes of the hard drive.

  uint16 Availability; uint32 BytesPerSector; uint16 Capabilities[]; string CapabilityDescriptions[]; string Caption; string CompressionMethod; uint32 ConfigManagerErrorCode; boolean ConfigManagerUserConfig; string CreationClassName; uint64 DefaultBlockSize; string Description; string DeviceID; boolean ErrorCleared; string ErrorDescription; string ErrorMethodology; string FirmwareRevision; uint32 Index; datetime InstallDate; string InterfaceType; uint32 LastErrorCode; string Manufacturer; uint64 MaxBlockSize; uint64 MaxMediaSize; boolean MediaLoaded; string MediaType; uint64 MinBlockSize; string Model; string Name; boolean NeedsCleaning; uint32 NumberOfMediaSupported; uint32 Partitions; string PNPDeviceID; uint16 PowerManagementCapabilities[]; boolean PowerManagementSupported; uint32 SCSIBus; uint16 SCSILogicalUnit; uint16 SCSIPort; uint16 SCSITargetId; uint32 SectorsPerTrack; string SerialNumber; uint32 Signature; uint64 Size; string Status; uint16 StatusInfo; string SystemCreationClassName; string SystemName; uint64 TotalCylinders; uint32 TotalHeads; uint64 TotalSectors; uint64 TotalTracks; uint32 TracksPerCylinder 
+1
source

I take the HDD to another machine, and Signature and PNPDeviceID CHANGED. Therefore, I think the OS generates this signature.

0
source

Two comments that, it seems to me, are very important for those who follow this path.

0
source

Source: https://habr.com/ru/post/1306676/


All Articles