Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 8th, 2004, 08:43 AM
Authorized User
 
Join Date: Jun 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default Use of password & limit the time for using an app

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
__________________
Elisa Resina
 
Old January 8th, 2004, 10:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Code:
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.

Code:
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
 
Old January 8th, 2004, 01:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jlick
Default

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
[email protected]
 
Old January 11th, 2004, 02:58 PM
Authorized User
 
Join Date: Jun 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old January 13th, 2004, 05:25 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Remember my id & password tanzi Servlets 1 May 8th, 2008 10:20 PM
network bios command limit reached asp.net app PauliWallnuts ASP.NET 2.0 Professional 2 January 9th, 2008 01:35 PM
time zone & day light time rajn ASP.NET 1.0 and 1.1 Professional 0 August 7th, 2007 05:02 PM
Username & Password Hennie Access VBA 2 July 25th, 2006 12:33 AM
Password Storage in an App ginoitalo Beginning VB 6 0 August 13th, 2004 08:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.