algorithm for expiration date of trial software using C#

  • Thread starter Thread starter sparton
  • Start date Start date
S

sparton

hi! can anyone show me how to make an expiration for a certain
software where backtracking of dates (i.e. changing the system date)
will not nullify the license.. also, the software will have a counter
which counts how many times the software is being used.. thanks!!
 
Hi
If you want to use the idea of counter, you just need to have a variable
(int) that you save somewhere in a file of those or your application or on
in registry key , you increment that variable in the closing event of
the main form in your application and you check it in the load event
handler ( to make sure the max number of allowed usage time is not
exceeded
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 
Store the date in the registry/filesystem location during first use or install. Then each time your app runs, calculate the number of days passed and stop running after 30 days. Also, to prevent date backtracking, store the date of last use, next time app starts check that current date is not before date of last use.

For ready made implementation of the above strategy, you should check out CryptoLicensing.
 
Back
Top