27 Kasım 2015 Cuma

Uac kapatma c#

I try to change my own program setting in registry, and it works well under Vista, Win 7 (UAC enabled). It just has error when running under Win8 (UAC enabled).
Thank you for your suggestion, I'll take a look at serialization.
Additional, this is my code
1RegistrySecurity rs = new RegistrySecurity();                 
2                    RegistryKey rk = Registry.ClassesRoot.OpenSubKey(subkey, RegistryKeyPermissionCheck.ReadWriteSubTree, RegistryRights.FullControl); // Opens the key again with full control.
3                    rs.SetOwner(new NTAccount("newAdmin"));// Set the securitys owner to newAdmin
4                    rs.SetAccessRuleProtection(truefalse);
5                    rk.SetAccessControl(rs);// Set the key with the changed permission so Administrator is now owner.