writing to registry access denied

This is a discussion on writing to registry access denied within the C# Programming forums, part of the General Programming Boards category; on windows tablet PCs, the registry key "HKLM\SOFTWARE\Microsoft\TabletTip\DisableInPl ace" contains a list of programs that do not allow a long ...

writing to registry access denied

on windows tablet PCs, the registry key "HKLM\SOFTWARE\Microsoft\TabletTip\DisableInPl ace" contains a list of programs that do not allow a long press to bring up an onscreen keyboard.

the trouble I am having is that when I try to update entries in that key, I get an access denied error on windows 7. I am running the program as an administrator, and I have UAC turned off. There should be nothing preventing me from updating that registry key, but yet I cannot. what can I do to write to that key?

The difference is that you're editing the values of the DisableInPlace key (which has a different DACL that lets admins write to it), not the TabletTip key (which has the DACL above). Try and make a new subkey for TabletTip in regedit (a sibling for DisableInPlace, not a child of it). Unless you've manually changed the permissions, it'll fail.

CreateSubkey-ing your way down the chain asks for write access all the way. You only need write access for the last leaf, not all the branches. This is the case whenever you write to the registry. Asking for more permissions than you need just sets yourself up for failure when the user doesn't actually have that level of security.