Re: Access denied opening registry key

From: Markus Eßmayr (essmayr/at/racon-linz.at)
Date: 06/30/04


Date: Wed, 30 Jun 2004 17:10:47 +0200

to pass KEY_ALL_ACCESS to RegCreateKeyEx means, that you want to read and
write the key.
as you said, that the "read check box" is not set, you are not allowed to
read the key.

so you can try to call RegCreateKeyEx with only KEY_WRITE.

max

"Prashanth" <Prashanth@discussions.microsoft.com> wrote in message
news:6464D96D-788E-4058-BC25-E8CC655CD806@microsoft.com...
> Hi all,
>
> I am using "RegCreateKeyEx" for opening the registry key with security
descriptors.
> I am using KEY_READ | KEY_WRITE | WRITE_DAC access rights with
"RegCreateKeyEx". I also set SECURITY_ATTRIBUTES with KEY_ALL_ACCESS
attribute. Still I am getting error number 5(access denied) while opening
the registry key. When I saw manually right clicking on that key, under
permission I find only special permission is set. Full control and read
check boxes are not set. But I had given KEY_ALL_ACCESS in the
SECURITY_ATTRIBUTES.
>
> Can anybody please tell me how do I resolve this problem ?
>
> Regards
> Prashanth
>