There are several ways of doing it.  But none are completely fool proof
Generally I stick away from online stuff, as in my case I cannot be sure
the user will have a connection.

My method relies heavily on the use of buddiapi - but there are other
ways to achieve the same result.

Using buddyapi, on install I create an ini file with 3 keys
installDate
lastKnownDate
numberOfTimeUsed

In real terms, I actually call these something like a1,a2 and a3 so its
not so obvious.

Usually, my applications have a file structure with them so it's pretty
easy to hide the ini, also, its worth noting that with buddy, the file
does not need to be named .ini - you can name it something else
entirely.

Obviously this would be easy to change, so before I write\read these
strings from the ini, I encrypt\decrypt them accordingly using buddy's
encryption functions.

Obviously you enter the install date when you install the program on the
machine, I make sure that there is only a suitable window in which it
can be set.  So if I know that a new version will be released in 30 days
I only allow the date to be set between now and 30 days time.

Each time the program starts, it checks the installdate is less than x
number of days ago and that the currentDate is greater than the
installDate

It also checks the current date against the lastKnowndate to check the
clock has not been put back, if it hasn't, I update the last known date,
and the number of times used (good if you want to limit the number of
times the program can be used.)

If you want, you could move the ini file to somewhere discreet on the
users file system, or put these same values in the registry, this makes
it harder for the users to actually uninstall \ reinstall the software.


HTH

Tim



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mendelsohn,
Michael
Sent: 26 October 2005 14:38
To: Lingo programming discussion list
Subject: <lingo-l> Projector expiration date

Hi list...

I need to make a projector non-functional after a certain date, and I'm
hoping to get a good strategy on how best to accomplish this.  I'm
assuming I don't have access to the user's registry.  I was thinking of
writing a small text file to the appData folder, but I figured that
might be too easy to alter if they change their clock.  I was also
pondering having the disc check online on startMovie for a script on a
server that will return true/false, but that still might not cover
altering the date.

Has anyone done something like this before?

Thanks,
- Mike


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[email protected]  (Problems, email [EMAIL PROTECTED]).
Lingo-L is for learning and helping with programming Lingo.  Thanks!]



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to