Results 1 to 17 of 17

Thread: Retrieve Hard Disk Serial Number Using VB [Not Volume Number]

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    3

    Angry

    I need help in reading the Hard Disk Serial Number [Not the volume number] using VB. Currently I am using VB5.

    I have found a site that has the program to read the serial number but it is written in C++.

    Can anyone convert it to a DLL or has any other solution for it.

    The site is http://www.winsim.com/

    Thank you.

  2. #2
    New Member
    Join Date
    Dec 2000
    Posts
    6
    i went to the website but couldn't find the link.
    can you specify?

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    3

    Smile The Link

    The specific link is http://www.winsim.com/diskid32/diskid32.html

    Thanks for the reply

  4. #4
    Member
    Join Date
    Oct 2000
    Posts
    35
    You don't need any third party software. You can either use
    the API Function GetVolumeInformation or Scripting.FileSystemobject.GetDrive(Drive$).SerialNumber
    rfo

  5. #5
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    Take a look here >> http://www.vbapi.com/ref/g/getvolumeinformation.html for more information on using the API.

  6. #6
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    Talking Serial Number

    Check this code:

    Public Function DiskSerialNumber(sDrive As Drive) As String
    Rem obtener numero de serial utilizando la libreria de rem objeto del reference
    Dim Fso As New Scripting.FileSystemObject
    Dim dr As Scripting.Drive
    Set dr = Fso.GetDrive(sDrive)
    DiskSerialNumber = Hex$(dr.SerialNumber)
    End Function

  7. #7
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Both API and FSO codes listed here are for Volume Serial Number...not the MFG Serial Number.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  8. #8

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    3

    Red face

    I believe those codes are for Volume Number and not the Manufacturer Number.

  9. #9
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    coltair...did you get my email? If not check it out. I have an app that may do it for you.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  10. #10
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373

    Talking Sorry,

    Hi,
    HeSaidJoe, could you please be so kind to share it with me too, i have been looking for
    that a long time ago, because i had back in the old msdos an routine made in turbo c
    that gave me the MFG serial number but that method isn't compatible with the protected
    mode of 32bits of actual os's.

    So please tell me that you have it and could spare a copy for me

    Saludos...

    Mail me please
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  11. #11
    Guest
    Hi,
    HeSaidJoe, could you please be so kind to share it with me too, i have been looking for that also for a long time.

    Jorgen

    [email protected]


  12. #12
    Addicted Member
    Join Date
    Oct 1999
    Posts
    232
    The example to obtain REAL HDD serial (ActiveX written on C++ with source code and example on VB how to use it)

    http://www.relib.com/code.asp?id=482

    to download zip click to

    http://www.relib.com/code/x482.zip

  13. #13
    New Member
    Join Date
    Aug 2002
    Location
    Egypt
    Posts
    3

    Question HDD serial nuber

    Plz everybody, I need these files to get the *PHYSICAL* hard disk serial number

    I don't know how to get "HeSaidJoe" files

    and the link for "http://www.relib.com/code/x482.zip" which sent by "smalig" does not work

    so anyone knows the answer plz help coz I need it ASAP
    --MeeGho--

  14. #14
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695

    Thumbs up Check this out...

    see the attachment...
    Attached Files Attached Files

  15. #15
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373
    the : GetVolumeInformation API call will only give you the
    serial number assigned to the harddisk during the format...

    the Serial number looked for in here is the Serial number that is assigned to the BIOS of the HD...just like the MAC address of a NIC (Network Interface Card)

    I actually managed to get my hands on a driver and some workingng code for Win9x/Me/2K ...not tested on XP...

    the bad news is that the partition on the HD where I had stored that wen't bye bye on me...

    I sent that code to a friend before that...I'm trying to get in contact with him...

    But YES! ...it really works! ...and it really gives me the REAL and not changeable HD Serial number... that I actually I'm using for protecting some of my apps...the only thing that I managed to save was the OCX that I made for that and the Registration Serial number generator...

    I'll post asap the code and the files used for this...

    p.s.
    I don't remember where...but this I found it searching in the net...
    a lot of hard work but it was worth it...(even tho I have to do it again )
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  16. #16
    Member Myvar's Avatar
    Join Date
    Sep 2001
    Location
    Deutschland/Germany
    Posts
    34

    OCX

    Is this the OCX, you was looking for? Reading out the Hardwareserial given by the Manufacturer.

    Hope it helps,

    MyVar.

    [UPS, wheres the File I attached?]
    Last edited by Myvar; Nov 17th, 2002 at 04:01 PM.

  17. #17
    Member Myvar's Avatar
    Join Date
    Sep 2001
    Location
    Deutschland/Germany
    Posts
    34

    OCX

    Is this the OCX, you was looking for? Reading out the Hardwareserial given by the Manufacturer.

    http://www.vbfun.de/vb/index.htm --> Komponents-->System-->"Hardware-Informationen"-->Download hwinfo.zip

    Hope it helps,

    MyVar.

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