Results 1 to 10 of 10

Thread: Hard Drive Serial Number's

  1. #1

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    53

    Hard Drive Serial Number's

    Hello all. I have seen this code before on here and searched everything but could not find it. I have the program to send to the user where it will create the key. The key is their hard drive number. They Will send it back to me so I know what it is then add it into my project so at start up it will only load for the people that have hard drive serial numbers of which are listed. If it is not there then it will not load for them. So i am just looking for code or an example or help of it to show me how I can have it load up for only certain hard drive numbers and not for others? Well thanks in advance guys for all the help and it is much appreciated. Have a good one Peace
    Thank you all.

  2. #2

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    53
    Anyone at all please? I would appreaciate it so so so much. Thank you once again.
    Thank you all.

  3. #3

  4. #4
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564
    You know its very simple to change Volume Serial Numbers to whatever you want right?

  5. #5
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695
    Originally posted by BrianS
    You know its very simple to change Volume Serial Numbers to whatever you want right?
    Just one command called FORMAT will do it for you...

    Cheers...

  6. #6
    Addicted Member
    Join Date
    Nov 2002
    Posts
    155
    Originally posted by wrack
    Just one command called FORMAT will do it for you...

    Cheers...
    But FORMAT doesn't let you set the serial num- it generates it does it not?

  7. #7
    Frenzied Member KayJay's Avatar
    Join Date
    Jul 2001
    Location
    Chennai
    Posts
    1,849
    Originally posted by BrianS
    You know its very simple to change Volume Serial Numbers to whatever you want right?
    Attached Files Attached Files

    "Brothers, you asked for it."
    ...Francisco Domingo Carlos Andres Sebastian D'Anconia

  8. #8
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695
    Originally posted by Spooner
    But FORMAT doesn't let you set the serial num- it generates it does it not?
    In theory thats the safest way to do so...

    There are mods that can do so but I have never tried those...

    Cheers...

  9. #9
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564
    You can change the Volume Serial Number without formatting. Simple tools are available.

    My point was it's not a very good way to use as a security validation.

    Originally posted by wrack
    Just one command called FORMAT will do it for you...

    Cheers...

  10. #10

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    53
    Thank you all. Yes I know there a re progs out there but I don't really care that much for the people going to be using it. So as snorky posted:
    Option Explicit

    Public Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" (_
    ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String,_
    ByVal nVolumeNameSize As Long, ByRef lpVolumeSerialNumber As Long, _
    ByRef lpMaximumComponentLength As Long, ByRef lpFileSystemFlags As Long, _
    ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long

    'Get the MachineID (C-drive serial number)

    Public Function MachineID() As String
    Dim lSerialNum As Long

    Call GetVolumeInformation("C:", vbNullString, 0, lSerialNum, 0, 0, vbNullString, 0)
    MachineID = CStr(lSerialNum)
    End Function

    Sub Main()
    If Not LicensedForPC() Then
    Call MsgBox("Not licensed for this machine", vbOKOnly)
    Exit Sub
    End If

    frmMain.Show
    End Sub

    Public Function LicensedForPC() As Boolean
    Select Case MachineID()
    Case "12345678", "11111111", "22222222", 'etc
    LicensedForPC = True
    Case Else
    LicensedForPC = False
    End Select
    End Function

    I have all that which I think wil ldo the trick jsut cant arrange it all right to do it correctly. I am trying to have it on form load so if it finds the hard drive number it will continue loading if not it will unload. The number will be in the code. So I am asking for all the help I can get and it is much appreciated. Once again thank you all and plz try and help a n00b out Peace
    Thank you all.

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