MOTOBIT.COM - ASP upload, IIS utility Server Class, Main Registry editor object, Member of RegEdit

Member of  RegEdit Use Server object | Changes | Purchase | Download

Description

Server/computer for the ActiveX regedit.

Object model

Server - Server/computer for the ActiveX regedit.
 
Keys - Collection of key objects of one registry key. (Keys property, Subkeys of the Key specified by Connect method (or by hKey property).)
 
Key - One registry key. (GetKey method, Returns specified key from remote computer.)
   
Values - Collection of value objects of one registry key. (Values property, Values for the specified registry key.)
   
 
Value - Represents one value from windows registry (Item property, Returns a single Value object from the Values collection.)
   
Keys - Collection of key objects of one registry key. (SubKeys property, Subkeys of the key.)
     
Key - One registry key. (Item property, Returns a single Key object from the Keys collection.)

Methods

AddConnection Makes a connection to a network resource (remote computer).
Close The Close method releases connected registry key.
Connect The Connect method establishes a connection to a predefined registry handle on another computer.
ExpandEnvironmentStrings Expands environment-variable strings and replaces them with their defined values.
GetKey Returns specified key from remote computer.
LogonUser Attempts to perform a user logon operation and impersonates a user. You specify the user with a user name and domain, and authenticate the user with a clear-text password.
RevertToSelf Terminates the impersonation of a client application (or ASP script).

Properties

hKeyOne of the predefined reserved handle values, or handle to registry key on the connected computer.
ReservedKeys, RW
KeysSubkeys of the Key specified by Connect method (or by hKey property).
Keys, RO
NameName of the connected remote server.
String, RO

Examples

Add a new key

  'Get RegEdit.Server object
  Set S = CreateObject("RegEdit.Server")

  'Add a new key
  Set Key = S.GetKey("HKLM\SOFTWARE").CreateKey("MyFirstKey")

List of OLEDB providers on local or remote computer

      This script lets you list all installed OLEDB providers (oledb drivers) on local or remote computer from windows scripting host/VBScript. The script can be simly modified for ASP or ASP.Net.
  'The script writes all installed OLEDB providers.
  Option Explicit

  Dim OutText, S, Key

  'Create a server object
  Set S = CreateObject("RegEdit.Server")

  'Optionally connect to another computer
'  S.Connect "muj"

  OutText = OutText & "OLEDB providers installed on " & _
    s.Name & ":" & vbCrLf
  OutText = OutText & "************************************" & vbCrLf

  For Each Key In S.GetKey("HKCR\CLSID").SubKeys
    If Key.ExistsValue("OLEDB_SERVICES") Then
      OutText = OutText & Key.Values("").Value &  vbtab & _
        " : " &   Key.SubKeys("OLE DB Provider").Values("") & vbCrLf
    End If
  Next

  Wscript.Echo OutText

Other links for Server class

ActiveX RegEdit classes

Server, Keys, Key, Values, Value

ActiveX RegEdit enums

ValueType, ReservedKeys, LogonTypes, AccessRights

RegEdit

Intuitive, easy to use COM interface to windows registry. Set of classes to read/enumerate/modify windows registry keys and values from ASP, VBS and T-SQL.

Additional notes

You can use GetKey method to get a specified key from the server.
Keys property returns a collection containing subkeys of a connected key (See Connect method).

© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: info@pstruh.cz