Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create read only registry key?

Is there any way to create a read only registry key in C#?

like image 289
sma6871 Avatar asked Jan 16 '23 01:01

sma6871


1 Answers

When you create a subkey you can provide permissions, and you can also call SetAccessControl afterwards. Both of these use the RegistrySecurity class to represent the ACLs.

It's not as simple as "read-only" but it should be able to represent what you want.

like image 99
Jon Skeet Avatar answered Jan 24 '23 20:01

Jon Skeet