Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

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
0
Xavior2K3
Asked:
Xavior2K3
  • 2
  • 2
  • 2
  • +4
2 Solutions
 
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
 
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
É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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now