Programmatically allow write access for a Registry key

Posted by Kerido on Stack Overflow See other posts from Stack Overflow or by Kerido
Published on 2010-03-13T12:21:35Z Indexed on 2010/03/13 12:25 UTC
Read the original article Hit count: 291

Filed under:
|
|
|

Hi everybody,

I need to programmatically modify the Access Descriptors on a known Registry key during product installation. The way I want it to work is:

  1. The installer is run in Administrative mode.
  2. A Registry key is created.
  3. A function (the one I need) queries the ACL from the key.
  4. If this function finds that the group 'Users' already has write access, nothing should be done.
  5. If not, it should add a new permission allowing write access to the 'Users' group.
  6. The permissions are saved for the Registry key.

This question is similar to Setting Registry key write permissions using .NET, however, I need a C++/Win32 implementation.

Thanks in advance

© Stack Overflow or respective owner

Related posts about c++

Related posts about registry