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

registry keys

Status
Not open for further replies.

andyukcy

Technical User
Jul 9, 2003
64
0
0
Hi!

I have a database that i give to my customers. I want to add a registry key to the computer i personally put the database on so that even if my customer copies the database and puts it on another computer it doesnt work. Only i have to know where and what registry key i have to enter to the computer for my database to work

Is that possible?
Andy
 
yes...

on the startup form of your database, write some code to check for the value of a hard coded registry key, and if it doesn't exsist, quit the db with a message...

it doesn't matter what the registry key is, just make sure you use the same one...

--------------------
Procrastinate Now!
 
Be sure to take account of the following:

1. All user accounts on that PC must have permission to read the registry key and value (this implies it has to go under the HKEY_LOCAL_MACHINE\Software key), especially in an environment with locked down settings.
It is especially important to use the HKLM registry tree if roaming profiles are in use within the organisation.

2. Ensure that this registry key/value is included in the PC or company backup scheme. I understand your need for data security, but if this company were to reinstall or replace this PC, your software would stop working.

The more important this software is to your clients, the more critical it is that they are made aware of such restrictions upon its use and have a means of transferring the license to another PC if needed.

John
 
A different approach might be to check the network name of the machine...

that way, you can keep a list of all the names of computers which can use your database, in the back end of course, and then in the start form, just check that the local computer name is in the list of names...

makes administration much easier since all you need to do is add another computer name to the list and that can be done from your own computer...

--------------------
Procrastinate Now!
 
Thank you for your replies.

The database is not in a network.

You told me to write some code to check for the value of a hard coded registry key ... any examples of such a code?

Andy
 
google for it, there's plenty of examples...

--------------------
Procrastinate Now!
 
how are ya andyukcy . . .

Have a look at [blue]Custom DB Properties[/blue] . . . they stay with the db!

Calvin.gif
See Ya! . . . . . .
 
hmm i do not want it to stay with the db!!

I couldnt find the code to chack on load of the main form whether the computer has a preset registry key
 
try googling for "scripting" "regread"

--------------------
Procrastinate Now!
 
OK andyukcy . . .

IN VBA help, have a look at the [blue]GetSetting[/blue] & [blue]SaveSetting[/blue] registry functions . . .

Calvin.gif
See Ya! . . . . . .
 
Thank you everybody for your help. I have managed to find the solution .. now that u helped me understand what i was looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top