tags:

views:

37

answers:

1

i have to create one root folder in current config. I'm storing some value in this root folder. i can delete the values in this root folder. but i cannot delete the root folder.

A: 

Use the code below to analyze your permissions for the registry key you're working with.

RegistryKey key = Registry.CurrentConfig;
RegistrySecurity rs = key.GetAccessControl();            
AuthorizationRuleCollection arc = rs.GetAccessRules(true, true, typeof(NTAccount));
foreach (RegistryAccessRule ar in arc)
{
    Console.WriteLine(ar.IdentityReference + ": " + ar.AccessControlType + " " + ar.RegistryRights);
}
Seventh Element