Archive: WriteRegStr creates key with too less rights


WriteRegStr creates key with too less rights
Hello there,

I want to create a registry key with several registry values.

Now, if an administrator installs my NSIS setup, he has no problem to use my software by reading those created registry key. But if another user with restricted rights tries to work with my software he is not able to read out the registry values. The reason for that is, that WriteRegStr does not create a registry key with full rights for everyone. How can I do this?

Regards,
Robert


WriteRegStr simply takes the rights of the key above it. As MSDN says:

If lpSecurityAttributes is NULL, the key gets a default security descriptor. The ACLs in a default security descriptor for a key are inherited from its direct parent key.
To change those for either of the keys, use the AccessControl plug-in.