VB .Net 2010 Remote Registry Access
This is driving me nuts... I'm developing an app that will need to access and edit registry keys on a remote system; which mostly works. I can create/edit/delete values, and create registry keys, but cannot delete keys. This is a domain environment, and all the necessary rights have been granted. I can use regedit from the box I am writing the code on to connect to the test machine's registry, and delete all the keys I want, so the problem has to be with my code. Does anything stand out to you guys?
Every time I run this portion of code, it bombs out with "The procedure number is out of range." It doesn't seem to matter if I call it from MyReg, or regKey. Any ideas guys?
Dim MyReg As Microsoft.Win32.RegistryKey = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Micr osoft.Win32.RegistryHive.LocalMachine, txtCompName.Text)
Dim regKey As Microsoft.Win32.RegistryKey
regKey = MyReg.OpenSubKey("Software\TightVNC", True)