Results 1 to 2 of 2

Thread: ACCESSING REGISTRY REMOTELY

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    8

    Lightbulb

    Does anybody know how to access the registry on a separate, remote machine through VB? I am writing a diagnostic program and need to be able to check the registry settings on several remote machines.


  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    60

    Cool

    If you know how to use the standard registry API's already you will find this simple, else contact me and i will take you through registry api's.

    The main difference is instead of opening the registry using regopenkey you use regconnectregistry.

    here is the declare:

    <---Start of API Declare--->
    Declare Function RegConnectRegistry Lib "advapi32.dll" Alias "RegConnectRegistryA" (ByVal lpMachineName As String, ByVal hKey As Long, phkResult As Long) As Long
    <---End of API Declare--->

    phkresult is the key to the registry that you use in calls like regDeleteKey etc.

    lpMachineName is the UNC of the remote machine ie. \\TRINITY

    hKey is the registry root key you want to access, ie. HKEY_LOCAL_MACHINE.

    hkey Constants

    <---Start of constants--->
    Public Const HKEY_CLASSES_ROOT = &H80000000
    Public Const HKEY_CURRENT_CONFIG = &H80000005
    Public Const HKEY_CURRENT_USER = &H80000001
    Public Const HKEY_DYN_DATA = &H80000006
    Public Const HKEY_LOCAL_MACHINE = &H80000002
    Public Const HKEY_PERFORMANCE_DATA = &H80000004
    Public Const HKEY_USERS = &H80000003
    <---End of constants--->

    Hope this has helped you


    Grant French

    E-Mail: [email protected]
    ICQ: 33122184

Posting Permissions

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



Click Here to Expand Forum to Full Width