Results 1 to 8 of 8
  1. #1
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107

    Database expiry date

    I created an MS access database and I want to apply for its users a license that expires after a specific number of days.


    I solved the issue using vba on startup, and now the software stops when the expiry date is reached. The problem is if the user changes the date of his PC to an old date, the software works normally. Is it a good idea to relate the expiry of software's license with a specific date? How can I solve this issue, any idea? Is there a better solution than what I'm thinking?

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    how realistic do you think it is that a client will mess up all their other applications (such as email) that rely on the system date/time just to save your license fee?

    However if you consider it a risk, every time the app is started, check the date against the previous date the app was opened. If later, then all is good so save the current date somewhere secret for next time. If earlier then your client has changed the system clock so deduct the difference from your expiry date.

  3. #3
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107
    Quote Originally Posted by Ajax View Post
    how realistic do you think it is that a client will mess up all their other applications (such as email) that rely on the system date/time just to save your license fee?

    However if you consider it a risk, every time the app is started, check the date against the previous date the app was opened. If later, then all is good so save the current date somewhere secret for next time. If earlier then your client has changed the system clock so deduct the difference from your expiry date.
    Yes that could work.
    Thank you

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Agree with Ajax.
    Of course if your app is very expensive they might decide its worthwhile changing the system date to start your app then swop back afterwards

    You could also add a registry key to further safeguard your app
    However, whatever steps you take - if someone really wants to hack your app, they will find ways to do so.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107
    Quote Originally Posted by isladogs View Post
    Agree with Ajax.
    Of course if your app is very expensive they might decide its worthwhile changing the system date to start your app then swop back afterwards

    You could also add a registry key to further safeguard your app
    However, whatever steps you take - if someone really wants to hack your app, they will find ways to do so.
    Yes that's exactly what I was thinking of, users can change the time to start the app and then change it back. Ajax's idea is a nice solution, also I stored the previous date in a text field with a password mask and I added some special characters that no one knows. Now at the app startup, I remove the characters from the previous date and compare it with current date.

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    OK but will that actually work in practice?
    For example, your app is due to expire on 16 Aug 2019 (16/08/2019).
    The user notes that date in order to bypass any issues.
    The last unedited date of use is say 14/08/2019 10:35
    After the expiry date, the user resets the date to 14/08/2019 10:36. The app will work.
    Next time, its reset to 10:37 on the same day. Again it works...and so on.
    Even if you don't check the time, reusing the same date should still work

    Good luck!
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107
    Quote Originally Posted by isladogs View Post
    OK but will that actually work in practice?
    For example, your app is due to expire on 16 Aug 2019 (16/08/2019).
    The user notes that date in order to bypass any issues.
    The last unedited date of use is say 14/08/2019 10:35
    After the expiry date, the user resets the date to 14/08/2019 10:36. The app will work.
    Next time, its reset to 10:37 on the same day. Again it works...and so on.
    Even if you don't check the time, reusing the same date should still work

    Good luck!
    Yes you are definitely right, I didn't think of this. Now I need to add a timer to find duration of usage, and then when the app closes, I add this duration to the last date.

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Whilst you're making it harder to hack, I don't think its much more secure than before.

    You could try using one or more of the system timer functions and see whether any of these ignore the Windows date/time settings.
    I have 6 different functions you can test in the timer comparison tests app on my website
    http://www.mendipdatasystems.co.uk/t...sts/4594552971

    Each work in a different way but I've never tested them for this purpose.
    If none of those help, I think you have to accept this method will never be 100% secure.

    How much is your app anyway and how many do you expect to sell?
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need help for code to limit database usage period
    By Freddie81 in forum Programming
    Replies: 11
    Last Post: 03-16-2018, 09:57 AM
  2. 30 day trial
    By CHEECO in forum Access
    Replies: 3
    Last Post: 07-03-2016, 03:30 AM
  3. Replies: 3
    Last Post: 03-08-2014, 06:01 PM
  4. Set Database to Expire in time period
    By robsworld78 in forum Access
    Replies: 12
    Last Post: 06-07-2011, 06:54 AM
  5. Access trial
    By David.T in forum Access
    Replies: 2
    Last Post: 04-08-2010, 04:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums