Registration & Registry

Posted on 2005-04-22
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!

Question by:DoctorNash
    LVL 19

    Expert Comment

    Read this I'm sure it will help you accomplish what you try to acchieve.. ;)

    LVL 12

    Expert Comment

    Are you after code to do the registry manipulation or code to do the whole logic?

    Author Comment

    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.
    LVL 69

    Expert Comment

    by:Éric Moreau does this for you

    Accepted Solution

    PAQed with no points refunded (of 100)

    Community Support Moderator

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now