You use the Resource Kit utility regini . Create a script file with the lines of the form:
\Registry\Machine\Software [1 5 8] that is registry key followed by groups with permission. To apply the permissions, run
REGINI [-m \\computername] scriptname where -m \\computername is used for remote execution (assuming you have admin rights.
Whats that [1 5 8] stuff?
1 is Administrator Full Control
5 is Creator Full Control
8 is World
R
For a full listing and more details see Q245031 - How to: Use a Script to Change Registry Permissions from the Command Line