I have code to check if the registry does not exist then create it.
Strange thing is, this works perfectly on my windows 7 machine.. If i run it on my windows 10 tablet, it does not work?
I get an Unhandled Exception error:
Access to the registry key: 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EdgeUI' is denied.
My code:
Dim TabletEdgeSwipe As Object = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Policies\\Microsoft\\Windows\\EdgeUI", True)
If TabletEdgeSwipe Is Nothing Then
Registry.LocalMachine.CreateSubKey("SOFTWARE\\Policies\\Microsoft\\Windows\\EdgeUI").SetValue("AllowEdgeSwipe", "0", RegistryValueKind.DWord)
End If