Writing software that expires after x days

Hi,

I have been unsure of this for many years, but there are loads of shareware programs out there that allow you to use the software for a certain number of days, and then it does not work.  How do they do it?  It obviously doesnt use the system clock as adjusting that does not alter the time remaining.  I have often wanted to release a few little applications as trials but i had no idea how to do it properly.

Kind Regards,
Michael
LVL 1
Xavior2K3Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

possekeCommented:
Hi Xavior2K3,

I'm afraid I can't help you with the day limitation, but what I did a couple of projects ago was create a registry key with a certain value, for example 30.
Each time the user started the program, I would check if that value was different from 0, and if not, substract -1 from this value.

So this is a limitation in number of times the program can be used. I realise it's not so complex or progressive as time-limitation, but it works for small shareware projects...

And if you have an installation procedure that would create the registry key, you must check if the key is allready existing, and if so, it must not alter the value that is allready present.
IIn that way, when users try to re-install the program to obtain a new trial-period, the count will still be 0 and the user will still not be able to use the program...

Hope this helps in any way?

Greets,

Po$$e
0
gregoryyoungCommented:
Have you checked out the Shareware starter kit for 2.0? http://msdn.microsoft.com/vstudio/downloads/starterkits/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
g_johnsonCommented:
I would simply hard-code in an expiration date.  Can they get around this by changing their system clock?  Sure, but who's going to do that for very long.  Not to mention that I have an overall theory of "let the cheaters cheat -- they're not my customer base anyhow."

That being said, the best way would be to put an encrypted date or encrypted count-down in the registry.  If it's encrypted, and not called "expiration_date" LOL nobody would know what it is.
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Éric MoreauSenior .Net ConsultantCommented:
0
PockyMasterCommented:
Just some idea:
you might let your downloaders register on your website before downloading, and when they first start the program, it will contact your webservice letting you know they use it for the first time.. let them log in at first..
Next time they start your app.. you will check again how many days past since the first registration. this keeps the power in your hands..
0
broadbentCommented:
PockMaster seems to show the best way.
There are programmes that take a snap shot of the register before and after installing an new app. It wouldn't be too difficult to work out which registery value was altered.

0
gregoryyoungCommented:
This stuff is included in the shareware starter kit from MS .. why re-invent the wheel?
0
PockyMasterCommented:
I wasn't aware of that gregory.. if so, go with the shareware starter kit..
0
Xavior2K3Author Commented:
Yes i've had a quick glance at the Microsoft Shareware Starter Kit and it looks very promising. Thanks for all the suggestions!
0
possekeCommented:
Hi,

Maybe points should be splitted, I think all the ideas here were good enough to pass the test :d

Po$$e
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.