You can use two methods from the command line to manage rights on registry keys.
Method one is to use the regini.exe tool in a command script. The regini.exe command takes a text file with the settings to apply and sets the registry permissions. The format of the text file is quite archaic. I usually manually set what I want and export the settings with regini, clean up the generated file and use that to deploy the settings.
Method two is using a VBScript to set the registry permission. I am not a VBScripter so someone writes VBScript can address how-to. There is also the Hey Scripting Guy resource on Microsoft’s web site with some VBScripting help.
A major consideration for performing this is that user hives are difficult to mange remotely so you may want to deploy the script to the target systems and run locally.
KBs on using REGINI.EXE
Another potential method would be to use PowerShell if you have that deployed.