Coding Thread, VB .Net 2010 Remote Registry Access in Coding and Web Development; This is driving me nuts... I'm developing an app that will need to access and edit registry keys on a ...
14th March 2011, 01:30 PM #1
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)
IDG Tech News
5th April 2011, 04:36 AM #2
- Rep Power
Did anyone have a solution for this? I am having the same problem.
5th April 2011, 08:05 AM #3
Remote registry access with .Net 4.0
RegistryKey.OpenRemoteBaseKey Method (RegistryHive, String) (Microsoft.Win32)
In order for a key to be opened remotely, both the server and client machines must be running the remote registry service, and have remote administration enabled.
There are also some links in the 2nd URL with ref to 32 bit and 64 bit platform versions of the registry which may be of use
Also do you not require elevated access rights using a domain admin account similar to how you would in WMI ?
why have you got the microsoft.win32.registryhive.localmachine ?
Dim MyReg As Microsoft.Win32.RegistryKey = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, txtCompName.Text)
By ICT_GUY in forum Windows Server 2008
Last Post: 9th February 2011, 02:22 PM
Last Post: 23rd October 2009, 08:53 AM
By link470 in forum Windows
Last Post: 4th September 2009, 09:08 PM
By albertwt in forum Windows Server 2000/2003
Last Post: 20th August 2009, 09:40 PM
By Michael in forum Windows
Last Post: 12th March 2008, 12:09 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)