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.