My Assistant
![]() ![]() |
|
|
Apr 29 2012, 07:22 PM
Post
#1
|
|
|
New Member Posts: 18 |
Hi,
I would like to add a time limit to my application. So that after a certain time period the application will no longer be able to open. I can then issue the user a new license key or a new version of the software. Something of that sort. I know security measures can be defeated, but I am trying not to make it as simple to defeat as rolling back the windows clock. Purpose: This Application is for internal company use only. In the event a user leaves the Company and takes the software with them to another Company, I would like to know the software will eventually expire. I have created an Access Application using:
I will be deploying this application with Runtime 2010 (32 Bit) and Runtime 2010 (64 Bit) I have been racking my brain over here for days :/ Any help would be GREATLY APPRECIATED Thanks in advance, Dave |
|
|
|
Apr 29 2012, 07:38 PM
Post
#2
|
|
|
UtterAccess Veteran Posts: 303 From: Edmonton, Alberta, Canada |
Does it need to be a standalone application, or would the users always be connected to the company network. I haven't done this myself, but if they were on the network, you could just check for something on your company's server to allow it to open.
Just a thought. |
|
|
|
Apr 29 2012, 07:42 PM
Post
#3
|
|
|
New Member Posts: 18 |
The application will be mainly for Field Use with laptops not connected to the network.
|
|
|
|
Apr 29 2012, 08:35 PM
Post
#4
|
|
|
UtterAccess Veteran Posts: 303 From: Edmonton, Alberta, Canada |
Not sure if you looked through this topic yet, but it may be something along the lines you're looking for.
http://www.UtterAccess.com/forum/Database-...ys-t564179.html I don't have much experience in the security aspects either, but am intrigued by your question. One other idea might be that the user must activate it while connected to the network upon first use. After that, you could base the usage period on the laptop clock, and if the clock's date ever goes back by more than 1-2 hours (account for daylight saving time), you could make the application inoperable. I'm sure there's probably a workaround to this as well, but haven't yet thought that far ahead. This post has been edited by darnellk: Apr 29 2012, 08:37 PM |
|
|
|
Apr 29 2012, 09:12 PM
Post
#5
|
|
|
New Member Posts: 18 |
I gave that one a try without luck. I would even be open to purchasing 3rd party software but I have yet to find one that works with my version of access or with any actual examples in the newer access accdb format.
|
|
|
|
Apr 30 2012, 02:24 AM
Post
#6
|
|
|
UtterAccess VIP Posts: 7,584 From: South coast, England |
Hi Dave
I've created several new database properties and use a pseudo random number authorisation code, The expected authorisation code is stored in a db property and if this is entered into the db by a user then the expiry date is calculated and entered into a second database property. To prevent the user circumventing the expiry data by winding the system clock back, a third property is used which stores the date the database was last opened. If the system date is earlier than the date the db was last opened then the code can detect this and prevent the db being opened. An informed Access developer can work around this but it does make it more complex then just winding the system clock back. hth |
|
|
|
Apr 30 2012, 06:06 AM
Post
#7
|
|
|
New Member Posts: 18 |
Wow that sounds great. Are you able to send me the code/instructions?
Thanks, Dave |
|
|
|
May 1 2012, 09:20 AM
Post
#8
|
|
|
UtterAccess VIP Posts: 7,584 From: South coast, England |
Hi Dave
Sorry for the delay, been busy! I've also had to extract the code and tidy it up a bit (IMG:style_emoticons/default/wary.gif) So although it has been tested, and used! it will need checking out further. Note that the code creates and uses properties in the db back End, you will need to have at least one linked table to the BE, and to specify this table in the constant 'strLnkTbl'. hth
Attached File(s)
|
|
|
|
May 1 2012, 11:51 AM
Post
#9
|
|
|
New Member Posts: 18 |
Bernie,
I appreciate your help. This works well. (IMG:style_emoticons/default/smile.gif) I have the following questions: 1. How can I modify this to expire after say 3 Months? 2. testing purposes trying to roll the windows clock back how can I go about setting the app to expire in a day or so? Thanks, Dave |
|
|
|
May 1 2012, 01:18 PM
Post
#10
|
|
|
UtterAccess VIP Posts: 7,584 From: South coast, England |
Hi Dave
QUOTE how can I go about setting the app to expire in a day or so? If you add the following sub to the module, then set dtExpire to the date you want (in format mm/dd/yyyy) and run the sub, it will set the expiry to the date you want. CODE Public Sub SetExpiry() Dim strFileName As String Dim dbs As DAO.Database Dim dtExpire As Date dtExpire = #5/2/2012# 'Find BE file path and name, by finding databsae for linked table strLnkTbl from 'MSysObjects' strFileName = Nz(DLookup("Database", "MSysObjects", "ForeignName ='" & strLnkTbl & "'"), "") Set dbs = DBEngine.Workspaces(0).OpenDatabase(strFileName) dbs.Properties("ExpireDate") = dtExpire dbs.Properties("DateCheckCode") = FindCheckCode(dtExpire) dbs.Properties("Lastdate") = Date dbs.Close Set dbs = Nothing End Sub QUOTE How can I modify this to expire after say 3 Months? hmm, now that is more tricky as the authorisation code will have to vary on a month to month basis, you will have to replace each occurence of DateAdd("yyyy", 1, Date) and each occurence of Year(Date) + 1 Let me give this some thought! hth PS: I left out a line of code in the function CheckAuthorisation() Could you add the line dbs.Properties("Lastdate") = Date Immediately before the line CheckAuthorisation = True |
|
|
|
May 1 2012, 02:10 PM
Post
#11
|
|
|
UtterAccess VIP Posts: 7,584 From: South coast, England |
Hi Dave
I've changed the db to specify a constant (intMntExp) as the number of months expiry. then changed the calculation for the expiry date dtExpire from dtExpire = DateAdd("yyyy", 1, Date) 'Current authorisation expired set new authorisation 12 months from current date To dtExpire = DateAdd("m", intMnthExp, Date) 'Set expiry date (intMnthExp months from today's date) I've also changed the Check code calculation to call NextAutCode, which will return the authorisation code based on the 1st day of the month (this means that an authorisation code will ony be valid for a month!) if you want to be able to set varying periods for the expiry, e.g. 3 months and 12 months, then you will need to make intMntExp a variable and be able to pass the expiry period for the database as (e.g.) part of the authorisation code. hth NB: I've modified the attached db but have NOT tested it any further!
Attached File(s)
|
|
|
|
May 1 2012, 04:27 PM
Post
#12
|
|
|
New Member Posts: 18 |
Wow I am very impressed!! I can't thank you enough.
This is exactly what I had in mind. The testing procedure worked great as well. (IMG:style_emoticons/default/thumbup.gif) |
|
|
|
May 2 2012, 02:51 AM
Post
#13
|
|
|
UtterAccess VIP Posts: 7,584 From: South coast, England |
(IMG:style_emoticons/default/yw.gif)
Good luck with your project. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 20th May 2013 - 09:22 PM |