Detect SCSI Hard Drive Serial Number

This is a discussion on Detect SCSI Hard Drive Serial Number within the Windows Programming forums, part of the Platform Specific Boards category; Does anyone know how to get the Serial Number of a SCSI hard drive? I have the code to get ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    88

    Detect SCSI Hard Drive Serial Number

    Does anyone know how to get the Serial Number of a SCSI hard drive? I have the code to get the hard drive serial number of an IDE hard drive. However, the same code does not work for SCSI.

    Thanks for any help you can provide.

    Note: I need the Hard Drive Serial Number not the Volume Serial Number. The hard drive serial number is unique to every drive whereas the volume serial number is not.

  2. #2
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059
    Maybe Windows Management Instrumentation Win32_PhysicalMedia could be of some help to you.

  3. #3
    Registered User
    Join Date
    Nov 2005
    Posts
    88
    Thank you for the suggestion. I will investigate it a little more. It looks promising for a way to provide the information I need in XP and Server 2003. I did not specify the OS's I need a solution for though (definite oversight on my part). I am looking for a technique that will with Windows 2000 and forward, so I am still looking for other techniques as well that work in win2k.

    Thanks again for the WMI link. I will almost certainly incorporate it into my detection technique (I already have 4 techniques used to detect IDE hard drive serial numbers. The redundancy is very welcome when the different techniques can fail for reasons I do not completely understand).

  4. #4
    Registered User
    Join Date
    Nov 2005
    Posts
    88
    And to complicate things a little further, there is also one other issue to contend with. I have found a technique that does work with SCSI hard drives as far as I can tell (referenced it against a tool that uses the WMI technique Bob suggested above and got the same results). However, it does not work when a SCSI raid controller is present. It instead returns an erroneous value that people have suggested is a Raid Controller Serial Number that is not unique. If anyone knows of a way to deal with Raid Controllers and SCSI drives, I would appreciate any info.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SATA HDD failure
    By PING in forum Tech Board
    Replies: 4
    Last Post: 12-23-2008, 12:25 AM
  2. "parking" hard drive in DOS?
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 04-22-2002, 11:58 AM
  3. 'Installing' to hard drive and 'Saving' to hard drive
    By Leeman_s in forum C++ Programming
    Replies: 4
    Last Post: 04-17-2002, 03:37 PM
  4. Getting the hard drive serial number?
    By kes103 in forum Windows Programming
    Replies: 2
    Last Post: 01-18-2002, 03:03 PM
  5. Getting the hard drive serial number?
    By kes103 in forum C Programming
    Replies: 2
    Last Post: 01-18-2002, 01:43 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21