Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need ideas on best way to distribute demo app

Status
Not open for further replies.

RobinHood786

Technical User
Feb 14, 2007
12
0
0
GB
Hi all,

I’m going to be distributing a demo version of an app, which I want to allow users to run unrestricted for 6 months, after which time I want to either allow usage with restricted functionality or simply display a messagebox then exit. (Not quite decided on which way to go)

I was wondering how others implemented such restrictions. My initial thoughts are to simply compare the current date with a date in a table and if the current date matches or is greater then the table date have a Boolean field in the same table set to true. Then, perhaps on the load event of the startup form, test for the value of the Boolean. If true trigger a message before exiting, or apply restrictions on usage, although I’m not sure yet how I’d go about doing the restrictions thing (perhaps testing for the value of the same Boolean again before allowing execution of code would do the trick).

Any thoughts, ideas or a heads-up for gotchyas, will be gratefully received.
 
I'm thinking og using the same technique, but how do you secure your code?
The only way I can see is to buy "Visual Studio 2005 Tools for Office" that includes "Access 2003 Developer Extensions" and "Access 2003 Run Time Licence". But it's expensive and impossible to get a demo version to try it.

Any one who has tried it?
Any other ideas?
 
Not very sophisticated but I have used following expiration of use method on MS Access 2000/2002 / Office XP Developer application.
Application quits after 183 days use.
Table (tblexpiry) created with two fields (Index,firstdate).
Open Form procedure initialises the start date, after 183 days program quits withot opening form.
Show remaining validity in days in textbox (txtevalexpiry) on form opened.
My code without error handling..
Code:
Private Sub Form_Open(Cancel As Integer)

Dim cnfirst As ADODB.Connection
Dim rsexpiry As New ADODB.Recordset
Dim remainingdays As Integer

Set cnfirst = CurrentProject.AccessConnection

rsexpiry.Open "tblexpiry", cnfirst, adOpenKeyset, adLockOptimistic, adCmdTable
'Initialise the validity commencement date

If rsexpiry.EOF Then
rsexpiry.AddNew
rsexpiry![firstdate] = date
rsexpiry.Update

Else
rsexpiry.MoveFirst
        If rsexpiry!firstdate < date - 183 Then
        MsgBox "Evaluation License period has expired" & vbCrLf & vbCrLf & "To continue you must renew your license",,"License expired"
        DoCmd.Quit
        Else
        remainingdays = 183 - DateDiff("d", rsexpiry![firstdate], date)

Me.txtevalexpiry.Value = remainingdays
        End If
rsexpiry.Close
Set rsexpiry = Nothing
End If
Exit Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top