Hi wayz ,
You have two choices for storing the previous run information whether it
be the number of runs or a first run date.
You can write it to a file
You can write it to the registry
In the first case any computer literate person can find the file within
a few minutes of searching, so you need to put encrypted data in the
file. If the file is deleted, then you can stop the program from running.
If you write to the registry it will require a higher level of knowledge
to find your data, but it will still be findable, so you need to encrypt
again.
Depending on the value of breaking your system and the likely interest
in doing so, someone somewhere will break it.
You have to balance the cost to you of them breaking it, with the
additional cost of having more complex systems to make it harder to break.
Regards,
Laurie Comerford
wayz wrote:
> Talk about timing...
>
> i was researching the same issue, can somebody plz clarify the
> following(easy on me):
>
> 1-When you close VBA all the variables reset(Yes? or No?)
> 2-What date to you get from getvariable(cdate), if it is the system's,
> then the user can change the time on the PC and use your code without
> limits, if not, plz explain what it is.
> 3-How can we know, in VBA, the date the code was used for the first
> time? don't we need more control.
> 4-i had two options,
> 4.1-Record the date of the first use of the code, and then compare to
> the current date
> 4.2-Count the number of times the code ran and compare to a constant
> (i think this would be easier)
> 5-I thought of creating a file in a hidden location on the customer pc
> via vba, writing the counter to that file each time the file is ran,
> then comparing, but that also have setbacks, what if the user doesn't
> have enough control to create the file, what if the file is deleted...
>
> I appreciate your feedback,