# Method RegGetValue()

Method RegGetValue

  `string|int|array(string) RegGetValue(int hkey, string key, string index)`

Description

  Get a single value from the register.

Parameter `hkey`

  One of the following:

  `HKEY_CLASSES_ROOT`
  `HKEY_LOCAL_MACHINE`
  `HKEY_CURRENT_USER`
  `HKEY_USERS`

Parameter `key`

  Registry key.

Parameter `index`

  Value name.

Returns

  Returns the value stored at the specified location in the register if any. Returns `UNDEFINED` on missing keys, throws errors on other failures.

Note

  This function threw errors on missing keys in Pike 7.6 and earlier (see System.RegGetValue_76()).

Note

  This function is only available on Win32 systems.

See also

  RegGetValues(), RegGetKeyNames(), System.RegGetValue_76()