PDA

Click to See Complete Forum and Search --> : Registry problem


Sean
Nov 24th, 1999, 09:31 PM
I'm using the registry functions in VB to indicate if an installation has been registered. ie On registration of an installation a value will be saved to the registry. This value is also saved to the database. When the application is statred up again the two values will be compared. If the value is not the same or does not exist in the registry a dialog box "Please register" will appear.
The problem occurs with roaming profiles on a network. If the installation is installed and registered when a particular user is logged on and a different user logs on and starts up the applicaation the message "Please register" pops up.

When using the VB registry functions where are the values saved to (off what directory in the registry HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE ect)?
Will installing and registering the application when logged on as administrator
solve this problem?

Thanks for your help.
Sean.

Inhumanoid
Nov 24th, 1999, 09:35 PM
AFAIK tweaking the registry in HKEY_CURRENT_USER will affect the current user (so when somebody else logs in they are not affected).
HKEY_LOCAL_MACHINE affects the machine...

So if you want to register your software on "machine" level instead of user level you should tweak HKEY_LOCAL_MACHINE

It is ofcourse possible to tweak HKEY_LOCAL_MACHINE trough vb...

[This message has been edited by Inhumanoid (edited 11-25-1999).]

Mark Sreeves
Nov 24th, 1999, 09:44 PM
If you use Getsetting() asn SetSetting() the registry values are put in:

HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Your App

You need to use HKEY_LOCAL_MACHINE as you suspected.

Take a look at http://www.vb-world.net/registry/registry/index.html

------------------
Mark Sreeves
Analyst Programmer

Mark.Sreeves@Softlab.co.uk
A BMW Group Company