I had a similar problem where I needed to write to an HKLM key as I only wanted a script to run once and not everytime different people logged on. There is a program called regini.exe (part of the 2000 resoure kit). You can call this in a startup file before the user logs in. This exe allows you to edit the permissions of keys allowing users to write to them. A very useful tool!!!!

Hope this helps