+ Post New Thread
Results 1 to 3 of 3
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 ...
  1. #1
    Duke5A's Avatar
    Join Date
    Jul 2010
    Thank Post
    Thanked 154 Times in 124 Posts
    Blog Entries
    Rep Power

    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?

    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)
    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?

  2. #2

    Join Date
    Apr 2011
    Thank Post
    Thanked 0 Times in 0 Posts
    Rep Power
    Did anyone have a solution for this? I am having the same problem.

  3. #3

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Thank Post
    Thanked 1,123 Times in 1,025 Posts
    Rep Power
    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 ?

                                 Dim MyReg As Microsoft.Win32.RegistryKey =  Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, txtCompName.Text)
    why have you got the microsoft.win32.registryhive.localmachine ?

+ Post New Thread

Similar Threads

  1. Ad giving access to registry
    By ICT_GUY in forum Windows Server 2008
    Replies: 4
    Last Post: 9th February 2011, 03:22 PM
  2. Replies: 1
    Last Post: 23rd October 2009, 09:53 AM
  3. Replies: 3
    Last Post: 4th September 2009, 10:08 PM
  4. Replies: 20
    Last Post: 20th August 2009, 10:40 PM
  5. Remote Registry Import
    By Michael in forum Windows
    Replies: 9
    Last Post: 12th March 2008, 01:09 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts