PDA

View Full Version : Protection - Trial Version



mqdias
10-23-2007, 02:06 PM
Hi,

Is there any way of protection, where i can put a time counter, like a trial version of a software, to block it after that time?

Thanks

Bob Phillips
10-23-2007, 02:21 PM
Foolproof, or just to deter casual breakers?

johnske
10-23-2007, 02:22 PM
try http://vbaexpress.com/kb/getarticle.php?kb_id=475

unmarkedhelicopter
10-24-2007, 02:19 AM
It seems to me that EVERY coder goes through this stage at some point, I spent ages working out a very complicated encryption system for storing "time to expire", "expire time", "user", and "installation machine" such that if time to expire got longer it would immediately expire. I have a mechanism for extending dates or re-validating expired keys, I store the keys in multiple locations such that if they don't agree, the system expires. If the worksheet is taken to a new machine, it recognises this and implements the standard (for that code base) expirey.

All this is well and good and does deter the casual user from "messing" with the code (I do still use it sometimes (I even have a special set to supply for companies requiring such protection under their own control)), but ultimately it relies on running the check which is but a single line to 'comment out' and the software lasts forever. The skills required to break in to ANY protected code are not huge and can be done in less than 5 minutes. (I will not describe said techniques, it is against forum policy for a very good reason). You have to ask yourself "Why am I protecting this code ?" If the answer is that "I am such a hot programer and no one else could possibly write this code !" - then you are deluding yourself.

The only valid reason for protection is to prevent "someone who thinks they know what they are doing (but doesn't !!!)" from interferring with your code. If there is a problem with your code then that is what change procedures are for.

A lot of coders start off in life looking at some code they use a lot and pulling it apart and 'adjusting it' this is normal and if they break it - well they broke it and it teaches them to keep a back up. I would like to bet that 'most' of the members of this forum have started in this way and learned quite a lot from it. I my experience :- courses are crap, books are good and seeing how others do it is best. (but that's my opinion).

So beware what you protect, why you are protecting it and who you will deprive.

mqdias
11-09-2007, 07:08 AM
unmarkedhelicopter (http://vbaexpress.com/forum/member.php?u=4846) vbmenu_register("postmenu_120103", true); ,

Thank you for your reply!

I give you all the reason. I know that it's very easy to overcome this kind of protection. If there's guys how create "cracks" for games it would be stupid to think that this would protect my file.
My intention with this is, as you mentioned, protect the code for more stupid Excel users than me to do not change it. The other thing is that this is for a little group of people to use it and they aren't good at VBA. Not even close. So i know that with this restriction, they wouldn't be able to overcome it.

Thank you anyway!!

unmarkedhelicopter
11-09-2007, 09:08 AM
You did not explain why you want the software to expire !