Registry

G

Guest

A co-worker and I are collaborating on a vb.net app that automates some of
the processes our team uses. We wrote preferences for the application that
are stored in the registry. Problem that the preferences are not stored
unless the users have admin rights to their workstations. I know that many
applications store information in the registry and are able to do this
without the users having admin rights to the workstations.

So the question is, how can I make it so that a vb.net app can write to the
registry (or at least a certain piece of it) if the user is not a local admin?

Thanks!!!

-Chad
 
A

AlanT

Not too sure about trying to run different parts of the application
with different permissions but you may not need to.

A user does not need admin privileges to write to the HKEY_CURRENT_USER
registry hive.

The usual shape I have seen for settings in the registry is

1) Place the default settings in the HKEY_LOCAL_MACHINE hive

e.g.
HKEY_LOCAL_MACHINE\Software\MyApp\Settings


2) Whenever a user changes settings they are added to HKEY_CURRENT_USER

HKEY_CURRENT_USER\Software\MyApp\Settings

or, if previously added, modified there

3) When the application runs, it first checks for current user settings
(if any) and
if there are none, then it reads the defaults from local machine.


hth,
Alan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top