ahmed elbarbary

ahmed elbarbary

  • NA
  • 1.6k
  • 275.2k

How to implement algorithm for trial version for 30 day by csharp ?

Feb 13 2021 2:12 AM
I work on desktop application windows form by csharp language
I have issue I can't make it as trial for 30 day on customer pc
so How to do it trial version
I need to implement this logic algorithm but can't implement it
so How to do that please
suggest doing the following (during the first run of the application):
1. Create a registry entry to store an encrypted value of the expiration date (which can be calculated as n days from the installation date).
2. Create a hidden entry somewhere else (another place in the registry, a file stored in the Windows system folder, etc...) that indicates that step 1 was successfully completed. This is to allow the software to immediately stop functioning in case the user identifies and clears the registry entry created in 1.
3. Create another registry entry to store an encrypted value of the last date/time on which the software was run.
Now whenever the application is run (including the first time), you should:
1. Check for the registry entries 1, 2 and 3 above:
If 1 and 3 exist then
If they are correctly encrypted (unmodified) then
If the expiration date has not been reached AND the last-run date is older than the current date then
Run the application
Modify entry 3 to hold the current date (encrypted)
Else if the last-run data is newer than the current date then
Somebody has tried to change system clock. Catch! :-)
Else
The software has expired!
Else
Somebody tried to modify the encrypted values. Catch!
Else
If hidden entry 2 exists
Somebody cleared the entries 1 and 3. Catch!
Else
This is the first run! Create entries 1, 2 and 3
End if
_______________
can you please help me implementing logic above please by coding here
if possible help me

Answers (1)