Core Function RegValueList

From Sputnik Wiki
Jump to: navigation, search
RegValueList( <key> )

Contents

Description

Return an array of all the values at this location in the registry.

Parameters

key

The registry key to open and return a list of values inside it.

Return Value

Success: Returns array containing all the found values.

Failure: Returns empty array.

Remarks

A registry key must start with:

"HKEY_LOCAL_MACHINE" or "HKLM"

"HKEY_USERS" or "HKU"

"HKEY_CURRENT_USER" or "HKCU"

"HKEY_CLASSES_ROOT" or "HKCR"

"HKEY_CURRENT_CONFIG" or "HKCC"

Example

Return the names only

$values = RegValueList(@"HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
foreach($values as $value)
{
	println("Value: $value");
}

Return the names and type

$values = RegValueList(@"HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true);
foreach($values as $valuepair)
{
	List ($value, $type) = $valuepair;
	println("Type: $type Value: $value");
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox