?
Solved

Registration & Registry

Posted on 2005-04-22
7
Medium Priority
?
182 Views
Last Modified: 2010-05-02
Question re. VB & Registry.

I've built in app. which I'd like to be time-limited shareware. So, am after some code that does this:

1. after app is used for time X, it writes a value to registry to indicate 'expired'.
2. if app is registered, it writes a value to registry to indicate 'active'.
3. if user deletes the app, downloads and installs another instance of the app and tries running it, app will check if 'expired' value for the app exists in registry. If it exists, app is not permitted to run. If however value 'active' is read, app will run.

Appreciate your help, experts!

-DocNash
0
Comment
Question by:DoctorNash
5 Comments
 
LVL 19

Expert Comment

by:DreamMaster
ID: 13841255
Read this http://www.windowsdevcenter.com/pub/a/windows/2004/07/27/VB_Registry_Values.html I'm sure it will help you accomplish what you try to acchieve.. ;)

Regards,
Max.
0
 
LVL 12

Expert Comment

by:gbzhhu
ID: 13841407
Are you after code to do the registry manipulation or code to do the whole logic?
0
 

Author Comment

by:DoctorNash
ID: 13845680
GBZHHU,
Am after just the logic to do the Registry part. I've got a license key system working which unlocks additional features in the app when a user enters a key. After the key is entered, the app writes the key to a text file and every time the app is started up, it reads the key from there and validates it. If validated, the app starts up in 'full features' mode. All this good.
However, now wish to implement time-limited usage (not 'feature crippling'). I'm assuming Registry is the best place to write and read info from, about cumulative use duration of the app/that the trial period has ended/that the app is active. Haven't written to the Registry before, so am seeking guidance as to what to do. In your solution, you need only state what triggers are required to come from the app. at what point eg, when app is first installed, 'check status  key' for expired/active. Then show reading of the key. If neither exipired/active are read, then app is in trial period so 'increment time key', and show updating of this key as the app is used.
Thanks,
DocNash
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 13849957
http://www.activelock.com/ does this for you
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 14432619
PAQed with no points refunded (of 100)

modulo
Community Support Moderator
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month15 days, 12 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question