Results 1 to 6 of 6

Thread: Get hard dish serial number of all the hard disk

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2013
    Posts
    285

    Get hard dish serial number of all the hard disk

    I want to get hard disk serial number of all hard disk attached to a PC
    After a google search i found some code where i will get harddisk serial number of primary harddisk (using PRIMARY_MASTER of IDE_DRIVE_NUMBER)

    But how can i get hard disk slno of all the harddisks?

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Get hard dish serial number of all the hard disks

    You can't.

    Even the giant Pachinko Machine known as WMI will not be able to find it for some types of drives.

    Depending on the drive make, model, and the bus it is connected to entirely different strategies are required. There isn't any single method you can use and even using several you are bound to miss some here and there.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2013
    Posts
    285

    Re: Get hard dish serial number of all the hard disks

    Quote Originally Posted by dilettante View Post
    You can't.

    Even the giant Pachinko Machine known as WMI will not be able to find it for some types of drives.

    Depending on the drive make, model, and the bus it is connected to entirely different strategies are required. There isn't any single method you can use and even using several you are bound to miss some here and there.
    But in Visual C++ i got the code from here
    Its nice and almost works.
    But in windows 8 it gives some different kind of output than the actual serial number. If actual serial number is 3A93584PL then it gives A393584LP .i.e last and first two characters are interchanged. It reads the drive IDs using physical access with zero rights in windows 8(even in administrative user) . In windows xp it uses access with admin. So do you know the reason for the error I am getting in windows 8?

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Get hard dish serial number of all the hard disks

    Sorry, no idea. Looks like a problem with 16-bit integer endianness to me.

    I gave up on trying to use hardware drive serial numbers a while back. I never found any combination of schemes that was reliable, and certainly no single scheme that was.

  5. #5
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Get hard dish serial number of all the hard disks

    Quote Originally Posted by IT researcher View Post
    But in Visual C++
    Well, you are most likely going to have to use a lower level such as C++ to retrieve the information then have the C++ dll send the information to a VB6 front-end so you can make use of the information.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  6. #6
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166

    Re: Get hard dish serial number of all the hard disks

    See if this link works for your question:

    http://vbnet.mvps.org/index.html?cod...em/windirs.htm

    DeviceIoControl: Get a SMART Drive Serial Number

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width