Results 1 to 7 of 7

Thread: Product Activation

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2008
    Posts
    90

    Product Activation

    Hi, hope you can help.

    I want to majke a program that will last for 30 days from the install date. Then the program will not function until the user registers or puts in an activation code I.e. Serial number & Company ... That kind of thing

    Many thanks in advance
    Stuart Jones
    Network Manager

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Product Activation

    Stuart, it really depends on how unbreakable you want to make the activation scheme... Any scheme put in place, can be cracked if someone with knowhow really wants to, so you have the weight the complexity of your copy protection against the thought of the chances someone tries to crack your program..

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2008
    Posts
    90

    Re: Product Activation

    Hi Thanks for the reply Kleinma, put it this way i dont want the application to be made for banks, just something that can be put into place.

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Product Activation

    you could do something as simple as this:

    when the program is run check for a given registry value.

    If the value doesn't exist, then consider the application to be a "new install" and write the key to the registry that has the current date. Then subsequent openings of the app can read this value and determine if the app should run or not.

    The obvious drawbacks are that anyone could potentially discover this registry location, and simply delete it and run the app again after it is expired, there are actually a large number of apps that work this way.

    I would also encrypt the data so it is not human readable if it is found...

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 2008
    Posts
    90

    Re: Product Activation

    Hi, well this activation bit is all new to me so do you know where i can find some examples of some sort

    thanks in advance
    stuart jones

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Product Activation

    well mine was just a broad example that didn't really go into a ton of detail. There are so many ways to implement this that it is hard to really pinpoint an exact one to best suite your needs.

    One thing I can tell you is this is not the first time this type of question has been asked, so try searching the .NET section of the forums and see what turns up.

  7. #7
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: Product Activation

    Well, here's a simple scheme. It involves a license file, and two pieces of data, possibly stored in the Registry:

    Program starts and looks for the license file. If it finds one, it checks the license against a code, possible derived from machine hardware IDs, or possibly just purely mathematical. If it finds a matching file, it runs, no further checks required.

    If it doesn't find a proper license, then it checks for Data1. Data1 could be stored in the registry and it's the encrypted date that the program was first run on. If it doesn't find it, then it creates it using today's date (since this is it's first run). If it's present, then it gets the date stored there.

    Next it checks Data2. Data2 is also a date. It should be the date of the last time the program was run. If it's not present, then it is created using today's date. If it is present, it reads it.

    Now, it gets today's date/time (Now). If Now <= (Data2 + 2 hours), then the user is most likely setting the clock on their computer back trying to fool your routine. This is a "SanityCheck" routine to catch would-be hackers. Set Data2 to 1/1/2199 so they won't be able to get back even if they fix their clock. Tell them they need to buy the program and exit the program.

    If Now is not <= (Data2 + 2 hours), set Data2 to "Now" and move on.

    Now compare Data1 >= (Now - 30days). If true, then they are within their 30-day evaluation. Give them a reminder, figure the days they have left, and let them use the program. If not, then tell them their trial has expired and exit the program.


    Now, this method isn't the strongest by far as any good hacker will find where you have Data1 and Data2 and delete them to extend their trial, but if hidden correctly, even uninstalling and reinstalling the program won't reset Data1 and Data2 since they won't get erased with an uninstall.

    A real hacker will just modify your check and evaluation of your license file to return "ok" for any condition, true or false.

    This methodology though will stop 99% of even the fairly tech savvy of typical users, because won't want to go through the hassle of hunting down your hidden registry keys and constantly deleting them just to use your trial.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

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