private static bool IsWritable(int rights)
{
return (rights & (Interop.Advapi32.RegistryOperations.KEY_SET_VALUE |
Interop.Advapi32.RegistryOperations.KEY_CREATE_SUB_KEY |
(int)RegistryRights.Delete |
(int)RegistryRights.TakeOwnership |
(int)RegistryRights.ChangePermissions)) != 0;
}
}