Install Program via HKLM RunOnce, but I get access denied to add registry key
I'm trying to push out a software package where the installer has to be ran as the user who will be using the program. I found an article on this site about installing software via scripting and have it set up the installer to run an install script on the next login. Here is the article I'm taking about: http://www.kace.com/support/resources/kb/article/how-do-i-execute-a-command
When I follow those steps I seem to have a problem with the script not having sufficient privileges to add the registry key to HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce. Even if I log in as a domain user and manually run the command in that example I get an access denied error. However, if I run a command prompt as Administrator and run the command, the key is created as expected, and the software installs on the next reboot.
So, what am I doing wrong that the script doesn't have privileges to add that registry key? I have tried it with both Online and Offline KScript, and the Run As is "Run As Local System".
Thank you all in advance!