MOTOBIT.COM - ASP upload, IIS utility CreateKey Method of Key class

Method | Member of  RegEdit.Key | Changes | Purchase | Download

Description

Creates the specified key. If the key already exists in the registry, the method opens it.

Syntax

Set NewKey = Key.CreateKey (Name as String)
 

Where Type Optional Default Description
 Name  String     Name of the new key. 

Returns

Key - One registry key.

Remarks

CreateKey Method uses RegCreateKey API function.

Examples

Create ".utl" registry key.

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

  'Connect to the remote registry
  S.Connect "ServerName", rkClassesRoot

  'Add a new file type
  Set Key = S.Keys.Add(".utl")
  Key.CreateKey "ShellNew"
  Key.SubKeys("ShellNew").Values("Command") = "notepad.exe"

See also

Keys.Add

Other links for CreateKey

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