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

(cherry picked from commit 70fe346baf38269177067e9035dbfd07e02b89c7)