ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding/changing registry keys (https://www.excelbanter.com/excel-programming/442422-adding-changing-registry-keys.html)

Michelle

Adding/changing registry keys
 
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


Chip Pearson

Adding/changing registry keys
 
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]




On Mon, 10 May 2010 16:12:22 +0100, "Michelle"
wrote:

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



All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com