MOTOBIT.COM - ASP upload, IIS utility Key Class, One registry key., Member of RegEdit

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

Description

One registry key.

Object model

Key - One registry key. (Item property, Returns a single Key object from the Keys collection.)
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

Close Releases the handle of the specified key.
CreateKey Creates the specified key. If the key already exists in the registry, the method opens it.
Delete Deletes the key.
ExistsKey Test of existence of key's subkey.
ExistsValue Test of existence of key's value.
Flush Writes all the attributes of the key into the registry.
numSubKeys The number of subkeys contained by the specified key.
numValues The number of values associated with the key.
Save Saves the key and all of its subkeys and values to a new file.

Properties

NameName of the key.
String, RW
ClassThe key’s class name.
String, RO
hKeyHandle of the opened key.
Long, RO
LastWriteTimeLast write time.
Date, RO
SubKeysSubkeys of the key.
Keys, RO
ValuesValues for the specified registry key.
Values, RO

Examples

Create one key and set its default value.

  'Get RegEdit.Server object
  Set S = CreateObject("RegEdit.Server")
  
  'Get a key
  Set Key = S.GetKey("HKLM\SOFTWARE")
  
  'Add a new key
  Set MyKey = Key.CreateKey("MyFirstKey")
  'or Set MyKey = Key.SubKeys.Add("MyFirstKey")
  
  'Set String and DWORD values
  MyKey.Values("") = "C:\Program Files\My"

Used in

Keys.Add, Keys.Item, Key.CreateKey, Server.GetKey, Value.Key

Other links for Key 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.

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