Results 1 to 14 of 14

Thread: Changing Hdd Serial Number

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Location
    EGYPT
    Posts
    103

    Changing Hdd Serial Number

    How Could I do this

    Changing Hdd Serial Number

  2. #2
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564
    You mean the Volume Serial Number?

    I use a program called VolumeID, you can find it here

    http://www.sysinternals.com/ntw2k/so...shtml#volumeid

  3. #3

  4. #4
    New Member
    Join Date
    Feb 2004
    Posts
    9
    By the way could anybody tell me how to read volume id of a harddisk
    Be a part of OpenSourceDevelopment

  5. #5
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564
    VB Code:
    1. Private Declare Function GetVolumeInformation Lib "Kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
    2. Private Const MAX_FILENAME_LEN = 256
    3. Public Function DriveSerial(ByVal sDrv As String) As Long
    4.     Dim RetVal As Long
    5.     Dim str As String * MAX_FILENAME_LEN
    6.     Dim str2 As String * MAX_FILENAME_LEN
    7.     Dim a As Long
    8.     Dim b As Long
    9.     Call GetVolumeInformation(sDrv & ":\", str, MAX_FILENAME_LEN, RetVal, a, b, str2, MAX_FILENAME_LEN)
    10.     DriveSerial = RetVal
    11. End Function
    12. Private Sub Form_Load()
    13.     MsgBox "Serial of drive C is " & DriveSerial("C")
    14. End Sub

  6. #6
    Fanatic Member MikkyThomeon's Avatar
    Join Date
    Oct 2002
    Location
    At work...
    Posts
    648
    Damn! I have just created a program that uses the filesystem object to read the drive serial (??volume id??) to authenticate the program.

    Does this mean that you cannot authenticate a program to run on a single machine using the volume ID and another secret key??

  7. #7
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    Originally posted by MikkyThomeon
    Damn! I have just created a program that uses the filesystem object to read the drive serial (??volume id??) to authenticate the program.

    Does this mean that you cannot authenticate a program to run on a single machine using the volume ID and another secret key??
    Doesn't BrianS' code work?

  8. #8
    Fanatic Member MikkyThomeon's Avatar
    Join Date
    Oct 2002
    Location
    At work...
    Posts
    648
    How is the Volume Serial Number stored on the drive? - is it stored in some form of a EPROM on the hard drive or is it stored on the drive itself?

    If it were stored on the drive itself then I would assume there could be a possibility of being able to change it. A guy I know used to program in assembler and could actually finetune the old systems to run faster by modifying the actual locations on disk where the data would usually be stored!!!

  9. #9
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373
    The FileSyste Object only reads the Format Serial number ...(the one that changes each time you format your HD or FD)

    the other serial number a HD has ...is the Factory Serial Number ...(that is stored in the BIOS of the HD) and it is not possible to alter in any way ...not easy to aquire aswell using Visual Basic ...you need a DLL that is made in C++ with the instructions to access the hardware information (MS has also somethign to do that ...but it´s a lot of work...and couldn't find the way to make it work )
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  10. #10
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564
    You can change it (Volume S/N), with the program I posted earlier, unless you mean change it via VB code directly.

    And I'm sure it's stored on the HD disk itself, like the Label.
    Last edited by BrianS; Feb 23rd, 2004 at 05:10 PM.

  11. #11
    Fanatic Member MikkyThomeon's Avatar
    Join Date
    Oct 2002
    Location
    At work...
    Posts
    648
    D12Bit opened the can of worms - BrianS, I am assuming you can change the Volume Serial Number, but in order for me to create really locked down apps I would need to get the factory serial...would be really nice if this could be done, but I can imagine that since this number is not on the HD, it must be accessed in a totally different way. Like 'how would I even be able to access that section of memory!!!'

  12. #12
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373
    you can get the Factory HDD serial Number with a DLL that is available in the internet ...

    as a matter of fact, this has been discussed here several times before ...do a serach for hdd serial number or factory serial number ... and you'll find the name of the dll and where to get it ...


    Good luck!
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  13. #13
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564
    Use a Keygen method instead.

    You will never get anything 100% secure, all you can do is try.


    Originally posted by MikkyThomeon
    D12Bit opened the can of worms - BrianS, I am assuming you can change the Volume Serial Number, but in order for me to create really locked down apps I would need to get the factory serial...would be really nice if this could be done, but I can imagine that since this number is not on the HD, it must be accessed in a totally different way. Like 'how would I even be able to access that section of memory!!!'

  14. #14
    Fanatic Member MikkyThomeon's Avatar
    Join Date
    Oct 2002
    Location
    At work...
    Posts
    648
    Cool man!!!

    !!!

    -|-
    / \
    ` `

    (The Big Yellow Man is a registered trademark of the MikkyThomeon corporation!!!)

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