GetNextValue

GetNextValue is a function used in the enumeration process of registry paths. It will return subsequent values, on the sequence started by GetFirstValue.

Syntax

GetNextValue(ValueName)

Returns
  • Long - if registry value is REG_DWORD
  • String - if registry value is REG_SZ
  • Array of Strings - If registry value is REG_MULTI_SZ
  • Array of bytes - if registry value is REG_BINARY
More Information

ValueName must be a variable of type variant. GetNextValue will return the name of the attribute which contained the value returned inside the variable ValueName.

Example

This scripts lists all of the programs that run on startup:

Function Main

Dim Ro As Object

Dim valueName as variant

cr = Chr(13) + Chr(10)

Set Ro = Registry.Connect("127.0.0.1")

Value = ro.GetFirstValue("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", valueName)

While Value <> ""

Echo "ValueName: " & valueName & " = " & value & cr

Value = ro.GetNextValue(valueName)

Wend

End Function