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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expirable Software

Status
Not open for further replies.

rholguin

Programmer
Oct 18, 2002
7
US
How can I make my vb application expire, like a trial version application?
 
There are endless ways yo accomplish this. The most simplistic would be to store a value in the registry and check it when you start the app and update it when you close it. If you are worried about the user being able to change it, you can store that value in a more difficult to find registry key or make it a calculated value or encrypt it.
 
Thanks woyler, would you happen to have an example of how to store a value in the registry, check and update that value? a link or online resource would be nice or the code with comments would be great...Thanks again...
 
Look up SaveSetting and GetSetting in VBHelp
Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
using SaveSetting and GetSetting (and using the registry at all) is an option, but easily changed, unless you use a setting that only you can interpet, or the string is actually encrypted.
The API functions CryptEncrypt and CryptDecrypt will help you with this.
[/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Make a reference to Registry Access Functions.
Use the:
UpdateKey and GetKeyValue to get and set your values

GetKeyValue HKEY_LOCAL_MACHINE,REG_KEY "\MyKey", "MyString",MyVariable

MyKey and MyString can be whatever you want to name them.
If you want to go deeper in the Key structure use: \MyKey\MyKeyOne\MyKeyTwo"

MyString is the string value namethat will hold the data.
When using GetKeyValue "Myvariable" will hold the requested value.

When using UpdateKey "Myvariable" will be the value you are updating


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top