Adding/changing registry keys

M

Michelle

I used to do stuff periodically with registry keys from Excel. Are there any
issues with more modern versions of Windows and permissions?

Are there areas of the registry that I can use/can't use

Does a user have to have administrator rights for my code to write to the
registrty?

Thanks

M
 
C

Chip Pearson

Broadly speaking, you should restrict yourself to the
HKEY_CURRENT_USER region of the registry. Leave LOCAL_MACHINE and
CLASSES_ROOT alone and let Windows or other applications use those
regions. If you screw up the registry, it is much easier to fix things
up in CURRENT_USER than in CLASSES_ROOT. CURRENT_USER is basically a
hybrid of LOCAL_MACHINE and USERS that is built when you log on to
Windows.

You should have sufficient permissions without admin rights to modify
CURRENT_USER and most of LOCAL_MACHINE.

I have code that wraps up all the Windows registry API functions and
types into nice neat VBA-friendly procedures at
http://www.cpearson.com/Excel/Registry.htm . I also have a compiled
DLL of VBA-friendly registry functions at
http://www.cpearson.com/Excel/RegistryWorx.aspx .


Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]
 

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