MOTOBIT.COM - ASP upload, IIS utility Value Default Property of Value class

Default Property | Member of  RegEdit.Value | Changes | Purchase | Download


Value of the registry value.


vValue = Value.Value
Value.Value = vValue




To exactly set type of the value, use SetValue method
- numeric values (I4, UI4, DECIMAL, Currency...) are interpreted as vtDWord
- string (BSTR) and date values are interpreted as vtString
- byte array(VT_ARRAY | VT_UI1) as vtBinary

To work with binary data in VBS/JS see ByteArray class or Work with binary data in VBS article.


Set values by Value property and SetValue method

  '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")

  'String and DWORD values
  MyKey.Values("Path") = "C:\Program Files\My"
  MyKey.Values("Timeout") = 250

  'Set binary value - type exactly specified
  MyKey.Values("BinaryData").SetValue ChrB(65) & ChrB(0) & ChrB(66) & ChrB(0), vtBinary
  'Set MultiString value - type exactly specified
  MyKey.Values("MultiString").SetValue "First String" & Chr(0) & "SecondString", vtMultiString
  'Set ExpandString value - type exactly specified
  MyKey.Values("DLLPath").SetValue "%Windir%\System32\My.DLL", vtExpandString

See also

Value.Type, Value.SetValue

Other links for Value

Methods of Value class

Binary, Delete, Key, SetValue

Properties of Value class

Expanded, Name, Type, Value


Represents one value from windows registry


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: