.NET tool for adding serial number licensing to applications?

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi,

I want to make it so my customers have to enter a license code to
activate my software. Without this code, the software will only run
for a period of time (7-30 days).

Are there any examples of how to implement this?

Is there anything built-in to .NET to do this?

Thanks,
John
 
Hi John,

Thanks for your post. As I understand, you want to offer unregistered user
of your program a trial period (say, 7-30days). If he does not enter a
registration key during this period, the program will not run afterwards.
Please correct me if there is any misunderstanding. I suggest that you can
implement the following in your program:

1. Create a setup program for your application. In the setup program, we
should record the installation time and registration flag to a persistent
storage (say, registry, file, etc) in an encrypted format if the
application was installed successfully.

2. Check the registration flag immediately after the the program starts. If
this product is registered, go to Step 6, otherwise (flag is missing or is
set to unregistered) go to next step.

3. Get the current time and compare it with the installation time, if it
exceeds the trial period, then go to Step 4, otherwise go to Step 5.

4. Exit the program.

5. Display a dialog/message box urging the customer to enter a registration
key. And modify the registration flag if a user enter a valid regiatration
key.

6. Continue to work.

Note: You should also implement/apply encryption algorithmns for the
registration key/flag and installation time. I believe the following MSDN
article is helpful:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconcryptographictasks.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Tian,

Thank you very much for your post. That is exactly what I need to do.

Is there any way to prevent the user from un-installing the program,
then re-installing it and getting another evaluation period?

Thanks,
John
 
Hi John,

Thanks for your feedback.
then re-installing it and getting another evaluation period?

We should allow a user to uninstall a trial program if he do not want to
use it any more. What we can do is to keep the installation time and
registration flag information on the disk (say, registry) when unintalling
the program. If one re-install it, the setup program should not update
these information if they exist on the disk and it was registered last
time. Instead of exiting the program immediately, you can also prompt a
dialog to offer a user a chance to enter registration key when the program
starts.

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top