Hi
Here is the code:
this.regPath = @"Software\FileManager\" ;
System.Security.Permissions.RegistryPermission permissions =
new
System.Security.Permissions.RegistryPermission(Sys tem.Security.Permissions.RegistryPermissionAccess. AllAccess,
@"HKEY_LOCAL_MACHINE\" + regPath);
bool regPermissions =
System.Security.SecurityManager.IsGranted(permissi ons);
It always returns true. In fact when i try to access registry:
Microsoft.Win32.Registry.LocalMachine.CreateSubKey (regPath);
key.SetValue("Height", OpenForms.MainForm.Height);
I have got exception:
System.UnauthorizedAccessException: Access to the registry key
'HKEY_LOCAL_MACHINE\Software\FileManager' is denied.
Can anyone help me with that?