Subject: Use of password & limit the time for using an app
Posted By: eresina Post Date: 1/8/2004 7:43:49 AM
Hello.

I need an advice and help for the 2 questions:

I have an application and i need to distribute it to some clients but i must ensure it will only work for 1 year. After that they need to ask us a key or something else like a key to continue working with the application. What's the best approach in this situation? Where can i find examples and articles or books to read about?

Another question as to do with the use of password. I need to have a password that will give access to some menus in the app (a password for us) and a password for the client to let they use the menus built for them. Again, i ask what's the best approach in this situation? Where can i find examples and articles or books to read about?

Thank's in advance to all.




Elisa Resina
Reply By: owain Reply Date: 1/8/2004 9:34:47 AM
In answer to your first question, the easiest way to limit the app to only running for one year is to include a hard coded expiry date and only allow the software to run if the current date is before this date. Then in one year re-compile the software with a new later expiry date and ship this out to your customers again.

Const EXPIRY_DATE As Date = "2005-01-08"

Sub Main()

    If Now >= EXPIRY_DATE Then
        MsgBox "Software has expired"
        End
    Else
        'Continue loading software
        ...
You could also include this expiry date in a hidden file, then when the software expires the user will have to enter a code, if this code is correct then change the date in the file. There are plenty of other ways of doing this. For example you could use some form of licensing where you supply a licence value with an expiry date some how included in the code, then when the current date is after this date the client must enter a new licence value. Try searching for Encryption and Licensing on the net.

In answer to your second question, this is relatively easy, when you log on the password is checked and if it is a client password then only show the client menus, otherwise show the developer menus as well.

If Password = Developer Password then
    mnuDeveloper.Visible = True
Else
    mnuDeveloper.Visible = False
End If
This could adapted to several other menus and passwords if required.

Regards
Owain Williams
Reply By: jlick Reply Date: 1/8/2004 12:13:01 PM
If you are writing a distributed application, and the client app is all that is delivered, you could have the verification of the users identity & expiration date on the server. That way you can control them. This obviously isn't an option if all the functionlity is being delivered in the client application.

John R Lick
JohnRLick@hotmail.com
Reply By: eresina Reply Date: 1/11/2004 1:58:35 PM
Thanks guys! I still have another question. If the client changes the current date, how can the application detect it.

About distribute the application. It will be to a client company  to help follow the development of the work we are doing for them.



Elisa Resina
Reply By: owain Reply Date: 1/13/2004 4:25:56 AM
Every time the application starts you could write the current date and time out to a control file (perhaps with a cryptic name in the WINDOWS SYSTEM directory).

This would mean that every time your app loads you could compare the current date with the one in the control file, if the file's date is after today’s date then you know that someone has been tampering with the computers date and you do not allow them to use the program.

It is probably a good idea to encrypt the date in the control file so that people can not change it if they work out what the file's name is.

Regards
Owain Williams

Go to topic 8476

Return to index page 971
Return to index page 970
Return to index page 969
Return to index page 968
Return to index page 967
Return to index page 966
Return to index page 965
Return to index page 964
Return to index page 963
Return to index page 962