CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2000
    Posts
    23

    How to build a serial number

    Whats a good way to build a serial number so you can link that to a customer?

    I usually put the number of the program (in this case 04 being the fourth program i've built) "." then a series of numbers and letters of the program name and then a short version of the major and minor version numbers, such as:
    04.[something]ST31
    This way i can tell by the serial number what program they are using, what version, ect.


    I'm doing this in the about box so that the program reads all the data in from the project and version info automatically.
    Later on i was going to have a registration box at the start so that this number has to be writen into it.
    Any ideas anyone?




  2. #2

    Re: How to build a serial number

    I did something along those lines.
    You're right on track so far.
    You can put a serial number in your code, and when the app is installed by the user, the date of intall is encrypeted then written to the Registry.(add many characters so it does not look like a date)
    If the 30 days since install is lapsed then check if user can provide a serial number. They type it into your registration TextBox and if it matches the one in your code put a flag in the Registry that from this point on don't check for date or serial number anymore.


  3. #3
    Join Date
    Sep 2000
    Posts
    23

    Re: How to build a serial number

    Yes, thanks for that. I didn't think of using the date in it as well.
    I thought of using the App.Revision number in it also as it auto increments, but then if i give another version to them it will be different, so i've had to take that out.

    Thank you very much.



  4. #4
    Join Date
    Mar 2001
    Location
    California
    Posts
    336

    Re: How to build a serial number

    A problem with your suggestion is that crackers could easily bypass the date mechanism you worked so hard to create by adding the flag to the registry that tells your program not to check.

    When developing a security solution, you have to think that people will track your program's activities and monitor the registry entries that it adds.

    Instead of a flag, maybe update the encryption on the date code to tell your program the user has registered. Make this encryption custom to the date if installation and the user's computer.

    Just a thought.

    John

    Peloweb.com

  5. #5
    Join Date
    Sep 2000
    Posts
    23

    Re: How to build a serial number

    Thank you John for all that. It sounds like its out of my league what you are suggesting, maybe one day with time i might be able to work out what you mean, in the meantime.....wooossshh!


    In the mean time what i have done would make a good product number then...oh well!

    Thanks




  6. #6
    Join Date
    Nov 2006
    Posts
    1

    Re: How to build a serial number

    i think you have to search to another way becouse the customer can just delete the register variable and then instal the aplication again
    and then that customer can do this al the time so he never has to put the serial number in the box

  7. #7
    Join Date
    Oct 2006
    Posts
    327

    Re: How to build a serial number

    Why don't you use very simply the project properties ?

    The name of your project is the one you gave to it
    and in the project properties you can define much more than the version 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

Featured