Time limit code - best way?

C

Chuck

What's the best way to time-limit distributed templates (mostly Word but
Excel and PPT also) so that they stop functioning on a certain date or after
a period of time? I'd like to avoid having to hard code date/time in the
code but would prefer to use a setup procedure that takes the date of
installation and sets the expiration date then.

Should I be using the Registry or a hidden file or something else?

Many thanks...
 
A

Anand.V.V.N

Hi Chuck,

The best wasy to do is use a text file. I had one such situation so here is
what I did
I created a text file which was created with a small simple install program
I made. In this file I stored the date and the number of days in which teh
program would expire, which I stored in a encrypted form, in the document I
would check if the file is there or not everytime I opned the document. When
the date expired the document woudn't open any way.

About that encyption stuff, I found some free program on net.

Hope this solution helped you.

Anand
 
C

Chuck

Thanks. That's similar to what I've been doing but I'm wondering if there's
a slicker way...
 
A

Anand.V.V.N

Hi Chuck,

What you can do is store in registry also too. Make an application that
would encrypt the date of the docuemnt or template and the number of days it
is valid, and also the system date on which the doc or template was copied,
so htat even if the system date is changed later it won't effect your program
and compare it every time your document or templated is opened,and when the
time limit has reached, automatically close the document. And also check if
the registry entry is removed or not from the document, if it is removed
don't open the document.

I hope this is would be slick enough.

Anand
 
C

Chuck

Thanks Anand that's great. Can you point me to the free encryption program
you mentioned?

Thanks again.
 
A

Anand.V.V.N

Hi Chuck,

it turns out that I am using the same application and it looks good so far.

Hope you found it useful.

Anand
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top