RegSetKeySecurity - how to change a registry key to read access only

Tech-Archive recommends: Fix windows errors by optimizing your registry



I know how to use RegSetKeySecurity, to change a registry keys access to
read only but is there a way to change to read only, where only I can change
it back to read/write?

Kinda like a password, you can read, but you can only write if you have
correct "password" (note: I can't encryt the key, which it sounds like what
I'm asking, it's not)


Is there a way to use AllocateAndInitializeSid to do this? It has 8 slots
for sub authorities....is there a way to just authorize access with sub
authorities so that only if you
use same ones again to change access right, can you have write access rights
again...?









.