Windows Registry: fixed a security issue

Windows Registry: fixed the issue when Microsoft.Win32.Registry.GetValue() required write permissions (cases 595950, 602822)