?
Solved

Password protecting against date changes

Posted on 2006-11-27
4
Medium Priority
?
145 Views
Last Modified: 2010-04-30
I have password protected my software by generating a password that relates to hard disc ID, computer name, email, date of installation etc. Is there an easy way to prevent users changing the system date to reactivate the software after a license period expires?
0
Comment
Question by:pgalloway
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

by:Clif
ID: 18022406
I presume you store the info in a hidden file (or in the registry)

What you can do is also store that last date the info was requested that was on or after the currently stored date.  If the system date ends up being before the stored date, you know the user changed the system date and you can deactivate your app.

I don't know how you're storing your password, so I can't give you code.  But, hopefully, you understand what I'm saying and can implement it.
0
 

Author Comment

by:pgalloway
ID: 18022448
OK this is very obvious really, when you know how. Thanks very much Clif.
0
 
LVL 10

Accepted Solution

by:
Clif earned 500 total points
ID: 18022800
I'm thinking something like this:

    Dim dtNow As Date
    dtNow = Now
    Dim dtStoredDate As Date
    dtStoredDate = GetSetting(App.EXEName, "Security", "Date", dtNow)
    If dtStoredDate > dtNow Then
        'The system click has been altered in an attempt
        'to override licensing
    Else
        SaveSetting App.EXEName, "Security", "Date", dtNow
    End If
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 18024146
If the users date is pulled back to an earlier date than you should disable using the program all together and end the trial period regardless of how many days would be remaining. In reality the indivudual who sets the clock back to try and bypass the trial for more days isn't really interested in purchasing your software. Now you may say what about the other reasons that might occur, pherhaps the date changing because of a bad bios or by other means. Don't worry about those situations they won't blame your trial method but the computer itself.

The idea is to subclass for a WM_TIMECHANGE ( http://vbnet.mvps.org/index.html?code/subclass/datetime.htm )
You should also check if the computer is connected to the internet and query a time server, this can't be changed by the user so it will always work behind the scenes. Also make sure if the user doesn't have a connection to have a backup method, I wouldn't recommend using a file to store the date and time settings. I would use the registry and set a dacl on the hkey so the user can't open the key to edit the values.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question