Use the following best practices when dealing with the Windows registry.
Vista update:a) Always open registry keys with read-only access when possible. Use read-write access only when needed and revert the permissions back to read-only once the operation is complete.b) Beware of WRP (Windows Resource Protection) that might be protecting a hive you might want to store your app data into and may result in access denied error message and ultimately broken app functionality.c) How to find out if WRP is active for a registry key, Two ways of doing this.
a. Programmatic: Call the SfcIsKeyProtected function in your code . b. Administratively: Use Regedit by right-clicking the key in question Permissions. Keys that are WRP will show Trusted Installer with Full Control. SYSTEM, Administrators, and Users will only have Read permissions.
d) Hopefully, the registry changes are being doing through a thick-client and not IE. If it is IE, btw, remember that in Vista runs IE in protected mode and so wont be able to store to HKCU.