Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2006

Tip: Looking for answers? Try searching our database.

How to check current time for demonstration product

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Ingram - 15 Nov 2006 11:50 GMT
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
compare that to the system time, but obviously a user can just change
their clock back a month and continue using the product.

I heard it is best to check the access time on a system dll? I had a
quick look at the user32.dll file and realised the access time was the
time my machine booted up, but when i check in .net (via
File.GetLastAccessedTime or FileInfo.LastAccessedTime) it is different
to the time windows displays in the properties sheet.

So does anyone have any suggestions?

(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)

Cheers,
Bruno van Dooren [MVP VC++] - 15 Nov 2006 12:23 GMT
> 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,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.