Generally speaking, everything in the registry is local to the
machine, and if there are multiple user accounts on a single machine,
each user account will have a separate HKEY_CURRENT_USER region.
Basic application data, items over which the user has no control via
your program, are typically stored in HKEY_LOCAL_MACHINE. Any option
that the use has control of, and that two users may want different
values for, should go in HKEY_CURRENT_USER.
If you are using GetSetting and SaveSetting, those values are stored
in HKEY_CURRENT_USER so each user will have his own set of values and
one user cannot see the values of another user. These values cannot be
shared amongst users.
This is all local to one machine. If you need to store configuration
values to be used by all users on all machines connected to your
network, you can use text-based configuration files (e.g., ini text
files, or, better, XML files). At startup, the application would
connect to the network, read the configuration data out of the data
store on the server (text, xml, perhaps even a database) and act
accordingly to the values of the config data.
I have an ActiveX DLL that wraps up all the various registry-related
API functions into a nice neat VBA-friendly set of functions. You can
get more details and a download at
http://www.cpearson.com/excel/registryworx.aspx.
RegistryWorx allows you to work with any hive (CURRENT_USER,
CLASSES_ROOT, LOCAL_MACHINE) and any key contained therein. However,
it does not support remote registry access (yet). Send me an email if
you want the VB6 source code for the DLL.
Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Sun, 21 Dec 2008 15:29:00 -0800, Howard31
wrote:
Hi All,
I'm developing an application which will be used on a company network. I am
saving and retrieving settings to the registry, now by default the
SaveSettings saves the settings to the CurrentUser section of the registry,
does that mean that every computer on the network will save and retrieve
different settings? In this application I need that at least some of the
vsettings should be the same for each user and others should be user based,
is there a way with VBA to save the settings so that all computers get the
same values?