## wb_get_registry_key

string wb_get_registry_key (string key, string subkey [, string entry])

Reads a string or integer value from the Windows registry item referenced by key, subkey and entry. The subkey may contain forward or reverse slashes. If entry is an empty string, a NULL value or is not supplied, the function retrieves the default value for the subkey.

Values are always returned as strings. If the requested entry is an empty string, an empty string is returned. If the key does not exist in the registry, the function returns NULL.

# Key strings

The key string can be one of the following values:

"HKCU" or "HKEY_CURRENT_USER"
"HKLM" or "HKEY_LOCAL_MACHINE"
"HKCR" or "HKEY_CLASSES_ROOT"
"HKU" or "HKEY_USERS"
"HKCC" or "HKEY_CURRENT_CONFIG"
"HKD" or "HKEY_DYN_DATA"

NOTES

- Registry keys, subkeys and entries are not case-sensitive.
- The maximum string retrieved is 1024 characters long.

# Example

`$wallpaper = wb_get_registry_key("HKCU", "Control Panel\\Desktop", "Wallpaper"); echo "The current wallpaper file is " . basename($wallpaper) . ".\n";`

# See also

wb_set_registry_key
System functions