Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Method

RegistryGetValue

ModuleNativeServices
LibraryCore
Action


Excerpt
Get a registry value.


Parameters

Multiexcerpt include
MultiExcerptNameHiveParameter
PageWithExcerptMethod Notes

Multiexcerpt include
MultiExcerptNameSubkeyParameter
PageWithExcerptMethod Notes

Name (string): The name of the registry value for which to get its value.

Return values

If the specified subkey and name exist, the call will return the following:

  • Name (string): The full path of the registry value.
  • ValueType (string): "REG_DWORD" etc. as appropriate.
  • Value (string): The actual value of an appropriate type, converted to a string if not one already.

If the specified subkey or name does not exist, the call will not return anything but does not return an error ("success, no content").

Example


Code Block
languageperl
 NativeServices.RegistryGetValue(Hive:"HKLM", Subkey:"software\\vendor", Name:"value23");

The Name returned for this is "HKLM\software\vendor\value23".

Platforms
  • Windows
Notes

Multiexcerpt include
MultiExcerptNameREG_MULTI_SZ_values
PageWithExcerptMethod Notes

REG_NONE keys are not supported.

To get a registry value for every user under HKU, use NativeServices.RegistryGetUserValues.