I'm writing a login script and I need to write entries into the registry when a normal domain user logs in.

I get an error 5 which I'm assuming is access denied.

Our company policy turns off regedit for domain users.
I've tried to search for something like my situation but it doesn't cover it totally or the topic goes off tangent.

If there is something specific, forgive me, my head is spinning reading though the threads and I'm approaching a deadline and really need to get something working.

This is all I have for code (pretty straight forward).

 Code:
writevalue( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","LegalNoticeCaption","Important Notice from ATI","REG_SZ")


Thanks in advance.

Smudley
_________________________
Thanks, Smudley