473,385 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to check current time for demonstration product

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,
Nov 15 '06 #1
3 1802
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)
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.

--
Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"

Nov 15 '06 #2
Bruno van Dooren [MVP VC++] wrote:
>
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,
Nov 15 '06 #3

"Mark Ingram" <no****@nowhere.comwrote in message
news:u3**************@TK2MSFTNGP06.phx.gbl...
Bruno van Dooren [MVP VC++] wrote:
>>
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.
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,

Nov 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that...
10
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
5
by: TN Bella | last post by:
Trying to check if an entry for an date is < 3 years to current date or > 30 days from current date. How can I do this in asp.net....? Do I need to use the customvalidation. Can anyone give me an...
0
by: Rodusa | last post by:
I am trying to replace cookies with the new "Asp.net 2.0 profiles" in my shopping cart application, but I am having trouble to access profile properties using HttpContext.Current.Profile. I can...
1
by: John Rivers | last post by:
Hello, I have been looking for a demonstration of "best practice" web application using asp.net web forms, in particular looking at an app that shows a typical database application with...
44
by: user | last post by:
Hi, Let's say I have 2 dates in the b/m format: Date 1 and date 2 How do I check whether Date2 is later than Date 1? Date1. 21-Nov-2006 09:00:00 PM
5
by: starke1120 | last post by:
Im creating a check in – check out database for RF guns. I have a table that contains models. ID (primary key) Model A table that contains Gun Details ID (primary key) Model_id...
5
by: dillneus | last post by:
Hello, I am quite begginer in MS Access and I have a problem with forming search menu. I used help from http://allenbrowne.com/ser-62.html but I have still some problems. I have check boxes for...
1
by: Constantine AI | last post by:
Here is the situation i am currently trying to update a sales order using PHP and javascript. When you click on the edit button it brings you a new site page with existing sales order details within....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.