What I did wrong this time...  
Author Message
Michael_P2234





PostPosted: Visual C# General, What I did wrong this time... Top

I thought I had it fixed when working on my registry program, but apparently not. I need help logging into my main account because I get told that I can't log on because access is denied. I do have a backup file, but seeing as how nothing major was changed but my permission to log on, I'm hoping I can somehow change the security to let me back in. BTW, my admin account doesnt have access to visual studio seeing as how it wasn't installed under it.

The registry key I have been working in is HKEY_CURRENT_USERS.

Althought I did set some security that I thought would allow me to just read a key and hopefully not change permissions:

RegistryAccessRule regAccessRead = new RegistryAccessRule(user,
RegistryRights.ReadPermissions | RegistryRights.Delete,
InheritanceFlags.None,
PropagationFlags.None,
AccessControlType.Allow);

RegistryAccessRule regAccessWrite = new RegistryAccessRule(user,
RegistryRights.ChangePermissions,
InheritanceFlags.None,
PropagationFlags.None,
AccessControlType.Deny);

regSecurity.AddAccessRule(regAccessRead);
regSecurity.AddAccessRule(regAccessWrite);




Visual C#2