5

Right now we are developing a small Windows-based application. We used to provide trial version license for a period of 30 days and after the expiration of 30 days, the product would be unusable.

Now here's my problem:

Imagine a client who downloaded and installed the application on Jan 1 and by Feb 1, the trial period would end. Now on Jan 31, if he changes the system time to Jan 1 again, the system starts to count from beginning, so the client can extend the trial period by simply changing the system time.

And as per community suggestions, we can check the internet/date time, but as a small concern, we can't randomly validate license through a server and if the user goes offline and changes his system date time, then there will be a problem again. Are there any other ways to tackle this problem?

I have already checked this question.

What are the best ways to tackle this problem? The product is a C# application.

Community
  • 1
  • 1
irror
  • 301
  • 1
  • 5
  • 15
  • 1
    Are you allowed to access the internet? If so, you could go to an internet time server. – Matthew Watson Mar 26 '13 at 07:37
  • 5
    Could you not just save the last time the application was opened to a file. Then, when the application opens next time, you are able to detect that the clock has been tampered with. You should of course allow users to change time once in a while, but you could disallow usage of the application if done multiple times. – foens Mar 26 '13 at 07:38
  • If you have internet then go for internet time server, else another option USE regedit, create folder and set installation/expiry/Last execution datetime and on application run check your date – Satinder singh Mar 26 '13 at 07:53
  • 1
    Which percentage of users do you expect to screw with their system time just to pirate your application? I doubt the lost revenue pays for your development efforts. Additionally, it most probably would be much easier to somewhere download a pirated copy and not screw with the system time (disclaimer: I do not recommend pirating software). Using the internet or an authentication server will quite possible lead to angry legitimate users who want to use your SW while offline. Think of the always-on copy protection and the PR disasters they regularly cause for some big game companies. – hochl Mar 26 '13 at 12:43

2 Answers2

11

As per your requirement, what I see, you cannot check the online server for date. This is quite obvious for offline system.

So, you need to do few things -

  1. set the registration date and expirydate in the form of high encypted data and save it somewhere in registry database.

  2. While the Application opens each time, get the latest clock date and save the encrypted data in registry.

  3. Ensure to check the Clock date and the Last Usage Date. If last usagedate < clockdate, then everything fine but if usagedate>clockdate, user has changed the clock date. So, don't update the registry.

  4. Once the lastusagedate reaches the expiry date, pops a message "Your Trial has been expired.".

Hope this helps.

cheers

Sandip.Nascar
  • 335
  • 1
  • 7
6

Probably the best possible solution would be to have an online server for verification of the licensing details. If you let your application be dependant over client machine's data then there is always a chance that they will break it. But for that your client must have internet access

Habib
  • 219,104
  • 29
  • 407
  • 436