MOTOBIT.COM - ASP upload, IIS utility SubKeys Property, read only of Key class

Property, read only | Member of  RegEdit.Key | Changes | Purchase | Download

Description

Subkeys of the key.

Syntax

Set vSubKeys = Key.SubKeys

Returns

Keys - Collection of key objects of one registry key.

Remarks

SubKeys Property uses RegEnumKey API function.

Examples

Enumerate subkeys.

  'Get RegEdit.Server object
  Set S = CreateObject("RegEdit.Server")
  
  'Get a key
  Set MyKey = S.GetKey("HKLM\SOFTWARE\MyFirstKey")
  
  'Delete subkeys
  For Each Key In MyKey.SubKeys
    Wscript.Echo Key.Name
  Next

Add new key

  'Get RegEdit.Server object
  Set S = CreateObject("RegEdit.Server")
  
  'Get a key
  Set Key = S.GetKey("HKLM\SOFTWARE")
  
  'Add a new key
  'or Set MyKey = Key.SubKeys.Add("MyFirstKey")

See also

Key.Values, Server.Keys

Other links for SubKeys

Methods of Key class

Close, CreateKey, Delete, ExistsKey, ExistsValue, Flush, numSubKeys, numValues, Save

Properties of Key class

Class, hKey, LastWriteTime, Name, SubKeys, Values

RegEdit.Key

One registry key.

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