> Hi, I'd like to know the best way of checking the current time during a
> demonstration product. At the minute i store the first run date, then
[quoted text clipped - 11 lines]
> (BTW: This isn't meant as fool-proof hacker protection, it's just to
> deter the most basic attempts at getting around the demonstration period)
Check the 'created' or 'last modified' date on your executable, and compare
this with the current timestamp.
changing the current time back and forth gets very annoying, so it is
unlikely that users will do it continuously. you have to be admin as well to
do that.
Or store the first run date in the registry, possibly encrypted. hide it
amongs a dozen similar reg keys, and make it so your program stops working if
not all of the kyes are there. your installer then has to create those keys
during installation.
But there is NO fool proof to do this. Using FileMon or ProcessMonitor will
quickly show what your app is doing to protect itself.
And a user could always re-install the demo app.

Signature
Kind regards,
Bruno.
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"
Mark Ingram - 15 Nov 2006 13:52 GMT
> But there is NO fool proof to do this. Using FileMon or ProcessMonitor will
> quickly show what your app is doing to protect itself.
> And a user could always re-install the demo app.
Hi, thanks for the prompt reply. One of our requirements is that the
application can be run without an installer and the demo should start
from the first run (not the install date).
Currently I write the demo period and the start time out to a file, read
that in and compare against the current date / time.
I didn't realise you needed to be an admin to change the date / time though
Cheers,
Ben Voigt - 15 Nov 2006 22:04 GMT
>> But there is NO fool proof to do this. Using FileMon or ProcessMonitor
>> will quickly show what your app is doing to protect itself.
[quoted text clipped - 6 lines]
> Currently I write the demo period and the start time out to a file, read
> that in and compare against the current date / time.
You can also store the most recent run date along with the first run date,
and check for time going backwards. If you catch time going backwards,
refuse to run unless you can access a reliable (i.e. cryptographically
signed) network time source.
> I didn't realise you needed to be an admin to change the date / time
> though
>
> Cheers,