IRegistryKey Property: KeyValue

Property Name
KeyValue

Property Type
String

Description
Gets or sets data for the value of a key. It creates a new value if it does not exist. The data types supported include DWORD, BINARY, STRING and multiple STRINGS.

Remarks
Note that KeyValue is a property (not a method) which takes the name of a value as a parameter. If you pass an empty string ("") then the key value is for the default value of the key.

Example

Dim RegistryKey As IregistryKey
Set RegistryKey = GetObject("NTDS://DomainName/MachineName/reg_services/HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Visual Basic\5.0")
Debug.Print RegistryKey.KeyValue("InstallDir")

 

See Also: