Here's how we manuallyassign permissions to a registry key:
Assign Permissions to a Registry Key
Open Registry Editor. Click the button for which you want to assign permissions.
From the Edit menu, select Permissions.
Assign the access level to the selected key as follows:
To give the user the right to read the contents of the key, but not save any changes made to the file, in the Permissions for name section, for Read , select the Allow check box.
To grant the user the right to open, edit and own the selected key in the "Permissions for the name" section for Full control , select the Allow check box.
To grant the user special permission in the selected key, click Advanced.
So my question is: is it possible to do this programmatically? Say, if I want to give users full control for a specific section, how can I write code in C #? Many thanks.
source
share